github.com/afumu/libc@v0.0.6/musl/src/string/i386/memmove.s (about) 1 .global memmove 2 .type memmove,@function 3 memmove: 4 mov 4(%esp),%eax 5 sub 8(%esp),%eax 6 cmp 12(%esp),%eax 7 .hidden __memcpy_fwd 8 jae __memcpy_fwd 9 push %esi 10 push %edi 11 mov 12(%esp),%edi 12 mov 16(%esp),%esi 13 mov 20(%esp),%ecx 14 lea -1(%edi,%ecx),%edi 15 lea -1(%esi,%ecx),%esi 16 std 17 rep movsb 18 cld 19 lea 1(%edi),%eax 20 pop %edi 21 pop %esi 22 ret