memcpy32:
        stmfd sp!, {fp, lr}
        add   fp, sp, $4
        mov   r1, r10
        sub   r10, r3, $20
        add   r3, r10, $42
        add   r0, r10, $24
        str   r1, [r0]

@ src_offset LOCAL_VAR 1
@ (stack-ref-n 3)
        ldr   r2, [r10, $12]
@ src LOCAL_VAR 1
@ (stack-ref-n 2)
        ldr   r1, [r10, $8]
@ (add)
        add   r1, r2, r1
        add   r1, r8, r1, lsl $2 @ r1 = &src
@ dest_offset LOCAL_VAR 1
@ (stack-ref-n 1)
        ldr   r2, [r10, $4]
@ dest LOCAL_VAR_ASSIGNMENT 1
@ (stack-ref-n 0)
        ldr   r0, [r10]
@ (add)
        add   r0, r0, r2
        add   r0, r8, r0, lsl $2 @ r0 = &dest
@ n_words LOCAL_VAR 1
@ (stack-ref-n 4)
        ldr   r2, [r10, $16] @ r2 = n_words

        push  {r11}

        and   r11, r2, $7
        movs  r2, r2, lsr $3
        beq   memcpy32_residual

        push  {r3,r7-r10}
memcpy32_main_loop:
        ldmia r1!, {r3-r10}
        stmia r0!, {r3-r10}
        subs  r2, $1
        bne   memcpy32_main_loop
        pop   {r3,r7-r10}

memcpy32_residual:
        subs  r11, $1
        ldrcs r2, [r1], $4
        strcs r2, [r0], $4
        bcs   memcpy32_residual

        pop   {r11}

@ (proc-end 6)
        mov   r3, r10
        add   r0, r10, $24
        ldr   r10, [r0]
@ (return)
        ldmfd sp!, {fp, pc}
.ltorg
