user: What would the C source look like for the assembly code provided here:

```asm
<mesh_memcpy>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %rsi,%rbx
  mov    %rdx,(%rsp)
  mov    %rsi,0x10(%rsp)
  mov    %rdi,%rax
  xor    %rsi,%rax
  mov    %rax,%rsi
  and    $0x3,%esi
  mov    %rsi,0x18(%rsp)
  jne    L275
  test   %rdx,%rdx
  je     L211
  mov    %rdi,%rbp
  mov    %rdx,%r13
  test   $0x1,%dil
  je     L112
  mov    $0x1,%edx
  mov    %rbx,%rsi
  call   <mesh_write@plt>
  lea    0x1(%rbp),%rbp
  add    $0x4,%rbx
  mov    (%rsp),%rax
  lea    -0x1(%rax),%r13
  jmp    L112
L211:
  mov    0x8(%rsp),%rbp
  mov    (%rsp),%r13
L112:
  test   $0x2,%bpl
  je     L6
  cmp    $0x1,%r13
  jbe    L225
  mov    (%rbx),%eax
  mov    %eax,0x0(%rbp)
  add    $0x2,%rbp
  add    $0x8,%rbx
  sub    $0x2,%r13
L6:
  mov    %r13,%r14
  and    $0xfffffffffffffffc,%r14
  je     L48
  mov    $0x8,%r12d
  lea    0x8(%r14),%r15
  jmp    L235
L225:
  jne    L227
  mov    $0x1,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <mesh_write@plt>
  add    $0x1,%rbp
  add    $0x4,%rbx
  mov    0x18(%rsp),%r13
  jmp    L227
L35:
  mov    $0x4,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <mesh_write@plt>
  add    $0x4,%rbp
  add    $0x10,%rbx
  sub    $0x4,%r13
L248:
  lea    0x8(%r12),%rax
  cmp    %r14,%r12
  jae    L48
  mov    %rax,%r12
L235:
  mov    %r15,%rax
  sub    %r12,%rax
  cmp    $0x7,%rax
  jbe    L35
  mov    $0x8,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <mesh_write@plt>
  add    $0x8,%rbp
  add    $0x20,%rbx
  sub    $0x8,%r13
  jmp    L248
L48:
  cmp    $0x2,%r13
  je     L12
  cmp    $0x3,%r13
  je     L208
L227:
  cmp    $0x1,%r13
  je     L136
L132:
  test   %r13,%r13
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    0x8(%rsp),%rax
  mov    (%rsp),%r15
  add    %r15,%rax
  cmp    %rbp,%rax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    0x10(%rsp),%rax
  add    %r15,%rax
  cmp    %rax,%rbx
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L12:
  mov    $0x2,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <mesh_write@plt>
  add    $0x2,%rbp
  add    $0x8,%rbx
  mov    0x18(%rsp),%r13
  jmp    L132
L208:
  mov    $0x2,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <mesh_write@plt>
  add    $0x2,%rbp
  add    $0x8,%rbx
L136:
  mov    $0x1,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <mesh_write@plt>
  add    $0x1,%rbp
  add    $0x4,%rbx
  mov    0x18(%rsp),%r13
  jmp    L132
L275:
  test   $0x1,%al
  je     L124
  mov    (%rsp),%rax
  mov    %rax,%rbp
  mov    0x8(%rsp),%r12
  add    %r12,%rbp
  mov    %rbx,%r13
  test   %rax,%rax
  je     L42
L123:
  mov    $0x1,%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <mesh_write@plt>
  add    $0x1,%r12
  add    $0x4,%r13
  cmp    %rbp,%r12
  jne    L123
  mov    (%rsp),%rax
  lea    (%rbx,%rax,4),%rbx
  mov    $0x0,%r13d
  jmp    L132
L42:
  mov    %r12,%rbp
  mov    %rax,%r13
  jmp    L132
L124:
  cmpq   $0x0,(%rsp)
  je     L64
  testb  $0x1,0x8(%rsp)
  jne    L10
  cmpq   $0x1,(%rsp)
  jbe    L286
  mov    0x8(%rsp),%rbp
  mov    (%rsp),%r13
  jmp    L33
L10:
  mov    $0x1,%edx
  mov    %rbx,%rsi
  mov    0x8(%rsp),%r15
  mov    %r15,%rdi
  call   <mesh_write@plt>
  lea    0x1(%r15),%rbp
  add    $0x4,%rbx
  mov    (%rsp),%rax
  lea    -0x1(%rax),%r13
  cmp    $0x1,%r13
  jbe    L300
L33:
  mov    %rbx,%r14
  mov    %rbp,%r12
  lea    0x0(%rbp,%r13,1),%r15
L1:
  mov    $0x2,%edx
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   <mesh_write@plt>
  add    $0x2,%r12
  add    $0x8,%r14
  mov    %r15,%rax
  sub    %r12,%rax
  cmp    $0x1,%rax
  ja     L1
  lea    -0x2(%r13),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffffffe,%rdx
  lea    0x2(%rbp,%rdx,1),%rbp
  shr    %rax
  lea    0x8(%rbx,%rax,8),%rbx
  and    $0x1,%r13d
L300:
  test   %r13,%r13
  je     L132
L113:
  mov    $0x1,%edx
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <mesh_write@plt>
  add    $0x1,%rbp
  add    $0x4,%rbx
  sub    $0x1,%r13
  jmp    L132
L64:
  mov    0x8(%rsp),%rbp
  mov    (%rsp),%r13
  jmp    L132
L286:
  mov    0x8(%rsp),%rbp
  mov    (%rsp),%r13
  jmp    L113
```

