user: Converte this assembly snippet into its equivalent C code:

```asm
<in_chksum_udp6>:
  endbr64
  push   %rbx
  mov    %rdi,%rcx
  mov    %rsi,%rdi
  mov    %edx,%r10d
  mov    $0x0,%r11d
  movzwl (%rsi),%eax
  movzwl 0x2(%rsi),%edx
  add    %edx,%eax
  movzwl 0x4(%rsi),%edx
  add    %edx,%eax
  movzwl 0x6(%rsi),%edx
  add    %edx,%eax
  movzwl (%rcx),%edx
  add    %edx,%eax
  movzwl 0x2(%rcx),%edx
  add    %edx,%eax
  movzwl 0x4(%rcx),%edx
  add    %edx,%eax
  movzwl 0x6(%rcx),%edx
  add    %edx,%eax
  movzwl 0x8(%rcx),%edx
  add    %edx,%eax
  movzwl 0xa(%rcx),%edx
  add    %edx,%eax
  movzwl 0xc(%rcx),%edx
  add    %edx,%eax
  movzwl 0xe(%rcx),%edx
  add    %edx,%eax
  movzwl 0x10(%rcx),%edx
  add    %edx,%eax
  movzwl 0x12(%rcx),%edx
  add    %edx,%eax
  movzwl 0x14(%rcx),%edx
  add    %edx,%eax
  movzwl 0x16(%rcx),%edx
  add    %edx,%eax
  movzwl 0x18(%rcx),%edx
  add    %edx,%eax
  movzwl 0x1a(%rcx),%edx
  add    %edx,%eax
  movzwl 0x1c(%rcx),%edx
  add    %edx,%eax
  movzwl 0x1e(%rcx),%edx
  add    %edx,%eax
  movzwl 0x20(%rcx),%edx
  add    %edx,%eax
  movzwl 0x22(%rcx),%ecx
  add    %eax,%ecx
  lea    -0x8(%r10),%r8d
  lea    0x8(%rsi),%rsi
  cmp    $0x1f,%r8d
  jle    L10
  lea    -0x28(%r10),%r8d
  shr    $0x5,%r8d
  mov    %r8d,%r9d
  mov    %r9,%rax
  shl    $0x5,%rax
  lea    0x28(%rdi,%rax,1),%rdi
  mov    %rsi,%rdx
L64:
  movzwl (%rdx),%eax
  movzwl 0x2(%rdx),%ebx
  add    %ebx,%eax
  movzwl 0x4(%rdx),%ebx
  add    %ebx,%eax
  movzwl 0x6(%rdx),%ebx
  add    %ebx,%eax
  movzwl 0x8(%rdx),%ebx
  add    %ebx,%eax
  movzwl 0xa(%rdx),%ebx
  add    %ebx,%eax
  movzwl 0xc(%rdx),%ebx
  add    %ebx,%eax
  movzwl 0xe(%rdx),%ebx
  add    %ebx,%eax
  movzwl 0x10(%rdx),%ebx
  add    %ebx,%eax
  movzwl 0x12(%rdx),%ebx
  add    %ebx,%eax
  movzwl 0x14(%rdx),%ebx
  add    %ebx,%eax
  movzwl 0x16(%rdx),%ebx
  add    %ebx,%eax
  movzwl 0x18(%rdx),%ebx
  add    %ebx,%eax
  movzwl 0x1a(%rdx),%ebx
  add    %ebx,%eax
  movzwl 0x1c(%rdx),%ebx
  add    %ebx,%eax
  movzwl 0x1e(%rdx),%ebx
  add    %ebx,%eax
  add    %eax,%ecx
  add    $0x20,%rdx
  cmp    %rdi,%rdx
  jne    L64
  add    $0x1,%r9
  shl    $0x5,%r9
  add    %r9,%rsi
  neg    %r8d
  shl    $0x5,%r8d
  lea    -0x28(%r10,%r8,1),%r8d
L10:
  mov    %rsi,%rdx
  cmp    $0x7,%r8d
  jle    L13
  lea    -0x8(%r8),%r9d
  shr    $0x3,%r9d
  lea    0x1(%r9),%eax
  mov    %eax,%eax
  lea    (%rsi,%rax,8),%rdx
L16:
  movzwl (%rsi),%eax
  movzwl 0x2(%rsi),%edi
  add    %edi,%eax
  movzwl 0x4(%rsi),%edi
  add    %edi,%eax
  movzwl 0x6(%rsi),%edi
  add    %edi,%eax
  add    %eax,%ecx
  add    $0x8,%rsi
  cmp    %rdx,%rsi
  jne    L16
  neg    %r9d
  lea    -0x8(%r8,%r9,8),%r8d
L13:
  mov    %rdx,%rdi
  cmp    $0x1,%r8d
  jle    L73
  lea    -0x2(%r8),%esi
  shr    %esi
  lea    0x1(%rsi),%eax
  lea    (%rdx,%rax,2),%rdi
L6:
  add    $0x2,%rdx
  movzwl -0x2(%rdx),%eax
  add    %eax,%ecx
  cmp    %rdi,%rdx
  jne    L6
  neg    %esi
  lea    -0x2(%r8,%rsi,2),%r8d
L73:
  cmp    $0x1,%r8d
  je     L12
L66:
  mov    %ecx,%edx
  shr    $0x10,%edx
  movzwl %cx,%ecx
  add    %ecx,%edx
  mov    %edx,%eax
  shr    $0x10,%eax
  add    %edx,%eax
  not    %eax
  pop    %rbx
  ret
L12:
  mov    (%rdi),%r11b
  movzwl %r11w,%r11d
  add    %r11d,%ecx
  jmp    L66
```

assistant: ```c
unsigned short in_chksum_udp6(unsigned short *h, unsigned short *d, int dlen) {
  unsigned int cksum;
  unsigned short answer = 0;
  cksum = h[0];
  cksum += h[1];
  cksum += h[2];
  cksum += h[3];
  cksum += h[4];
  cksum += h[5];
  cksum += h[6];
  cksum += h[7];
  cksum += h[8];
  cksum += h[9];
  cksum += h[10];
  cksum += h[11];
  cksum += h[12];
  cksum += h[13];
  cksum += h[14];
  cksum += h[15];
  cksum += h[16];
  cksum += h[17];
  cksum += d[0];
  cksum += d[1];
  cksum += d[2];
  cksum += d[3];
  dlen -= 8;
  d += 4;
  while (dlen >= 32) {
    cksum += d[0];
    cksum += d[1];
    cksum += d[2];
    cksum += d[3];
    cksum += d[4];
    cksum += d[5];
    cksum += d[6];
    cksum += d[7];
    cksum += d[8];
    cksum += d[9];
    cksum += d[10];
    cksum += d[11];
    cksum += d[12];
    cksum += d[13];
    cksum += d[14];
    cksum += d[15];
    d += 16;
    dlen -= 32;
  }
  while (dlen >= 8) {
    cksum += d[0];
    cksum += d[1];
    cksum += d[2];
    cksum += d[3];
    d += 4;
    dlen -= 8;
  }
  while (dlen > 1) {
    cksum += *d++;
    dlen -= 2;
  }
  if (dlen == 1) {
    *(unsigned char *)(&answer) = (*(unsigned char *)d);
    cksum += answer;
  }
  cksum = (cksum >> 16) + (cksum & 0x0000ffff);
  cksum += (cksum >> 16);
  return (unsigned short)(~cksum);
}
```