user: Converte this assembly snippet into its equivalent C code:

```asm
<lzo_adler32>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x18(%rbp)
  mov    -0x14(%rbp),%eax
  movzwl %ax,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x14(%rbp),%eax
  shr    $0x10,%eax
  mov    %eax,-0x8(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  jne    L41
  mov    $0x1,%eax
  jmp    L48
L50:
  cmpl   $0x15af,-0x18(%rbp)
  ja     L64
  mov    -0x18(%rbp),%eax
  jmp    L46
L64:
  mov    $0x15b0,%eax
L46:
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  sub    %eax,-0x18(%rbp)
  cmpl   $0xf,-0x4(%rbp)
  jle    L25
L30:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0x5,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0x6,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0x7,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0x8,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0x9,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0xa,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0xb,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0xc,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0xd,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0xe,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0xf,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x8(%rbp)
  addq   $0x10,-0x20(%rbp)
  subl   $0x10,-0x4(%rbp)
  cmpl   $0xf,-0x4(%rbp)
  jg     L30
L25:
  cmpl   $0x0,-0x4(%rbp)
  je     L67
L16:
  mov    -0x20(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x20(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    %eax,-0x8(%rbp)
  subl   $0x1,-0x4(%rbp)
  cmpl   $0x0,-0x4(%rbp)
  jg     L16
L67:
  mov    -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    $0x80078071,%edx
  imul   %rcx,%rdx
  shr    $0x20,%rdx
  shr    $0xf,%edx
  imul   $0xfff1,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,%ecx
  mov    $0x80078071,%edx
  imul   %rcx,%rdx
  shr    $0x20,%rdx
  shr    $0xf,%edx
  imul   $0xfff1,%edx,%edx
  sub    %edx,%eax
  mov    %eax,-0x8(%rbp)
L41:
  cmpl   $0x0,-0x18(%rbp)
  jne    L50
  mov    -0x8(%rbp),%eax
  shl    $0x10,%eax
  or     -0xc(%rbp),%eax
L48:
  pop    %rbp
  ret
```

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