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

```asm
<do_csum>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  movq   $0x0,-0x10(%rbp)
  cmpl   $0x0,-0x2c(%rbp)
  sete   %al
  movzbl %al,%eax
  test   %rax,%rax
  je     L73
  mov    -0x10(%rbp),%rax
  jmp    L131
L73:
  mov    -0x28(%rbp),%rax
  and    $0x1,%eax
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  setne  %al
  movzbl %al,%eax
  test   %rax,%rax
  je     L63
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%eax
  cltq
  mov    %rax,-0x10(%rbp)
  subl   $0x1,-0x2c(%rbp)
  addq   $0x1,-0x28(%rbp)
L63:
  mov    -0x2c(%rbp),%eax
  shr    %eax
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  je     L58
  mov    -0x28(%rbp),%rax
  and    $0x2,%eax
  test   %rax,%rax
  je     L45
  mov    -0x28(%rbp),%rax
  movzwl (%rax),%eax
  movzwl %ax,%eax
  add    %rax,-0x10(%rbp)
  subl   $0x1,-0x1c(%rbp)
  subl   $0x2,-0x2c(%rbp)
  addq   $0x2,-0x28(%rbp)
L45:
  shrl   -0x1c(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  je     L127
  mov    -0x28(%rbp),%rax
  and    $0x4,%eax
  test   %rax,%rax
  je     L107
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  add    %rax,-0x10(%rbp)
  subl   $0x1,-0x1c(%rbp)
  subl   $0x4,-0x2c(%rbp)
  addq   $0x4,-0x28(%rbp)
L107:
  shrl   -0x1c(%rbp)
  movq   $0x0,-0x8(%rbp)
  mov    -0x1c(%rbp),%eax
  shr    $0x3,%eax
  mov    %eax,-0x18(%rbp)
  jmp    L141
L40:
  mov    -0x28(%rbp),%rdx
  mov    -0x8(%rbp),%rcx
  mov    -0x10(%rbp),%rax
  add    (%rdx),%rax
  adc    0x8(%rdx),%rax
  adc    0x10(%rdx),%rax
  adc    0x18(%rdx),%rax
  adc    0x20(%rdx),%rax
  adc    0x28(%rdx),%rax
  adc    0x30(%rdx),%rax
  adc    0x38(%rdx),%rax
  adc    %rcx,%rax
  mov    %rax,-0x10(%rbp)
  addq   $0x40,-0x28(%rbp)
  subl   $0x1,-0x18(%rbp)
L141:
  cmpl   $0x0,-0x18(%rbp)
  jne    L40
  andl   $0x7,-0x1c(%rbp)
  jmp    L74
L109:
  mov    -0x28(%rbp),%rdx
  mov    -0x8(%rbp),%rcx
  mov    -0x10(%rbp),%rax
  add    (%rdx),%rax
  adc    %rcx,%rax
  mov    %rax,-0x10(%rbp)
  subl   $0x1,-0x1c(%rbp)
  addq   $0x8,-0x28(%rbp)
L74:
  cmpl   $0x0,-0x1c(%rbp)
  jne    L109
  mov    -0x10(%rbp),%rax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  shr    $0x20,%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <add32_with_carry@plt>
  cltq
  mov    %rax,-0x10(%rbp)
  mov    -0x2c(%rbp),%eax
  and    $0x4,%eax
  test   %eax,%eax
  je     L127
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  add    %rax,-0x10(%rbp)
  addq   $0x4,-0x28(%rbp)
L127:
  mov    -0x2c(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L58
  mov    -0x28(%rbp),%rax
  movzwl (%rax),%eax
  movzwl %ax,%eax
  add    %rax,-0x10(%rbp)
  addq   $0x2,-0x28(%rbp)
L58:
  mov    -0x2c(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L84
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %rax,-0x10(%rbp)
L84:
  mov    -0x10(%rbp),%rax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rax
  shr    $0x20,%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <add32_with_carry@plt>
  cltq
  mov    %rax,-0x10(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  setne  %al
  movzbl %al,%eax
  test   %rax,%rax
  je     L35
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <from32to16@plt>
  cltq
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  shr    $0x8,%rax
  movzbl %al,%edx
  mov    -0x10(%rbp),%rax
  shl    $0x8,%rax
  movzwl %ax,%eax
  or     %rdx,%rax
  mov    %rax,-0x10(%rbp)
L35:
  mov    -0x10(%rbp),%rax
L131:
  leave
  ret
```

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;
}
```