user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<do_csum64>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %esi,%r12d
  test   %esi,%esi
  sete   %dil
  movzbl %dil,%edi
  mov    $0x0,%eax
  call   <unlikely@plt>
  mov    %eax,%edx
  mov    $0x0,%eax
  test   %edx,%edx
  je     L57
L90:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L57:
  mov    %ebx,%ebp
  and    $0x1,%ebp
  mov    %ebp,%edi
  call   <unlikely@plt>
  mov    $0x0,%edi
  test   %eax,%eax
  je     L162
  movzbl (%rbx),%edi
  shl    $0x8,%edi
  movslq %edi,%rdi
  sub    $0x1,%r12d
  add    $0x1,%rbx
L162:
  mov    %r12d,%eax
  shr    %eax
  je     L70
  test   $0x2,%bl
  je     L30
  movzwl (%rbx),%edx
  add    %rdx,%rdi
  sub    $0x1,%eax
  sub    $0x2,%r12d
  add    $0x2,%rbx
L30:
  shr    %eax
  je     L31
  test   $0x4,%bl
  je     L77
  mov    (%rbx),%edx
  add    %rdx,%rdi
  sub    $0x1,%eax
  sub    $0x4,%r12d
  add    $0x4,%rbx
L77:
  mov    %eax,%ecx
  shr    %ecx
  shr    $0x4,%eax
  je     L28
  mov    %eax,%eax
  shl    $0x6,%rax
  add    %rbx,%rax
  mov    $0x0,%edx
L52:
  add    (%rbx),%rdi
  adc    0x8(%rbx),%rdi
  adc    0x10(%rbx),%rdi
  adc    0x18(%rbx),%rdi
  adc    0x20(%rbx),%rdi
  adc    0x28(%rbx),%rdi
  adc    0x30(%rbx),%rdi
  adc    0x38(%rbx),%rdi
  adc    %rdx,%rdi
  add    $0x40,%rbx
  cmp    %rax,%rbx
  jne    L52
L129:
  and    $0x7,%ecx
  je     L84
  mov    %ecx,%ecx
  lea    (%rax,%rcx,8),%rbx
  mov    $0x0,%edx
L158:
  add    (%rax),%rdi
  adc    %rdx,%rdi
  add    $0x8,%rax
  cmp    %rbx,%rax
  jne    L158
L173:
  mov    %edi,%esi
  shr    $0x20,%rdi
  mov    $0x0,%eax
  call   <add32_with_carry@plt>
  movslq %eax,%rdi
  test   $0x4,%r12b
  je     L31
  mov    (%rbx),%eax
  add    %rax,%rdi
  add    $0x4,%rbx
L31:
  test   $0x2,%r12b
  je     L70
  movzwl (%rbx),%eax
  add    %rax,%rdi
  add    $0x2,%rbx
L70:
  test   $0x1,%r12b
  je     L78
  movzbl (%rbx),%eax
  add    %rax,%rdi
L78:
  mov    %edi,%esi
  shr    $0x20,%rdi
  mov    $0x0,%eax
  call   <add32_with_carry@plt>
  movslq %eax,%rbx
  mov    %ebp,%edi
  mov    $0x0,%eax
  call   <unlikely@plt>
  test   %eax,%eax
  jne    L120
L107:
  mov    %ebx,%eax
  jmp    L90
L28:
  mov    %rbx,%rax
  jmp    L129
L84:
  mov    %rax,%rbx
  jmp    L173
L120:
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <from32to16@plt>
  movslq %eax,%rdx
  movzbl %dh,%ebx
  shl    $0x8,%rdx
  movzwl %dx,%edx
  or     %rdx,%rbx
  jmp    L107
```

assistant: ```c
unsigned do_csum64(const unsigned char *buff, unsigned len) {
  unsigned odd, count;
  unsigned long result = 0;
  if (unlikely(len == 0))
    return result;
  odd = 1 & (unsigned long)buff;
  if (unlikely(odd)) {
    result = *buff << 8;
    len--;
    buff++;
  }
  count = len >> 1;
  if (count) {
    if (2 & (unsigned long)buff) {
      result += *(unsigned short *)buff;
      count--;
      len -= 2;
      buff += 2;
    }
    count >>= 1;
    if (count) {
      unsigned long zero;
      unsigned count64;
      if (4 & (unsigned long)buff) {
        result += *(unsigned int *)buff;
        count--;
        len -= 4;
        buff += 4;
      }
      count >>= 1;
      zero = 0;
      count64 = count >> 3;
      while (count64) {
        asm("addq 0*8(%[src]),%[res]\n\t"
            "adcq 1*8(%[src]),%[res]\n\t"
            "adcq 2*8(%[src]),%[res]\n\t"
            "adcq 3*8(%[src]),%[res]\n\t"
            "adcq 4*8(%[src]),%[res]\n\t"
            "adcq 5*8(%[src]),%[res]\n\t"
            "adcq 6*8(%[src]),%[res]\n\t"
            "adcq 7*8(%[src]),%[res]\n\t"
            "adcq %[zero],%[res]"
            : [res] "=r"(result)
            : [src] "r"(buff), [zero] "r"(zero), "[res]"(result));
        buff += 64;
        count64--;
      }
      count %= 8;
      while (count) {
        asm("addq %1,%0\n\t"
            "adcq %2,%0\n"
            : "=r"(result)
            : "m"(*(unsigned long *)buff), "r"(zero), "0"(result));
        --count;
        buff += 8;
      }
      result = add32_with_carry(result >> 32, result & 0xffffffff);
      if (len & 4) {
        result += *(unsigned int *)buff;
        buff += 4;
      }
    }
    if (len & 2) {
      result += *(unsigned short *)buff;
      buff += 2;
    }
  }
  if (len & 1)
    result += *buff;
  result = add32_with_carry(result >> 32, result & 0xffffffff);
  if (unlikely(odd)) {
    result = from32to16(result);
    result = ((result >> 8) & 0xff) | ((result & 0xff) << 8);
  }
  return result;
}
```