assistant: ```c
void mesh_memcpy(uintptr_t dst, const void *__restrict__ src, size_t size) {
  size_t n, aligned_n, i;
  uintptr_t d;
  const uint8_t *s;
  n = size;
  d = dst;
  s = (const uint8_t *)src;
  if (!(((uintptr_t)d ^ (uintptr_t)s) & 3)) {
    if (n && (((uintptr_t)d) & 1)) {
      mesh_write(d, s, 1);
      d++;
      s++;
      n--;
    }
    if (((uintptr_t)d) & 2) {
      if (n > 1) {
        *((uint16_t *)d) = *((const uint16_t *)s);
        d += 2;
        s += 2;
        n -= 2;
      } else if (n == 1) {
        mesh_write(d, s, 1);
        d++;
        s++;
        n--;
      }
    }
    aligned_n = n & (~3);
    for (i = 0; i < aligned_n;) {
      if (aligned_n - i >= 8) {
        mesh_write(d, s, 8);
        d += 8, s += 8, n -= 8, i += 8;
      } else {
        mesh_write(d, s, 4);
        d += 4, s += 4, n -= 4, i += 8;
      }
    }
    switch (n) {
    case 2:
      mesh_write(d, s, 2);
      d += 2;
      s += 2;
      n -= 2;
      break;
    case 3:
      mesh_write(d, s, 2);
      d += 2;
      s += 2;
      n -= 2;
    case 1:
      mesh_write(d, s, 1);
      d++;
      s++;
      n--;
    }
  } else if (!(((uintptr_t)d ^ (uintptr_t)s) & 1)) {
    if (n && ((uintptr_t)d) & 1) {
      mesh_write(d, s, 1);
      d++;
      s++;
      n--;
    }
    while (n > 1) {
      mesh_write(d, s, 2);
      d += 2;
      s += 2;
      n -= 2;
    }
    if (n) {
      mesh_write(d, s, 1);
      d++;
      s++;
      n--;
    }
  } else {
    while (n) {
      mesh_write(d, s, 1);
      d++;
      s++;
      n--;
    }
  }
  assert(n == 0);
  assert((uintptr_t)dst + size == (uintptr_t)d);
  assert((uintptr_t)src + size == (uintptr_t)s);
}
```