user: Translate the below assembly code into C programming language:

```asm
<xdl_adler32>:
  endbr64
  push   %r15
  movzwl %di,%r15d
  shr    $0x10,%rdi
  push   %r14
  movzwl %di,%eax
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edx,-0xc(%rsp)
  mov    %rax,-0x20(%rsp)
  test   %rsi,%rsi
  je     L59
  test   %edx,%edx
  je     L35
  nopl   0x0(%rax,%rax,1)
L53:
  mov    -0xc(%rsp),%ebx
  mov    $0x15b0,%eax
  cmp    %eax,%ebx
  mov    %ebx,%ecx
  cmovbe %ebx,%eax
  sub    %eax,%ebx
  mov    %eax,%edx
  mov    %ebx,-0xc(%rsp)
  cmp    $0xf,%ecx
  jbe    L48
  sub    $0x10,%eax
  mov    %eax,-0x4(%rsp)
  shr    $0x4,%eax
  mov    %eax,-0x8(%rsp)
  add    $0x1,%eax
  shl    $0x4,%rax
  add    %rsi,%rax
  mov    %rax,-0x18(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L77:
  movzbl (%rsi),%eax
  movzbl 0x1(%rsi),%r14d
  add    $0x10,%rsi
  movzbl -0xe(%rsi),%r13d
  movzbl -0xd(%rsi),%r12d
  add    %r15,%rax
  movzbl -0xc(%rsi),%ebp
  movzbl -0xb(%rsi),%ebx
  add    %rax,%r14
  movzbl -0xa(%rsi),%r11d
  movzbl -0x9(%rsi),%edx
  add    %r14,%r13
  add    %r14,%rax
  movzbl -0x7(%rsi),%r10d
  movzbl -0x6(%rsi),%r9d
  add    %r13,%r12
  add    %r13,%rax
  movzbl -0x5(%rsi),%r8d
  movzbl -0x3(%rsi),%ecx
  add    %r12,%rbp
  add    %r12,%rax
  movzbl -0x1(%rsi),%r15d
  add    %rbp,%rbx
  add    %rbp,%rax
  add    %rbx,%r11
  add    %rbx,%rax
  lea    (%rdx,%r11,1),%rdi
  movzbl -0x8(%rsi),%edx
  add    %r11,%rax
  mov    %rdi,-0x30(%rsp)
  add    -0x30(%rsp),%rax
  add    %rdi,%rdx
  movzbl -0x4(%rsi),%edi
  add    %rdx,%r10
  mov    %rdx,-0x28(%rsp)
  add    -0x28(%rsp),%rax
  add    %r10,%r9
  add    %r10,%rax
  movzbl -0x2(%rsi),%edx
  add    %r9,%r8
  add    %r9,%rax
  add    %r8,%rdi
  add    %r8,%rax
  add    %rdi,%rcx
  add    %rdi,%rax
  add    %rcx,%rdx
  add    %rcx,%rax
  add    %rdx,%r15
  add    %rdx,%rax
  add    %r15,%rax
  add    %rax,-0x20(%rsp)
  cmp    -0x18(%rsp),%rsi
  jne    L77
  mov    -0x8(%rsp),%eax
  mov    -0x4(%rsp),%edx
  shl    $0x4,%eax
  sub    %eax,%edx
  jne    L25
L47:
  movabs $0xf00e10d2fc5cd,%rax
  mov    -0x20(%rsp),%rcx
  mul    %r15
  mov    %r15,%rax
  sub    %rdx,%rax
  shr    %rax
  add    %rax,%rdx
  movabs $0xf00e10d2fc5cd,%rax
  shr    $0xf,%rdx
  imul   $0xfff1,%rdx,%rdx
  sub    %rdx,%r15
  mul    %rcx
  mov    %rcx,%rax
  sub    %rdx,%rax
  shr    %rax
  add    %rax,%rdx
  mov    -0xc(%rsp),%eax
  shr    $0xf,%rdx
  imul   $0xfff1,%rdx,%rdx
  sub    %rdx,%rcx
  mov    %rcx,-0x20(%rsp)
  test   %eax,%eax
  jne    L53
L35:
  mov    -0x20(%rsp),%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  shl    $0x10,%rax
  pop    %r13
  pop    %r14
  or     %r15,%rax
  pop    %r15
  ret
  nopl   (%rax)
L48:
  mov    %rsi,-0x18(%rsp)
L25:
  mov    -0x18(%rsp),%rax
  movslq %edx,%rdx
  lea    (%rax,%rdx,1),%rsi
  mov    -0x20(%rsp),%rdx
  xchg   %ax,%ax
L21:
  movzbl (%rax),%ecx
  add    $0x1,%rax
  add    %rcx,%r15
  add    %r15,%rdx
  cmp    %rsi,%rax
  jne    L21
  mov    %rdx,-0x20(%rsp)
  jmp    L47
L59:
  pop    %rbx
  mov    $0x1,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
unsigned long xdl_adler32(unsigned long adler, unsigned char const *buf, unsigned int len) {
  int k;
  unsigned long s1 = adler & 0xffff;
  unsigned long s2 = (adler >> 16) & 0xffff;
  if (!buf)
    return 1;
  while (len > 0) {
    k = len < 5552 ? len : 5552;
    len -= k;
    while (k >= 16) {
      {
        s1 += buf[0];
        s2 += s1;
      };
      {
        s1 += buf[0 + 1];
        s2 += s1;
      };
      ;
      {
        s1 += buf[0 + 2];
        s2 += s1;
      };
      {
        s1 += buf[0 + 2 + 1];
        s2 += s1;
      };
      ;
      ;
      {
        s1 += buf[0 + 4];
        s2 += s1;
      };
      {
        s1 += buf[0 + 4 + 1];
        s2 += s1;
      };
      ;
      {
        s1 += buf[0 + 4 + 2];
        s2 += s1;
      };
      {
        s1 += buf[0 + 4 + 2 + 1];
        s2 += s1;
      };
      ;
      ;
      ;
      {
        s1 += buf[8];
        s2 += s1;
      };
      {
        s1 += buf[8 + 1];
        s2 += s1;
      };
      ;
      {
        s1 += buf[8 + 2];
        s2 += s1;
      };
      {
        s1 += buf[8 + 2 + 1];
        s2 += s1;
      };
      ;
      ;
      {
        s1 += buf[8 + 4];
        s2 += s1;
      };
      {
        s1 += buf[8 + 4 + 1];
        s2 += s1;
      };
      ;
      {
        s1 += buf[8 + 4 + 2];
        s2 += s1;
      };
      {
        s1 += buf[8 + 4 + 2 + 1];
        s2 += s1;
      };
      ;
      ;
      ;
      ;
      buf += 16;
      k -= 16;
    }
    if (k != 0)
      do {
        s1 += *buf++;
        s2 += s1;
      } while (--k);
    s1 %= 65521L;
    s2 %= 65521L;
  }
  return (s2 << 16) | s1;
}
```