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    L27
  mov    -0x28(%rbp),%rax
  and    $0x1,%eax
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  je     L76
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%eax
  cltq
  add    %rax,-0x18(%rbp)
  subl   $0x1,-0x2c(%rbp)
  addq   $0x1,-0x28(%rbp)
L76:
  mov    -0x2c(%rbp),%eax
  sar    %eax
  mov    %eax,-0x20(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  je     L19
  mov    -0x28(%rbp),%rax
  and    $0x2,%eax
  test   %rax,%rax
  je     L39
  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)
L39:
  sarl   -0x20(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  je     L57
  movq   $0x0,-0x10(%rbp)
L84:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,%eax
  mov    %rax,-0x8(%rbp)
  subl   $0x1,-0x20(%rbp)
  addq   $0x4,-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    L84
  mov    -0x10(%rbp),%rax
  add    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movzwl %ax,%edx
  mov    -0x18(%rbp),%rax
  shr    $0x10,%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
L57:
  mov    -0x2c(%rbp),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L19
  mov    -0x28(%rbp),%rax
  movzwl (%rax),%eax
  movzwl %ax,%eax
  add    %rax,-0x18(%rbp)
  addq   $0x2,-0x28(%rbp)
L19:
  mov    -0x2c(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L92
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%eax
  cltq
  add    %rax,-0x18(%rbp)
L92:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <from32to16@plt>
  mov    %rax,-0x18(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  je     L70
  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    L79
L27:
  nop
  jmp    L79
L70:
  nop
L79:
  mov    -0x18(%rbp),%rax
  leave
  ret
```

assistant: ```c
unsigned int 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) {
      unsigned long carry = 0;
      do {
        unsigned long w = *(unsigned int *)buff;
        count--;
        buff += 4;
        result += carry;
        result += w;
        carry = (w > result);
      } while (count);
      result += carry;
      result = (result & 0xffff) + (result >> 16);
    }
    if (len & 2) {
      result += *(unsigned short *)buff;
      buff += 2;
    }
  }
  if (len & 1) {
    result += (*buff << 8);
  }
  result = from32to16(result);
  if (odd) {
    result = ((result >> 8) & 0xff) | ((result & 0xff) << 8);
  }
out:
  return result;
}
```