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

```asm
<do_csum>:
  endbr64
  test   %esi,%esi
  je     L65
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  xor    %edi,%edi
  mov    %rbx,%rbp
  and    $0x1,%ebp
  jne    L69
L99:
  mov    %r12d,%eax
  shr    %eax
  je     L50
  test   $0x2,%bl
  je     L92
  movzwl (%rbx),%edx
  sub    $0x1,%eax
  sub    $0x2,%r12d
  add    $0x2,%rbx
  add    %rdx,%rdi
L92:
  shr    %eax
  je     L90
  test   $0x4,%bl
  jne    L213
L247:
  mov    %eax,%edx
  shr    %edx
  shr    $0x4,%eax
  je     L76
  mov    %eax,%eax
  xor    %ecx,%ecx
  shl    $0x6,%rax
  add    %rbx,%rax
  xchg   %ax,%ax
L202:
  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    %rcx,%rdi
  add    $0x40,%rbx
  cmp    %rax,%rbx
  jne    L202
L11:
  and    $0x7,%edx
  je     L101
  xor    %ecx,%ecx
  add    (%rax),%rdi
  adc    %rcx,%rdi
  cmp    $0x1,%edx
  je     L27
  add    0x8(%rax),%rdi
  adc    %rcx,%rdi
  cmp    $0x2,%edx
  je     L27
  add    0x10(%rax),%rdi
  adc    %rcx,%rdi
  cmp    $0x3,%edx
  je     L27
  add    0x18(%rax),%rdi
  adc    %rcx,%rdi
  cmp    $0x4,%edx
  je     L27
  mov    %edx,%esi
  add    0x20(%rax),%rdi
  adc    %rcx,%rdi
  sub    $0x5,%esi
  je     L27
  add    0x28(%rax),%rdi
  adc    %rcx,%rdi
  cmp    $0x1,%esi
  je     L27
  add    0x30(%rax),%rdi
  adc    %rcx,%rdi
L27:
  mov    %edx,%edx
  lea    (%rax,%rdx,8),%rbx
L94:
  mov    %edi,%esi
  xor    %eax,%eax
  shr    $0x20,%rdi
  call   <add32_with_carry@plt>
  movslq %eax,%rdi
  test   $0x4,%r12b
  je     L90
  mov    (%rbx),%eax
  add    $0x4,%rbx
  add    %rax,%rdi
L90:
  test   $0x2,%r12b
  je     L50
  movzwl (%rbx),%eax
  add    $0x2,%rbx
  add    %rax,%rdi
L50:
  and    $0x1,%r12d
  jne    L98
L173:
  mov    %edi,%esi
  xor    %eax,%eax
  shr    $0x20,%rdi
  call   <add32_with_carry@plt>
  cltq
  test   %rbp,%rbp
  jne    L172
L221:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopw   0x0(%rax,%rax,1)
L98:
  movzbl (%rbx),%eax
  add    %rax,%rdi
  jmp    L173
  nopl   0x0(%rax,%rax,1)
L213:
  mov    (%rbx),%edx
  sub    $0x1,%eax
  sub    $0x4,%r12d
  add    $0x4,%rbx
  add    %rdx,%rdi
  jmp    L247
  nopl   (%rax)
L65:
  xor    %eax,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L172:
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <from32to16@plt>
  movslq %eax,%rdx
  movzbl %dh,%eax
  shl    $0x8,%rdx
  movzwl %dx,%edx
  or     %rdx,%rax
  jmp    L221
  nopl   0x0(%rax)
L69:
  movzbl (%rbx),%edi
  sub    $0x1,%r12d
  add    $0x1,%rbx
  shl    $0x8,%edi
  movslq %edi,%rdi
  jmp    L99
  cs nopw 0x0(%rax,%rax,1)
L101:
  mov    %rax,%rbx
  jmp    L94
  nopl   0x0(%rax,%rax,1)
L76:
  mov    %rbx,%rax
  jmp    L11
```

assistant: ```c
unsigned do_csum(const unsigned char *buff, unsigned len) {
  unsigned odd, count;
  unsigned long result = 0;
  if (__builtin_expect(!!(len == 0), 0))
    return result;
  odd = 1 & (unsigned long)buff;
  if (__builtin_expect(!!(odd), 0)) {
    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 (__builtin_expect(!!(odd), 0)) {
    result = from32to16(result);
    result = ((result >> 8) & 0xff) | ((result & 0xff) << 8);
  }
  return result;
}
```