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

```asm
<crypto_aead_decrypt>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rcx,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %rdi,0x18(%rsp)
  lea    0x30(%rsp),%r12
  mov    0xe0(%rsp),%rdi
  mov    %rsi,(%rsp)
  mov    0xd8(%rsp),%rsi
  mov    %r12,%rdx
  mov    %r8,0x8(%rsp)
  mov    %r9,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  call   <acorn128_initialization_32bitversion@plt>
  mov    0xd0(%rsp),%rax
  shr    $0x2,%rax
  je     L118
  mov    0x10(%rsp),%rdi
  lea    0x2c(%rsp),%rbx
  lea    0x28(%rsp),%rbp
  mov    %rdi,%r14
  lea    (%rdi,%rax,4),%r15
  nopl   0x0(%rax,%rax,1)
L88:
  mov    (%r14),%esi
  mov    $0xffffffff,%r9d
  mov    %rbx,%rcx
  mov    %rbp,%rdx
  mov    $0xffffffff,%r8d
  mov    %r12,%rdi
  add    $0x4,%r14
  call   <encrypt_32bits@plt>
  cmp    %r14,%r15
  jne    L88
L6:
  mov    0xd0(%rsp),%rax
  mov    0x10(%rsp),%rdi
  and    $0xfffffffffffffffc,%rax
  lea    (%rdi,%rax,1),%r14
  add    0xd0(%rsp),%rdi
  mov    %rdi,%r15
  cmp    %rax,0xd0(%rsp)
  jbe    L129
  nopl   0x0(%rax,%rax,1)
L21:
  movzbl (%r14),%esi
  mov    $0xff,%r9d
  mov    %rbx,%rcx
  mov    %rbp,%rdx
  mov    $0xff,%r8d
  mov    %r12,%rdi
  add    $0x1,%r14
  mov    %esi,0x24(%rsp)
  call   <encrypt_8bits@plt>
  cmp    %r14,%r15
  jne    L21
L129:
  xor    %r15d,%r15d
  xchg   %ax,%ax
L35:
  xor    %esi,%esi
  test   %r15,%r15
  mov    $0xffffffff,%r9d
  mov    %rbx,%rcx
  sete   %sil
  cmp    $0x4,%r15
  mov    %rbp,%rdx
  mov    %r12,%rdi
  sbb    %r8d,%r8d
  add    $0x1,%r15
  mov    %esi,0x24(%rsp)
  call   <encrypt_32bits@plt>
  cmp    $0x8,%r15
  jne    L35
  mov    0x8(%rsp),%rax
  mov    (%rsp),%rdi
  sub    $0x10,%rax
  mov    %rax,%rcx
  mov    %rax,(%rdi)
  shr    $0x2,%rcx
  je     L2
  mov    0x18(%rsp),%r14
  mov    %rbp,0x10(%rsp)
  xor    %r15d,%r15d
  mov    %rbx,%rbp
  mov    %rdi,%rbx
  xchg   %ax,%ax
L80:
  mov    0x0(%r13,%r15,4),%edx
  mov    %r14,%rsi
  xor    %r9d,%r9d
  mov    %rbp,%rcx
  mov    $0xffffffff,%r8d
  mov    %r12,%rdi
  add    $0x1,%r15
  add    $0x4,%r14
  call   <decrypt_32bits@plt>
  mov    (%rbx),%rax
  mov    %rax,%rdx
  shr    $0x2,%rdx
  cmp    %r15,%rdx
  ja     L80
  mov    %rbp,%rbx
  mov    0x10(%rsp),%rbp
L2:
  mov    %rax,%r14
  lea    0x24(%rsp),%r15
  and    $0xfffffffffffffffc,%r14
  cmp    %rax,%r14
  jae    L60
  mov    %rbp,0x10(%rsp)
  mov    0x18(%rsp),%rbp
  cs nopw 0x0(%rax,%rax,1)
L87:
  movzbl 0x0(%r13,%r14,1),%edx
  xor    %r9d,%r9d
  mov    %rbx,%rcx
  mov    %r15,%rsi
  mov    $0xff,%r8d
  mov    %r12,%rdi
  mov    %edx,0x28(%rsp)
  call   <decrypt_8bits@plt>
  mov    0x24(%rsp),%eax
  mov    %al,0x0(%rbp,%r14,1)
  mov    (%rsp),%rax
  add    $0x1,%r14
  cmp    %r14,(%rax)
  ja     L87
  mov    0x10(%rsp),%rbp
L60:
  xor    %r14d,%r14d
  nop
L85:
  xor    %esi,%esi
  test   %r14,%r14
  mov    %rbx,%rcx
  mov    %rbp,%rdx
  sete   %sil
  xor    %r9d,%r9d
  cmp    $0x4,%r14
  mov    %r12,%rdi
  sbb    %r8d,%r8d
  add    $0x1,%r14
  mov    %esi,0x24(%rsp)
  call   <encrypt_32bits@plt>
  cmp    $0x8,%r14
  jne    L85
  mov    (%rsp),%rax
  lea    0x70(%rsp),%rbx
  mov    %r12,%r8
  mov    $0x10,%edx
  mov    0xd0(%rsp),%rsi
  mov    %rbx,%rcx
  mov    (%rax),%rdi
  call   <acorn128_tag_generation_32bits_version@plt>
  mov    0x8(%rsp),%rdi
  xor    %ecx,%ecx
  xor    %eax,%eax
  lea    0x0(%r13,%rdi,1),%rsi
  nopl   0x0(%rax)
L1:
  movzbl -0x10(%rsi,%rax,1),%edx
  xor    (%rbx,%rax,1),%dl
  add    $0x1,%rax
  or     %edx,%ecx
  cmp    $0x10,%rax
  jne    L1
  neg    %cl
  sbb    %eax,%eax
  mov    0x88(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L75
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L118:
  lea    0x2c(%rsp),%rbx
  lea    0x28(%rsp),%rbp
  jmp    L6
L75:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int crypto_aead_decrypt(unsigned char *m, unsigned long long *mlen, unsigned char *nsec, const unsigned char *c, unsigned long long clen, const unsigned char *ad, unsigned long long adlen, const unsigned char *npub, const unsigned char *k) {
  unsigned long long i;
  unsigned char tag[16], check = 0;
  unsigned int plaintextword, ciphertextword, ksword;
  unsigned long long state[7];
  unsigned int ca, cb;
  acorn128_initialization_32bitversion(k, npub, state);
  ca = 0xffffffff;
  cb = 0xffffffff;
  for (i = 0; i < adlen / 4; i = i + 1) {
    encrypt_32bits(state, ((unsigned int *)ad)[i], &ciphertextword, &ksword, ca, cb);
  }
  for (i = adlen & 0xfffffffffffffffcULL; i < adlen; i++) {
    ca = 0xff;
    cb = 0xff;
    plaintextword = ad[i];
    encrypt_8bits(state, plaintextword, &ciphertextword, &ksword, ca, cb);
  }
  for (i = 0; i < 256 / 32; i++) {
    if (i == 0)
      plaintextword = 0x1;
    else
      plaintextword = 0;
    if (i < 128 / 32)
      ca = 0xffffffff;
    else
      ca = 0;
    cb = 0xffffffff;
    encrypt_32bits(state, plaintextword, &ciphertextword, &ksword, ca, cb);
  }
  ca = 0xffffffff;
  cb = 0;
  *mlen = clen - 16;
  for (i = 0; i < *mlen / 4; i = i + 1) {
    decrypt_32bits(state, &(((unsigned int *)m)[i]), ((unsigned int *)c)[i], &ksword, ca, cb);
  }
  for (i = *mlen & 0xfffffffffffffffcULL; i < *mlen; i++) {
    ca = 0xff;
    cb = 0x0;
    ciphertextword = c[i];
    decrypt_8bits(state, &plaintextword, ciphertextword, &ksword, ca, cb);
    m[i] = plaintextword;
  }
  for (i = 0; i < 256 / 32; i++) {
    if (i == 0)
      plaintextword = 0x1;
    else
      plaintextword = 0;
    if (i < 128 / 32)
      ca = 0xffffffff;
    else
      ca = 0;
    cb = 0;
    encrypt_32bits(state, plaintextword, &ciphertextword, &ksword, ca, cb);
  }
  acorn128_tag_generation_32bits_version(*mlen, adlen, 16, tag, state);
  for (i = 0; i < 16; i++)
    check |= (tag[i] ^ c[clen - 16 + i]);
  if (check == 0)
    return 0;
  else
    return -1;
}
```