user: What is the c source code of the assembly code below:

```asm
<AEAD_TGEN>:
  endbr64
  push   %r15
  pxor   %xmm0,%xmm0
  mov    %r8,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xe8,%rsp
  mov    0x120(%rsp),%rax
  mov    %rcx,0x58(%rsp)
  mov    %rsi,0x18(%rsp)
  mov    %rdx,0x38(%rsp)
  mov    %r9,0x40(%rsp)
  mov    %rax,0x48(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xd8(%rsp)
  mov    %ecx,%eax
  shr    $0x5,%rcx
  movb   $0x0,0x6f(%rsp)
  movq   $0x0,0x63(%rsp)
  movl   $0x0,0x6b(%rsp)
  movaps %xmm0,0xb0(%rsp)
  movaps %xmm0,0xc0(%rsp)
  and    $0x1f,%eax
  cmp    $0x1,%eax
  mov    %eax,0x30(%rsp)
  sbb    $0xffffffffffffffff,%rcx
  mov    %rcx,0x28(%rsp)
  cmp    $0x1,%rcx
  jbe    L31
  mov    %r8,0x50(%rsp)
  lea    0x70(%rsp),%rbp
  mov    %rdx,%r14
  lea    0x90(%rsp),%r13
  lea    0xb0(%rsp),%r12
  mov    $0x1,%r10d
  lea    0x63(%rsp),%rdx
  mov    %rbp,%r9
  mov    %r12,0x20(%rsp)
  mov    %r10,%r15
  mov    %r13,%r12
  mov    %rdi,%rbp
  lea    0xd0(%rsp),%rbx
  mov    %rdx,%r13
  nopl   0x0(%rax,%rax,1)
L138:
  movdqu (%r14),%xmm1
  movdqu 0x10(%r14),%xmm2
  mov    %r15d,%ecx
  xor    %esi,%esi
  sub    $0x8,%rsp
  mov    %r13,%rdx
  xor    %r8d,%r8d
  mov    %rbp,%rdi
  movaps %xmm1,0x78(%rsp)
  movaps %xmm2,0x88(%rsp)
  push   %r12
  mov    %r9,0x10(%rsp)
  call   <TEM_ENC@plt>
  mov    0x30(%rsp),%rax
  pop    %rcx
  mov    %r12,%rdx
  pop    %rsi
  mov    (%rsp),%r9
  nopl   0x0(%rax)
L191:
  movzbl (%rdx),%ecx
  xor    %cl,(%rax)
  add    $0x1,%rax
  add    $0x1,%rdx
  cmp    %rbx,%rax
  jne    L191
  lea    0x1(%r15),%rax
  add    $0x20,%r14
  cmp    %rax,0x28(%rsp)
  je     L30
  mov    %rax,%r15
  jmp    L138
L30:
  mov    %r15,%r10
  mov    %r13,%rdx
  mov    0x50(%rsp),%r15
  mov    %r12,%r13
  mov    %r10,%rcx
  mov    0x20(%rsp),%r12
  mov    %rbp,%rdi
  mov    %r9,%rbp
  shl    $0x5,%rcx
  add    %rcx,0x38(%rsp)
L140:
  mov    0x30(%rsp),%ebx
  test   %ebx,%ebx
  jne    L328
  cmpq   $0x0,0x58(%rsp)
  je     L143
  mov    0x38(%rsp),%rsi
  movdqu (%rsi),%xmm6
  movaps %xmm6,(%rsp)
  movaps %xmm6,0x70(%rsp)
  movdqu 0x10(%rsi),%xmm6
  movaps %xmm6,0x80(%rsp)
L307:
  mov    %rbp,%rcx
  mov    %r12,%rsi
L284:
  movzbl (%rsi),%r8d
  xor    %r8b,(%rcx)
  add    $0x1,%rcx
  add    $0x1,%rsi
  cmp    %rcx,%r13
  jne    L284
  mov    0x30(%rsp),%r9d
  lea    -0x1(%rax),%ecx
  test   %r9d,%r9d
  jne    L261
  sub    $0x8,%rsp
  mov    %rbp,%r9
  mov    $0x1,%r8d
  push   %r13
L330:
  xor    %esi,%esi
  mov    %rdi,0x10(%rsp)
  call   <TEM_ENC@plt>
  pop    %rdi
  pop    %r8
  movdqa 0x90(%rsp),%xmm7
  mov    (%rsp),%rdi
  movdqa 0xa0(%rsp),%xmm6
  movaps %xmm7,0xb0(%rsp)
  movaps %xmm6,0xc0(%rsp)
L166:
  mov    0x40(%rsp),%rax
  mov    $0x1,%ecx
  mov    %rax,%rsi
  shr    $0x5,%rsi
  mov    %rsi,0x28(%rsp)
  cmp    $0x3f,%rax
  jbe    L168
  mov    0x28(%rsp),%rax
  mov    %r15,0x30(%rsp)
  mov    $0x2,%ecx
  lea    0xd0(%rsp),%rbx
  mov    %r12,(%rsp)
  mov    %ecx,%r14d
  mov    %rbp,%r12
  mov    %rdi,%rbp
  shl    $0x5,%rax
  lea    -0x20(%r15,%rax,1),%rax
  mov    %rax,0x20(%rsp)
  nopl   0x0(%rax,%rax,1)
L107:
  movdqu (%r15),%xmm3
  sub    $0x8,%rsp
  mov    %r14d,%ecx
  mov    %r12,%r9
  movdqu 0x10(%r15),%xmm4
  mov    $0x40,%esi
  xor    %r8d,%r8d
  mov    %rbp,%rdi
  movaps %xmm3,0x78(%rsp)
  movaps %xmm4,0x88(%rsp)
  push   %r13
  mov    0x28(%rsp),%rdx
  call   <TEM_ENC@plt>
  mov    0x10(%rsp),%rax
  mov    %r13,%rdx
  pop    %rcx
  pop    %rsi
  nopl   0x0(%rax,%rax,1)
L200:
  movzbl (%rdx),%ecx
  xor    %cl,(%rax)
  add    $0x1,%rax
  add    $0x1,%rdx
  cmp    %rbx,%rax
  jne    L200
  add    $0x20,%r15
  add    $0x2,%r14d
  cmp    %r15,0x20(%rsp)
  jne    L107
  mov    0x28(%rsp),%rsi
  mov    0x30(%rsp),%r15
  mov    %rbp,%rdi
  mov    %r12,%rbp
  mov    (%rsp),%r12
  lea    -0x1(%rsi),%rax
  lea    -0x1(%rsi,%rsi,1),%ecx
  shl    $0x5,%rax
  add    %rax,%r15
L168:
  xor    %eax,%eax
  xchg   %ax,%ax
L102:
  movzbl (%r15,%rax,1),%edx
  xor    (%r12,%rax,1),%dl
  mov    %dl,0x0(%rbp,%rax,1)
  add    $0x1,%rax
  cmp    $0x20,%rax
  jne    L102
  sub    $0x8,%rsp
  mov    %rbp,%r9
  mov    $0x1,%r8d
  mov    $0x40,%esi
  push   %r13
  mov    0x28(%rsp),%rdx
  call   <TEM_ENC@plt>
  mov    0x58(%rsp),%rax
  movdqa 0xa0(%rsp),%xmm5
  movups %xmm5,(%rax)
  pop    %rax
  pop    %rdx
  mov    0xd8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L142
  add    $0xe8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L143:
  mov    0x30(%rsp),%r11d
  test   %r11d,%r11d
  je     L279
L328:
  mov    0x38(%rsp),%r10
  mov    0x30(%rsp),%ebx
  mov    %rbp,%rsi
  mov    %r10,%rcx
  cmp    $0x8,%ebx
  jae    L232
L165:
  xor    %r8d,%r8d
  testb  $0x4,0x30(%rsp)
  je     L323
  mov    (%rcx),%r8d
  mov    %r8d,(%rsi)
  mov    $0x4,%r8d
L323:
  testb  $0x2,0x30(%rsp)
  je     L52
  movzwl (%rcx,%r8,1),%r9d
  mov    %r9w,(%rsi,%r8,1)
  add    $0x2,%r8
L52:
  testb  $0x1,0x30(%rsp)
  je     L279
  movzbl (%rcx,%r8,1),%ecx
  mov    %cl,(%rsi,%r8,1)
L279:
  movslq 0x30(%rsp),%rcx
  movb   $0x80,0x70(%rsp,%rcx,1)
  lea    0x1(%rcx),%esi
  cmp    $0x1f,%ecx
  je     L307
  mov    $0x1f,%ecx
  movslq %esi,%rsi
  sub    0x30(%rsp),%ecx
  xor    %r9d,%r9d
  add    %rbp,%rsi
  cmp    $0x8,%ecx
  jae    L263
  test   $0x4,%cl
  jne    L79
  test   %ecx,%ecx
  je     L307
  movb   $0x0,(%rsi)
  test   $0x2,%cl
  je     L307
  xor    %r10d,%r10d
  mov    %r10w,-0x2(%rsi,%rcx,1)
  jmp    L307
  cs nopw 0x0(%rax,%rax,1)
L261:
  sub    $0x8,%rsp
  mov    %rbp,%r9
  mov    $0x2,%r8d
  push   %r13
  jmp    L330
L31:
  je     L50
  lea    0x70(%rsp),%rbp
  lea    0x90(%rsp),%r13
  lea    0xb0(%rsp),%r12
  jmp    L166
L263:
  mov    %ecx,%r8d
  movq   $0x0,(%rsi)
  movq   $0x0,-0x8(%rsi,%r8,1)
  lea    0x8(%rsi),%r8
  and    $0xfffffffffffffff8,%r8
  sub    %r8,%rsi
  add    %esi,%ecx
  and    $0xfffffff8,%ecx
  cmp    $0x8,%ecx
  jb     L307
  and    $0xfffffff8,%ecx
  xor    %esi,%esi
L56:
  mov    %esi,%r10d
  add    $0x8,%esi
  mov    %r9,(%r8,%r10,1)
  cmp    %ecx,%esi
  jb     L56
  jmp    L307
L232:
  and    $0xfffffff8,%ebx
  xor    %ecx,%ecx
  mov    %ebx,%r8d
L267:
  mov    %ecx,%esi
  add    $0x8,%ecx
  mov    (%r10,%rsi,1),%r9
  mov    %r9,0x0(%rbp,%rsi,1)
  cmp    %r8d,%ecx
  jb     L267
  lea    0x0(%rbp,%rcx,1),%rsi
  add    0x38(%rsp),%rcx
  jmp    L165
L79:
  movl   $0x0,(%rsi)
  movl   $0x0,-0x4(%rsi,%rcx,1)
  jmp    L307
L50:
  mov    $0x1,%eax
  lea    0x70(%rsp),%rbp
  lea    0x63(%rsp),%rdx
  lea    0x90(%rsp),%r13
  lea    0xb0(%rsp),%r12
  jmp    L140
L142:
  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);
}
```