user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<memcpy>:
  endbr64
  mov    %rdx,%r10
  lea    -0x4(%rsi),%rcx
  lea    -0x4(%rdi),%rdx
  mov    %rdi,%r9
  cmp    $0x7,%r10
  jbe    L102
  mov    %r10,%r8
  mov    %rdx,%rax
  shr    $0x3,%r8
  and    $0x3,%eax
  jne    L150
L128:
  xor    %eax,%eax
  nopl   (%rax)
L34:
  mov    0x4(%rcx,%rax,8),%rdi
  mov    0x8(%rcx,%rax,8),%rsi
  mov    %rdi,0x4(%rdx,%rax,8)
  mov    %rsi,0x8(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r8
  jne    L34
  shl    $0x3,%r8
  add    %r8,%rdx
  add    %r8,%rcx
L102:
  mov    %r10,%rsi
  and    $0x7,%esi
  and    $0x4,%r10d
  je     L145
  mov    0x4(%rcx),%rax
  sub    $0x4,%rsi
  add    $0x4,%rcx
  add    $0x4,%rdx
  mov    %rax,(%rdx)
L145:
  test   %rsi,%rsi
  je     L117
  mov    %rcx,%r10
  lea    0x3(%rcx),%rdi
  lea    0x3(%rdx),%rax
  not    %r10
  lea    -0x1(%rsi),%r8
  add    %rdx,%r10
  cmp    $0xe,%r10
  jbe    L53
  cmp    $0x6,%r8
  jbe    L53
  cmp    $0xe,%r8
  jbe    L160
  mov    $0x4,%eax
  nopw   0x0(%rax,%rax,1)
L44:
  movdqu (%rcx,%rax,1),%xmm0
  movups %xmm0,(%rdx,%rax,1)
  add    $0x10,%rax
  cmp    $0xfffffffffffffff4,%rax
  jne    L44
  add    $0x10,%rsi
  lea    -0xd(%rdx),%rax
  lea    -0xd(%rcx),%rdi
  mov    $0xfffffffffffffff0,%r8
L87:
  mov    0x4(%rcx,%r8,1),%rcx
  mov    %rcx,0x4(%rdx,%r8,1)
  movzbl 0x9(%rdi),%edx
  mov    %dl,0x9(%rax)
  cmp    $0x9,%rsi
  je     L117
  movzbl 0xa(%rdi),%edx
  mov    %dl,0xa(%rax)
  cmp    $0xa,%rsi
  je     L117
  movzbl 0xb(%rdi),%edx
  mov    %dl,0xb(%rax)
  cmp    $0xb,%rsi
  je     L117
  movzbl 0xc(%rdi),%edx
  mov    %dl,0xc(%rax)
  cmp    $0xc,%rsi
  je     L117
  movzbl 0xd(%rdi),%edx
  mov    %dl,0xd(%rax)
  cmp    $0xd,%rsi
  je     L117
  movzbl 0xe(%rdi),%edx
  mov    %dl,0xe(%rax)
  cmp    $0xe,%rsi
  je     L117
  movzbl 0xf(%rdi),%edx
  mov    %dl,0xf(%rax)
L117:
  mov    %r9,%rax
  ret
  nopl   0x0(%rax)
L150:
  movzbl (%rsi),%r8d
  mov    $0x4,%edi
  lea    -0x4(%rax,%r10,1),%r10
  sub    %rax,%rdi
  mov    %r8b,(%r9)
  mov    $0x3,%r8d
  sub    %rax,%r8
  je     L174
  movzbl 0x1(%rsi),%eax
  mov    %al,0x1(%r9)
  cmp    $0x1,%r8
  je     L174
  movzbl 0x2(%rsi),%eax
  mov    %al,0x2(%r9)
L174:
  add    %rdi,%rcx
  add    %rdi,%rdx
  cmp    $0x7,%r10
  jbe    L102
  mov    %r10,%r8
  shr    $0x3,%r8
  jmp    L128
L160:
  xor    %r8d,%r8d
  jmp    L87
  nopl   0x0(%rax)
L53:
  add    $0x4,%rsi
  mov    $0x4,%eax
  nopl   0x0(%rax)
L92:
  movzbl (%rcx,%rax,1),%edi
  mov    %dil,(%rdx,%rax,1)
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L92
  mov    %r9,%rax
  ret
```

assistant: ```c
void *memcpy(void *to, const void *from, size_t len) {
  unsigned long rem, chunks, tmp1, tmp2;
  unsigned char *tmp_to;
  unsigned char *tmp_from = (unsigned char *)from;
  chunks = len / 8;
  tmp_from -= 4;
  tmp_to = to - 4;
  if (!chunks)
    goto lessthan8;
  rem = (unsigned long)tmp_to % 4;
  if (rem)
    goto align;
copy_chunks:
  do {
    tmp1 = *(unsigned long *)(tmp_from + 4);
    tmp_from += 8;
    tmp2 = *(unsigned long *)tmp_from;
    *(unsigned long *)(tmp_to + 4) = tmp1;
    tmp_to += 8;
    *(unsigned long *)tmp_to = tmp2;
  } while (--chunks);
lessthan8:
  len = len % 8;
  if (len >= 4) {
    tmp_from += 4;
    tmp_to += 4;
    *(unsigned long *)(tmp_to) = *(unsigned long *)(tmp_from);
    len -= 4;
  }
  if (!len)
    return to;
  tmp_from += 3;
  tmp_to += 3;
  do {
    *++tmp_to = *++tmp_from;
  } while (--len);
  return to;
align:
  rem = 4 - rem;
  len -= rem;
  do {
    *(tmp_to + 4) = *(tmp_from + 4);
    ++tmp_from;
    ++tmp_to;
  } while (--rem);
  chunks = len / 8;
  if (chunks)
    goto copy_chunks;
  goto lessthan8;
}
```