user: Please show me the C implementation that matches the assembly code listed below:

```asm
<memcpy>:
  endbr64
  mov    %rsi,%rcx
  mov    %rdi,%r8
  mov    %rdx,%rsi
  test   %edx,%edx
  je     L118
  lea    -0x1(%rdx),%eax
  lea    0x1(%rcx),%rdi
  mov    %r8,%rdx
  sub    %rdi,%rdx
  cmp    $0xe,%rdx
  jbe    L161
  cmp    $0x6,%eax
  jbe    L161
  cmp    $0xe,%eax
  jbe    L125
  mov    %esi,%edx
  xor    %eax,%eax
  shr    $0x4,%edx
  shl    $0x4,%rdx
L156:
  movdqu (%rcx,%rax,1),%xmm1
  movups %xmm1,(%r8,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L156
  mov    %esi,%eax
  mov    %esi,%r9d
  and    $0xfffffff0,%eax
  mov    %eax,%r10d
  lea    (%r8,%r10,1),%rdx
  lea    (%rcx,%r10,1),%rdi
  cmp    %eax,%esi
  je     L88
  mov    %esi,%r11d
  sub    %eax,%r11d
  lea    -0x1(%r11),%r9d
  cmp    $0x6,%r9d
  jbe    L59
L191:
  mov    (%rcx,%r10,1),%r9
  mov    %r9,(%r8,%r10,1)
  mov    %r11d,%r10d
  and    $0xfffffff8,%r10d
  mov    %r10d,%r9d
  add    %r10d,%eax
  add    %r9,%rdx
  add    %r9,%rdi
  mov    %esi,%r9d
  cmp    %r10d,%r11d
  je     L88
L59:
  movzbl (%rdi),%r9d
  lea    0x1(%rax),%r10d
  mov    %r9b,(%rdx)
  mov    %esi,%r9d
  cmp    %r10d,%esi
  jbe    L88
  movzbl 0x1(%rdi),%r10d
  mov    %r10b,0x1(%rdx)
  lea    0x2(%rax),%r10d
  cmp    %r10d,%esi
  jbe    L88
  movzbl 0x2(%rdi),%r10d
  mov    %r10b,0x2(%rdx)
  lea    0x3(%rax),%r10d
  cmp    %r10d,%esi
  jbe    L88
  movzbl 0x3(%rdi),%r10d
  mov    %r10b,0x3(%rdx)
  lea    0x4(%rax),%r10d
  cmp    %r10d,%esi
  jbe    L88
  movzbl 0x4(%rdi),%r10d
  mov    %r10b,0x4(%rdx)
  lea    0x5(%rax),%r10d
  cmp    %r10d,%esi
  jbe    L88
  movzbl 0x5(%rdi),%r10d
  add    $0x6,%eax
  mov    %r10b,0x5(%rdx)
  cmp    %eax,%esi
  jbe    L88
  movzbl 0x6(%rdi),%eax
  mov    %al,0x6(%rdx)
L88:
  lea    (%r8,%r9,1),%rdx
  add    %r9,%rcx
L131:
  cmp    %rsi,%r9
  je     L72
  shr    $0x10,%rsi
  test   %esi,%esi
  je     L72
  mov    %esi,%esi
  mov    %rsi,%rdi
  shl    $0x10,%rdi
  add    %rdx,%rdi
L196:
  lea    0x1(%rcx),%rsi
  mov    %rdx,%rax
  sub    %rsi,%rax
  cmp    $0xe,%rax
  mov    $0x0,%eax
  jbe    L186
  nopl   (%rax)
L29:
  movdqu (%rcx,%rax,1),%xmm0
  movups %xmm0,(%rdx,%rax,1)
  add    $0x10,%rax
  cmp    $0xfff0,%rax
  jne    L29
  mov    0xfff0(%rcx),%rax
  mov    %rax,0xfff0(%rdx)
  movzbl 0xfff8(%rcx),%eax
  mov    %al,0xfff8(%rdx)
  movzbl 0xfff9(%rcx),%eax
  mov    %al,0xfff9(%rdx)
  movzbl 0xfffa(%rcx),%eax
  mov    %al,0xfffa(%rdx)
  movzbl 0xfffb(%rcx),%eax
  mov    %al,0xfffb(%rdx)
  movzbl 0xfffc(%rcx),%eax
  mov    %al,0xfffc(%rdx)
  movzbl 0xfffd(%rcx),%eax
  mov    %al,0xfffd(%rdx)
  movzbl 0xfffe(%rcx),%eax
  mov    %al,0xfffe(%rdx)
L58:
  movzbl 0xffff(%rcx),%eax
  add    $0x10000,%rdx
  add    $0x10000,%rcx
  mov    %al,-0x1(%rdx)
  cmp    %rdx,%rdi
  jne    L196
L72:
  mov    %r8,%rax
  ret
  nopl   0x0(%rax,%rax,1)
L186:
  movzbl (%rcx,%rax,1),%esi
  mov    %sil,(%rdx,%rax,1)
  add    $0x1,%rax
  cmp    $0xffff,%rax
  jne    L186
  jmp    L58
L161:
  mov    %esi,%r9d
  xor    %eax,%eax
L4:
  movzbl (%rcx,%rax,1),%edx
  mov    %dl,(%r8,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%r9
  jne    L4
  jmp    L88
L118:
  mov    %rdi,%rdx
  xor    %r9d,%r9d
  jmp    L131
L125:
  mov    %esi,%r11d
  mov    %rcx,%rdi
  mov    %r8,%rdx
  xor    %eax,%eax
  xor    %r10d,%r10d
  jmp    L191
```

assistant: ```c
void *memcpy(void *to, const void *from, size_t n) {
  register char *rto = (char *)to;
  register char *rfrom = (char *)from;
  register unsigned int rn;
  register unsigned int nn = (unsigned int)n;
  for (rn = 0; rn < nn; rn++)
    *rto++ = *rfrom++;
  if (nn == n)
    return (to);
  {
    register unsigned int upper = (unsigned int)(n >> 16);
    register unsigned int tmp;
    for (tmp = 0; tmp < upper; tmp++) {
      for (rn = 0; rn < 65535; rn++)
        *rto++ = *rfrom++;
      *rto++ = *rfrom++;
    }
  }
  return (to);
}
```