user: 请将以下的汇编代码转换成C语言代码：

```asm
<AEAD_TGEN>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    %rdi,(%rsp)
  mov    %rsi,0x8(%rsp)
  mov    %rdx,%r15
  mov    %rcx,0x48(%rsp)
  mov    %r8,%r12
  mov    %r9,0x28(%rsp)
  mov    0x110(%rsp),%rax
  mov    %rax,0x30(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  mov    %ecx,%eax
  and    $0x1f,%eax
  mov    %eax,0x20(%rsp)
  shr    $0x5,%rcx
  cmp    $0x1,%eax
  sbb    $0xffffffffffffffff,%rcx
  mov    %rcx,%rsi
  lea    0xa0(%rsp),%rax
  mov    %rax,0x18(%rsp)
  lea    0xc0(%rsp),%rbx
L126:
  movb   $0x0,(%rax)
  add    $0x1,%rax
  cmp    %rbx,%rax
  jne    L126
  lea    0x53(%rsp),%rax
  lea    0x60(%rsp),%rdx
L278:
  movb   $0x0,(%rax)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L278
  mov    %r15,%r13
  mov    $0x1,%r14d
  lea    0x53(%rsp),%rax
  mov    %rax,0x10(%rsp)
  cmp    $0x1,%rsi
  jbe    L8
  mov    %r15,0x38(%rsp)
  mov    0x18(%rsp),%r15
  mov    %r12,0x40(%rsp)
  mov    %rsi,%r12
L193:
  mov    $0x0,%eax
L169:
  movzbl 0x0(%r13,%rax,1),%edx
  mov    %dl,0x60(%rsp,%rax,1)
  add    $0x1,%rax
  cmp    $0x20,%rax
  jne    L169
  sub    $0x8,%rsp
  lea    0x88(%rsp),%rbp
  push   %rbp
  lea    0x70(%rsp),%r9
  mov    $0x0,%r8d
  mov    %r14d,%ecx
  mov    0x20(%rsp),%rdx
  mov    $0x0,%esi
  mov    0x10(%rsp),%rdi
  call   <TEM_ENC@plt>
  add    $0x10,%rsp
  mov    %r15,%rax
L285:
  movzbl 0x0(%rbp),%edx
  xor    %dl,(%rax)
  add    $0x1,%rax
  add    $0x1,%rbp
  cmp    %rbx,%rax
  jne    L285
  lea    0x1(%r14),%rcx
  add    $0x20,%r13
  cmp    %rcx,%r12
  je     L150
  mov    %rcx,%r14
  jmp    L193
L150:
  mov    0x38(%rsp),%r15
  mov    0x40(%rsp),%r12
  shl    $0x5,%r14
  add    %r14,%r15
L266:
  cmpl   $0x0,0x20(%rsp)
  jne    L248
  mov    $0x0,%eax
  cmpq   $0x0,0x48(%rsp)
  je     L248
L132:
  movzbl (%r15,%rax,1),%edx
  mov    %dl,0x60(%rsp,%rax,1)
  add    $0x1,%rax
  cmp    $0x20,%rax
  jne    L132
L176:
  lea    0x60(%rsp),%rax
  lea    0x80(%rsp),%rdi
  mov    0x18(%rsp),%rdx
L134:
  movzbl (%rdx),%esi
  xor    %sil,(%rax)
  add    $0x1,%rax
  add    $0x1,%rdx
  cmp    %rdi,%rax
  jne    L134
  cmpl   $0x0,0x20(%rsp)
  jne    L243
  sub    $0x1,%ecx
  lea    0x53(%rsp),%rdx
  sub    $0x8,%rsp
  lea    0x88(%rsp),%rax
  push   %rax
  lea    0x70(%rsp),%r9
  mov    $0x1,%r8d
  mov    $0x0,%esi
  mov    0x10(%rsp),%rdi
  call   <TEM_ENC@plt>
  add    $0x10,%rsp
L22:
  mov    $0x0,%eax
L118:
  movzbl 0x80(%rsp,%rax,1),%edx
  mov    %dl,0xa0(%rsp,%rax,1)
  add    $0x1,%rax
  cmp    $0x20,%rax
  jne    L118
  jmp    L24
L8:
  cmp    $0x1,%rsi
  je     L151
L24:
  mov    0x28(%rsp),%rax
  mov    %rax,%rdi
  shr    $0x5,%rdi
  mov    %rdi,0x10(%rsp)
  mov    %r12,%rbp
  mov    %rdi,%r14
  mov    $0x2,%r13d
  lea    0x80(%rsp),%r15
  mov    $0x1,%esi
  cmp    $0x3f,%rax
  jbe    L141
  mov    %r12,0x20(%rsp)
  mov    0x18(%rsp),%r12
L161:
  mov    $0x0,%eax
L211:
  movzbl 0x0(%rbp,%rax,1),%edx
  mov    %dl,0x60(%rsp,%rax,1)
  add    $0x1,%rax
  cmp    $0x20,%rax
  jne    L211
  sub    $0x8,%rsp
  push   %r15
  lea    0x70(%rsp),%r9
  mov    $0x0,%r8d
  mov    %r13d,%ecx
  mov    0x18(%rsp),%rdx
  mov    $0x40,%esi
  mov    0x10(%rsp),%rdi
  call   <TEM_ENC@plt>
  mov    %r15,%rdx
  add    $0x10,%rsp
  mov    %r12,%rax
L276:
  movzbl (%rdx),%ecx
  xor    %cl,(%rax)
  add    $0x1,%rax
  add    $0x1,%rdx
  cmp    %rbx,%rax
  jne    L276
  sub    $0x1,%r14
  add    $0x20,%rbp
  add    $0x2,%r13d
  cmp    $0x1,%r14
  ja     L161
  mov    0x20(%rsp),%r12
  mov    0x10(%rsp),%rdi
  cmp    $0x1,%rdi
  mov    $0x2,%esi
  cmovne %rdi,%rsi
  lea    -0x1(%rdi),%rax
  shl    $0x5,%rax
  cmp    $0x1,%rdi
  mov    $0x20,%edx
  cmove  %rdx,%rax
  add    %rax,%r12
L141:
  mov    $0x0,%eax
  lea    0xa0(%rsp),%rcx
L95:
  movzbl (%r12,%rax,1),%edx
  xor    (%rax,%rcx,1),%dl
  mov    %dl,0x60(%rsp,%rax,1)
  add    $0x1,%rax
  cmp    $0x20,%rax
  jne    L95
  lea    -0x1(%rsi,%rsi,1),%ecx
  sub    $0x8,%rsp
  lea    0x88(%rsp),%rax
  push   %rax
  lea    0x70(%rsp),%r9
  mov    $0x1,%r8d
  mov    0x18(%rsp),%rdx
  mov    $0x40,%esi
  mov    0x10(%rsp),%rdi
  call   <TEM_ENC@plt>
  add    $0x10,%rsp
  mov    $0x0,%eax
  mov    0x30(%rsp),%rcx
L171:
  movzbl 0x80(%rsp,%rax,1),%edx
  mov    %dl,(%rcx,%rax,1)
  add    $0x1,%rax
  cmp    $0x10,%rax
  jne    L171
  mov    0xc8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L233
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L151:
  mov    %rsi,%rcx
  jmp    L266
L248:
  mov    0x20(%rsp),%edi
  mov    %edi,%esi
  mov    $0x0,%eax
  test   %edi,%edi
  jle    L170
L72:
  movzbl (%r15,%rax,1),%edx
  mov    %dl,0x60(%rsp,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%rsi
  jne    L72
L170:
  mov    0x20(%rsp),%esi
  movslq %esi,%rax
  movb   $0x80,0x60(%rsp,%rax,1)
  lea    0x1(%rsi),%eax
  cmp    $0x1f,%eax
  jg     L176
  cltq
L267:
  movb   $0x0,0x60(%rsp,%rax,1)
  add    $0x1,%rax
  cmp    $0x1f,%eax
  jle    L267
  jmp    L176
L243:
  sub    $0x1,%ecx
  lea    0x53(%rsp),%rdx
  sub    $0x8,%rsp
  lea    0x88(%rsp),%rax
  push   %rax
  lea    0x70(%rsp),%r9
  mov    $0x2,%r8d
  mov    $0x0,%esi
  mov    0x10(%rsp),%rdi
  call   <TEM_ENC@plt>
  add    $0x10,%rsp
  jmp    L22
L233:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void AEAD_TGEN(const unsigned char *_K, const unsigned char *_N, const unsigned char *_A, unsigned long long _alen, const unsigned char *_C, unsigned long long _clen, unsigned char *tag_) {
  int d, pad;
  unsigned long long i, j, blocknum;
  const unsigned char *ap, *cp;
  unsigned char in[32], out[32], t[32], zero[13];
  i = 1;
  j = 1;
  ap = _A;
  cp = _C;
  pad = _alen % 32;
  blocknum = _alen / 32;
  if (pad != 0)
    blocknum += 1;
  do {
    int u;
    for (u = 0; u < 32; u++)
      t[u] = 0x00;
  } while (0);
  do {
    int u;
    for (u = 0; u < 13; u++)
      zero[u] = 0x00;
  } while (0);
  while (blocknum > 1) {
    do {
      int u;
      for (u = 0; u < 32; u++)
        in[u] = ap[u];
    } while (0);
    TEM_ENC(_K, 0x00, zero, i, 0, in, out);
    do {
      int u;
      for (u = 0; u < 32; u++)
        t[u] ^= out[u];
    } while (0);
    i++;
    blocknum--;
    ap += 32;
  }
  if (blocknum == 1) {
    if ((pad == 0) && (_alen != 0)) {
      do {
        int u;
        for (u = 0; u < 32; u++)
          in[u] = ap[u];
      } while (0);
    } else {
      do {
        int u;
        for (u = 0; u < pad; u++)
          in[u] = ap[u];
      } while (0);
      in[pad] = 0x80;
      for (d = pad + 1; d < 32; d++)
        in[d] = 0x00;
    }
    do {
      int u;
      for (u = 0; u < 32; u++)
        in[u] ^= t[u];
    } while (0);
    if (pad == 0) {
      TEM_ENC(_K, 0x00, zero, i - 1, 1, in, out);
    } else {
      TEM_ENC(_K, 0x00, zero, i - 1, 2, in, out);
    }
    do {
      int u;
      for (u = 0; u < 32; u++)
        t[u] = out[u];
    } while (0);
  }
  i = 1;
  blocknum = _clen / 32;
  while (blocknum > 1) {
    do {
      int u;
      for (u = 0; u < 32; u++)
        in[u] = cp[u];
    } while (0);
    TEM_ENC(_K, 0x40, _N, 2 * i, 0, in, out);
    do {
      int u;
      for (u = 0; u < 32; u++)
        t[u] ^= out[u];
    } while (0);
    i++;
    blocknum--;
    cp += 32;
  }
  for (d = 0; d < 32; d++)
    in[d] = cp[d] ^ t[d];
  TEM_ENC(_K, 0x40, _N, 2 * i - 1, 1, in, out);
  do {
    int u;
    for (u = 0; u < 16; u++)
      tag_[u] = out[u];
  } while (0);
}
```