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

```asm
<chksum>:
  endbr64
  mov    %rdi,%rdx
  movslq %esi,%rdi
  lea    -0x2(%rdi),%ecx
  test   %ecx,%ecx
  jle    L87
  lea    -0x3(%rdi),%eax
  cmp    $0xe,%eax
  jbe    L86
  mov    %ecx,%esi
  pxor   %xmm1,%xmm1
  pxor   %xmm2,%xmm2
  mov    %rdx,%rax
  shr    $0x4,%esi
  sub    $0x1,%esi
  shl    $0x4,%rsi
  lea    0x10(%rdx,%rsi,1),%rsi
  nopl   (%rax)
L38:
  movdqu (%rax),%xmm0
  add    $0x10,%rax
  movdqa %xmm0,%xmm3
  punpckhbw %xmm2,%xmm0
  punpcklbw %xmm2,%xmm3
  paddw  %xmm3,%xmm0
  paddw  %xmm0,%xmm1
  cmp    %rsi,%rax
  jne    L38
  movdqa %xmm1,%xmm0
  mov    %ecx,%esi
  psrldq $0x8,%xmm0
  and    $0xfffffff0,%esi
  paddw  %xmm0,%xmm1
  movdqa %xmm1,%xmm0
  psrldq $0x4,%xmm0
  paddw  %xmm0,%xmm1
  movdqa %xmm1,%xmm0
  psrldq $0x2,%xmm0
  paddw  %xmm0,%xmm1
  pextrw $0x0,%xmm1,%eax
  test   $0xf,%cl
  je     L19
L81:
  movslq %esi,%r8
  movzbl (%rdx,%r8,1),%r8d
  add    %r8d,%eax
  lea    0x1(%rsi),%r8d
  cmp    %ecx,%r8d
  jge    L19
  movslq %r8d,%r8
  movzbl (%rdx,%r8,1),%r8d
  add    %r8d,%eax
  lea    0x2(%rsi),%r8d
  cmp    %r8d,%ecx
  jle    L19
  movslq %r8d,%r8
  movzbl (%rdx,%r8,1),%r8d
  add    %r8d,%eax
  lea    0x3(%rsi),%r8d
  cmp    %r8d,%ecx
  jle    L19
  movslq %r8d,%r8
  movzbl (%rdx,%r8,1),%r8d
  add    %r8d,%eax
  lea    0x4(%rsi),%r8d
  cmp    %r8d,%ecx
  jle    L19
  movslq %r8d,%r8
  movzbl (%rdx,%r8,1),%r8d
  add    %r8d,%eax
  lea    0x5(%rsi),%r8d
  cmp    %r8d,%ecx
  jle    L19
  movslq %r8d,%r8
  movzbl (%rdx,%r8,1),%r8d
  add    %r8d,%eax
  lea    0x6(%rsi),%r8d
  cmp    %r8d,%ecx
  jle    L19
  movslq %r8d,%r8
  movzbl (%rdx,%r8,1),%r8d
  add    %r8d,%eax
  lea    0x7(%rsi),%r8d
  cmp    %r8d,%ecx
  jle    L19
  movslq %r8d,%r8
  movzbl (%rdx,%r8,1),%r8d
  add    %r8d,%eax
  lea    0x8(%rsi),%r8d
  cmp    %r8d,%ecx
  jle    L19
  movslq %r8d,%r8
  movzbl (%rdx,%r8,1),%r8d
  add    %r8d,%eax
  lea    0x9(%rsi),%r8d
  cmp    %r8d,%ecx
  jle    L19
  movslq %r8d,%r8
  movzbl (%rdx,%r8,1),%r8d
  add    %r8d,%eax
  lea    0xa(%rsi),%r8d
  cmp    %r8d,%ecx
  jle    L19
  movslq %r8d,%r8
  movzbl (%rdx,%r8,1),%r8d
  add    %r8d,%eax
  lea    0xb(%rsi),%r8d
  cmp    %r8d,%ecx
  jle    L19
  movslq %r8d,%r8
  movzbl (%rdx,%r8,1),%r8d
  add    %r8d,%eax
  lea    0xc(%rsi),%r8d
  cmp    %r8d,%ecx
  jle    L19
  movslq %r8d,%r8
  movzbl (%rdx,%r8,1),%r8d
  add    %r8d,%eax
  lea    0xd(%rsi),%r8d
  cmp    %r8d,%ecx
  jle    L19
  movslq %r8d,%r8
  add    $0xe,%esi
  movzbl (%rdx,%r8,1),%r8d
  add    %r8d,%eax
  cmp    %esi,%ecx
  jle    L19
  movslq %esi,%rsi
  movzbl (%rdx,%rsi,1),%ecx
  add    %ecx,%eax
  nopw   0x0(%rax,%rax,1)
L19:
  mov    %eax,%esi
  shr    $0x8,%si
L88:
  movzbl -0x1(%rdx,%rdi,1),%ecx
  xor    %r8d,%r8d
  cmp    %si,%cx
  jne    L29
  xor    %r8d,%r8d
  cmp    %al,-0x2(%rdx,%rdi,1)
  sete   %r8b
L29:
  mov    %r8d,%eax
  ret
  nopw   0x0(%rax,%rax,1)
L87:
  xor    %esi,%esi
  xor    %eax,%eax
  jmp    L88
L86:
  xor    %eax,%eax
  xor    %esi,%esi
  jmp    L81
```

assistant: ```c
int chksum(const unsigned char *buff, int len) {
  int i;
  unsigned short sum = 0;
  for (i = 0; i < len - 2; i++)
    sum += buff[i];
  return (sum >> 8) == buff[len - 1] && (sum & 0xFF) == buff[len - 2];
}
```