ldmia r0, {r3-r6}
ldmia r1!,{r12,lr}
subs r2, r2, #4
- add r4, r4, r12,asr #17 @ we use half volume
+ add r4, r4, r12,asr #17 @ we use 5/8 volume
+ add r4, r4, r12,asr #19
mov r12,r12,lsl #16
add r3, r3, r12,asr #17
+ add r3, r3, r12,asr #19
add r6, r6, lr, asr #17
+ add r6, r6, lr, asr #19
mov lr, lr, lsl #16
add r5, r5, lr, asr #17
+ add r5, r5, lr, asr #19
stmia r0!,{r3-r6}
bpl m16_32_loop
ldmia r0, {r3,r4}
mov r12,r5, lsl #16
add r3, r3, r12,asr #17
+ add r3, r3, r12,asr #19
add r4, r4, r5, asr #17
+ add r4, r4, r5, asr #19
stmia r0!,{r3,r4}
m16_32_no_unal2:
ldrsh r4, [r1], #2
ldr r3, [r0]
add r3, r3, r4, asr #1
+ add r3, r3, r4, asr #3
str r3, [r0], #4
ldmfd sp!, {r4-r6,lr}
ldr r12,[r1], #8
ldr lr, [r1], #8
subs r2, r2, #4
- add r4, r4, r12,asr #17
+ add r4, r4, r12,asr #17 @ we use 5/8 volume
+ add r4, r4, r12,asr #19
mov r12,r12,lsl #16
- add r3, r3, r12,asr #17 @ we use half volume
+ add r3, r3, r12,asr #17
+ add r3, r3, r12,asr #19
add r6, r6, lr, asr #17
+ add r6, r6, lr, asr #19
mov lr, lr, lsl #16
add r5, r5, lr, asr #17
+ add r5, r5, lr, asr #19
stmia r0!,{r3-r6}
bpl m16_32_s1_loop
ldmia r0, {r3,r4}
mov r12,r5, lsl #16
add r3, r3, r12,asr #17
+ add r3, r3, r12,asr #19
add r4, r4, r5, asr #17
+ add r4, r4, r5, asr #19
stmia r0!,{r3,r4}
m16_32_s1_no_unal2:
ldrsh r4, [r1], #2
ldr r3, [r0]
add r3, r3, r4, asr #1
+ add r3, r3, r4, asr #3
str r3, [r0], #4
ldmfd sp!, {r4-r6,lr}
ldr r12,[r1], #16
ldr lr, [r1], #16
subs r2, r2, #4
- add r4, r4, r12,asr #17
+ add r4, r4, r12,asr #17 @ we use 5/8 volume
+ add r4, r4, r12,asr #19
mov r12,r12,lsl #16
- add r3, r3, r12,asr #17 @ we use half volume
+ add r3, r3, r12,asr #17
+ add r3, r3, r12,asr #19
add r6, r6, lr, asr #17
+ add r6, r6, lr, asr #19
mov lr, lr, lsl #16
add r5, r5, lr, asr #17
+ add r5, r5, lr, asr #19
stmia r0!,{r3-r6}
bpl m16_32_s2_loop
ldmia r0, {r3,r4}
mov r12,r5, lsl #16
add r3, r3, r12,asr #17
+ add r3, r3, r12,asr #19
add r4, r4, r5, asr #17
+ add r4, r4, r5, asr #19
stmia r0!,{r3,r4}
m16_32_s2_no_unal2:
ldrsh r4, [r1], #2
ldr r3, [r0]
add r3, r3, r4, asr #1
+ add r3, r3, r4, asr #3
str r3, [r0], #4
ldmfd sp!, {r4-r6,lr}
ldr lr ,[r1, r9, lsl #2]
add r4, r4, r3
subs r2, r2, #2
- add r6, r6, r12,asr #17
+ add r6, r6, r12,asr #17 @ we use 5/8 volume
+ add r6, r6, r12,asr #19
mov r12,r12,lsl #16
- add r5, r5, r12,asr #17 @ we use half volume
+ add r5, r5, r12,asr #17
+ add r5, r5, r12,asr #19
add r8, r8, lr, asr #17
+ add r8, r8, lr, asr #19
mov lr, lr, lsl #16
add r7, r7, lr, asr #17
+ add r7, r7, lr, asr #19
stmia r0!,{r5-r8}
bpl m16_32_rss_loop
ldmia r0, {r5,r6}
mov r12,lr, lsl #16
add r5, r5, r12,asr #17
+ add r5, r5, r12,asr #19
add r6, r6, lr, asr #17
+ add r6, r6, lr, asr #19
stmia r0!,{r5,r6}
ldmfd sp!, {r4-r9,lr}
ldr lr ,[r1, r9, lsl #2]
add r4, r4, r3
subs r2, r2, #2
- add r5, r5, r12,asr #18
+ add r5, r5, r12,asr #18 @ we use 5/8 volume (= 5/16 vol per channel)
+ add r5, r5, r12,asr #20
mov r12,r12,lsl #16
- add r5, r5, r12,asr #18 @ we use half volume (= quarter vol per channel)
+ add r5, r5, r12,asr #18
+ add r5, r5, r12,asr #20
add r6, r6, lr, asr #18
+ add r6, r6, lr, asr #20
mov lr, lr, lsl #16
add r6, r6, lr, asr #18
+ add r6, r6, lr, asr #20
stmia r0!,{r5-r6}
bpl m16_32_rsm_loop
ldr r5, [r0]
mov r12,lr, lsl #16
add r5, r5, r12,asr #18
+ add r5, r5, r12,asr #20
add r5, r5, lr, asr #18
+ add r5, r5, lr, asr #20
str r5, [r0]
ldmfd sp!, {r4-r6,r9,lr}