user: What is the c source code of the assembly code below:

```asm
<memmove>:
  endbr64
  mov    %rdi,%r8
  mov    %rsi,%rax
  mov    %rdi,%rcx
  cmp    %rdi,%rsi
  jb     L56
  xor    %rdi,%rsi
  and    $0x7,%esi
  jne    L107
  test   %rdx,%rdx
  jne    L5
  jmp    L4
  nopl   (%rax)
L41:
  movzbl (%rax),%esi
  add    $0x1,%rcx
  add    $0x1,%rax
  mov    %sil,-0x1(%rcx)
  sub    $0x1,%rdx
  je     L4
L5:
  test   $0x7,%al
  jne    L41
  cmp    $0x7,%rdx
  jbe    L77
  lea    -0x8(%rdx),%r10
  lea    0x8(%rax),%r11
  mov    %rcx,%r9
  mov    %r10,%rdi
  sub    %rax,%r9
  and    $0xfffffffffffffff8,%rdi
  add    %r11,%rdi
  nop
L20:
  mov    (%rax),%rsi
  mov    %rsi,(%r9,%rax,1)
  add    $0x8,%rax
  cmp    %rdi,%rax
  jne    L20
  and    $0xfffffffffffffff8,%r10
  and    $0x7,%edx
  lea    (%r11,%r10,1),%rax
  lea    0x8(%rcx,%r10,1),%rcx
L107:
  test   %rdx,%rdx
  je     L4
L77:
  add    %rax,%rdx
  sub    %rax,%rcx
  nopl   0x0(%rax,%rax,1)
L158:
  movzbl (%rax),%esi
  mov    %sil,(%rcx,%rax,1)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L158
L4:
  mov    %r8,%rax
  ret
  nopl   0x0(%rax)
L56:
  lea    (%rsi,%rdx,1),%rax
  lea    (%rdi,%rdx,1),%rsi
  mov    %rax,%rcx
  xor    %rsi,%rcx
  and    $0x7,%ecx
  jne    L187
  test   %rdx,%rdx
  jne    L2
  jmp    L4
  nopw   0x0(%rax,%rax,1)
L45:
  movzbl -0x1(%rax),%ecx
  sub    $0x1,%rax
  sub    $0x1,%rsi
  mov    %cl,(%rsi)
  sub    $0x1,%rdx
  je     L4
L2:
  test   $0x7,%al
  jne    L45
  cmp    $0x7,%rdx
  jbe    L106
  lea    -0x8(%rdx),%r11
  lea    -0x8(%rax),%r10
  mov    %rax,%rcx
  and    $0xfffffffffffffff8,%r11
  sub    %r11,%r10
  nopl   0x0(%rax,%rax,1)
L55:
  sub    $0x8,%rcx
  mov    (%rcx),%r9
  lea    (%rcx,%rsi,1),%rdi
  sub    %rax,%rdi
  mov    %r9,(%rdi)
  cmp    %rcx,%r10
  jne    L55
  sub    $0x8,%rsi
  and    $0x7,%edx
  mov    %r10,%rax
  sub    %r11,%rsi
L187:
  test   %rdx,%rdx
  je     L4
L106:
  mov    %rax,%r9
  sub    %rdx,%r9
  mov    %rax,%rdx
  nopl   (%rax)
L36:
  sub    $0x1,%rdx
  movzbl (%rdx),%edi
  lea    (%rdx,%rsi,1),%rcx
  sub    %rax,%rcx
  mov    %dil,(%rcx)
  cmp    %rdx,%r9
  jne    L36
  mov    %r8,%rax
  ret
```

assistant: ```c
void *memmove(void *s1, const void *s2, size_t n) {
  uintptr_t from = (uintptr_t)s2;
  uintptr_t to = (uintptr_t)s1;
  if (to <= from) {
    if (((from ^ to) & (sizeof(uintptr_t) - 1)) == 0) {
      while (n != 0 && ((from & (sizeof(uintptr_t) - 1)) != 0)) {
        *(char *)to = *(const char *)from;
        from++;
        to++;
        n--;
      }
      while (n >= sizeof(uintptr_t)) {
        *(uintptr_t *)to = *(const uintptr_t *)from;
        from += sizeof(uintptr_t);
        to += sizeof(uintptr_t);
        n -= sizeof(uintptr_t);
      }
    }
    while (n != 0) {
      *(char *)to = *(const char *)from;
      from++;
      to++;
      n--;
    }
  } else {
    from += n;
    to += n;
    if (((from ^ to) & (sizeof(uintptr_t) - 1)) == 0) {
      while (n != 0 && ((from & (sizeof(uintptr_t) - 1)) != 0)) {
        from--;
        to--;
        *(char *)to = *(const char *)from;
        n--;
      }
      while (n >= sizeof(uintptr_t)) {
        from -= sizeof(uintptr_t);
        to -= sizeof(uintptr_t);
        *(uintptr_t *)to = *(const uintptr_t *)from;
        n -= sizeof(uintptr_t);
      }
    }
    while (n != 0) {
      from--;
      to--;
      *(char *)to = *(const char *)from;
      n--;
    }
  }
  return s1;
}
```