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

```asm
<do_csum>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  movq   $0x0,-0x18(%rbp)
  cmpl   $0x0,-0x2c(%rbp)
  jle    L99
  mov    -0x28(%rbp),%rax
  and    $0x1,%eax
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  je     L57
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%eax
  cltq
  mov    %rax,-0x18(%rbp)
  subl   $0x1,-0x2c(%rbp)
  addq   $0x1,-0x28(%rbp)
L57:
  mov    -0x2c(%rbp),%eax
  sar    %eax
  mov    %eax,-0x20(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  je     L86
  mov    -0x28(%rbp),%rax
  and    $0x2,%eax
  test   %rax,%rax
  je     L72
  mov    -0x28(%rbp),%rax
  movzwl (%rax),%eax
  movzwl %ax,%eax
  add    %rax,-0x18(%rbp)
  subl   $0x1,-0x20(%rbp)
  subl   $0x2,-0x2c(%rbp)
  addq   $0x2,-0x28(%rbp)
L72:
  sarl   -0x20(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  je     L138
  mov    -0x28(%rbp),%rax
  and    $0x4,%eax
  test   %rax,%rax
  je     L22
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  add    %rax,-0x18(%rbp)
  subl   $0x1,-0x20(%rbp)
  subl   $0x4,-0x2c(%rbp)
  addq   $0x4,-0x28(%rbp)
L22:
  sarl   -0x20(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  je     L97
  movq   $0x0,-0x10(%rbp)
L15:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  subl   $0x1,-0x20(%rbp)
  addq   $0x8,-0x28(%rbp)
  mov    -0x10(%rbp),%rax
  add    %rax,-0x18(%rbp)
  mov    -0x8(%rbp),%rax
  add    %rax,-0x18(%rbp)
  mov    -0x8(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  seta   %al
  movzbl %al,%eax
  mov    %rax,-0x10(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  jne    L15
  mov    -0x10(%rbp),%rax
  add    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  shr    $0x20,%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
L97:
  mov    -0x2c(%rbp),%eax
  and    $0x4,%eax
  test   %eax,%eax
  je     L138
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  add    %rax,-0x18(%rbp)
  addq   $0x4,-0x28(%rbp)
L138:
  mov    -0x2c(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L86
  mov    -0x28(%rbp),%rax
  movzwl (%rax),%eax
  movzwl %ax,%eax
  add    %rax,-0x18(%rbp)
  addq   $0x2,-0x28(%rbp)
L86:
  mov    -0x2c(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L63
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %rax,-0x18(%rbp)
L63:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <from64to16@plt>
  mov    %rax,-0x18(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  je     L30
  mov    -0x18(%rbp),%rax
  shr    $0x8,%rax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  shl    $0x8,%rax
  movzwl %ax,%eax
  or     %rdx,%rax
  mov    %rax,-0x18(%rbp)
  jmp    L115
L99:
  nop
  jmp    L115
L30:
  nop
L115:
  mov    -0x18(%rbp),%rax
  leave
  ret
```

assistant: ```c
unsigned long do_csum(const unsigned char *buff, int len) {
  int odd, count;
  unsigned long result = 0;
  if (len <= 0) {
    goto out;
  }
  odd = 1 & (unsigned long)buff;
  if (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) {
      if (4 & (unsigned long)buff) {
        result += *(unsigned int *)buff;
        count--;
        len -= 4;
        buff += 4;
      }
      count >>= 1;
      if (count) {
        unsigned long carry = 0;
        do {
          unsigned long w = *(unsigned long *)buff;
          count--;
          buff += 8;
          result += carry;
          result += w;
          carry = (w > result);
        } while (count);
        result += carry;
        result = (result & 0xffffffff) + (result >> 32);
      }
      if (len & 4) {
        result += *(unsigned int *)buff;
        buff += 4;
      }
    }
    if (len & 2) {
      result += *(unsigned short *)buff;
      buff += 2;
    }
  }
  if (len & 1) {
    result += *buff;
  }
  result = from64to16(result);
  if (odd) {
    result = ((result >> 8) & 0xff) | ((result & 0xff) << 8);
  }
out:
  return result;
}
```