user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<checksum>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x18(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L12
L47:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  add    %eax,-0x18(%rbp)
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x8(%rbp),%rax
  add    $0x5,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0x9,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0xd,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  add    %eax,-0x14(%rbp)
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x8(%rbp),%rax
  add    $0x6,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0xa,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0xe,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  add    %eax,-0x10(%rbp)
  mov    -0x8(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x8(%rbp),%rax
  add    $0x7,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0xb,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%rax
  add    $0xf,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  add    %eax,-0xc(%rbp)
  addq   $0x10,-0x8(%rbp)
  subq   $0x10,-0x30(%rbp)
L12:
  cmpq   $0xf,-0x30(%rbp)
  ja     L47
  jmp    L8
L57:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,-0x18(%rbp)
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,-0x14(%rbp)
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,-0x10(%rbp)
  mov    -0x8(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,-0xc(%rbp)
  addq   $0x4,-0x8(%rbp)
  subq   $0x4,-0x30(%rbp)
L8:
  cmpq   $0x3,-0x30(%rbp)
  ja     L57
  mov    -0x10(%rbp),%eax
  shl    $0x8,%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  shl    $0x10,%eax
  add    %eax,%edx
  mov    -0x18(%rbp),%eax
  shl    $0x18,%eax
  add    %edx,%eax
  add    %eax,-0xc(%rbp)
  cmpq   $0x3,-0x30(%rbp)
  je     L62
  cmpq   $0x3,-0x30(%rbp)
  ja     L32
  cmpq   $0x1,-0x30(%rbp)
  je     L61
  cmpq   $0x2,-0x30(%rbp)
  je     L10
  jmp    L32
L62:
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%eax
  add    %eax,-0xc(%rbp)
L10:
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x10,%eax
  add    %eax,-0xc(%rbp)
L61:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x18,%eax
  add    %eax,-0xc(%rbp)
L32:
  mov    -0xc(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
unsigned int checksum(const char *zIn, size_t N) {
  const unsigned char *z = (const unsigned char *)zIn;
  unsigned sum0 = 0;
  unsigned sum1 = 0;
  unsigned sum2 = 0;
  unsigned sum3 = 0;
  while (N >= 16) {
    sum0 += ((unsigned)z[0] + z[4] + z[8] + z[12]);
    sum1 += ((unsigned)z[1] + z[5] + z[9] + z[13]);
    sum2 += ((unsigned)z[2] + z[6] + z[10] + z[14]);
    sum3 += ((unsigned)z[3] + z[7] + z[11] + z[15]);
    z += 16;
    N -= 16;
  }
  while (N >= 4) {
    sum0 += z[0];
    sum1 += z[1];
    sum2 += z[2];
    sum3 += z[3];
    z += 4;
    N -= 4;
  }
  sum3 += (sum2 << 8) + (sum1 << 16) + (sum0 << 24);
  switch (N) {
  case 3:
    sum3 += (z[2] << 8);
  case 2:
    sum3 += (z[1] << 16);
  case 1:
    sum3 += (z[0] << 24);
  default:;
  }
  return sum3;
}
```