#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ TEM_ENC(unsigned char const *, int, unsigned char const *,
                           int, int, unsigned char *, unsigned char *);
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);
}


x86 assembly (clang, -O0):
<AEAD_TGEN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movq   $0x1,-0x40(%rbp)
movq   $0x1,-0x48(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x20(%rbp),%rax
and    $0x1f,%rax
mov    %eax,-0x38(%rbp)
mov    -0x20(%rbp),%rax
shr    $0x5,%rax
mov    %rax,-0x50(%rbp)
cmpl   $0x0,-0x38(%rbp)
je     1184 <AEAD_TGEN+0x74>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    1189 <AEAD_TGEN+0x79>
movl   $0x0,-0xd4(%rbp)
cmpl   $0x20,-0xd4(%rbp)
jge    11c3 <AEAD_TGEN+0xb3>
movslq -0xd4(%rbp),%rax
movb   $0x0,-0xc0(%rbp,%rax,1)
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    1193 <AEAD_TGEN+0x83>
jmp    11c8 <AEAD_TGEN+0xb8>
jmp    11cd <AEAD_TGEN+0xbd>
movl   $0x0,-0xd8(%rbp)
cmpl   $0xd,-0xd8(%rbp)
jge    1207 <AEAD_TGEN+0xf7>
movslq -0xd8(%rbp),%rax
movb   $0x0,-0xcd(%rbp,%rax,1)
mov    -0xd8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd8(%rbp)
jmp    11d7 <AEAD_TGEN+0xc7>
jmp    120c <AEAD_TGEN+0xfc>
jmp    1211 <AEAD_TGEN+0x101>
cmpq   $0x1,-0x50(%rbp)
jbe    1315 <AEAD_TGEN+0x205>
jmp    1221 <AEAD_TGEN+0x111>
movl   $0x0,-0xdc(%rbp)
cmpl   $0x20,-0xdc(%rbp)
jge    1265 <AEAD_TGEN+0x155>
mov    -0x58(%rbp),%rax
movslq -0xdc(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
movslq -0xdc(%rbp),%rax
mov    %cl,-0x80(%rbp,%rax,1)
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
jmp    122b <AEAD_TGEN+0x11b>
jmp    126a <AEAD_TGEN+0x15a>
mov    -0x8(%rbp),%rdi
lea    -0xcd(%rbp),%rdx
mov    -0x40(%rbp),%rax
mov    %eax,%ecx
lea    -0x80(%rbp),%r9
lea    -0xa0(%rbp),%rax
xor    %r8d,%r8d
mov    %r8d,%esi
mov    %rax,(%rsp)
call   1030 <TEM_ENC@plt>
movl   $0x0,-0xe0(%rbp)
cmpl   $0x20,-0xe0(%rbp)
jge    12e7 <AEAD_TGEN+0x1d7>
movslq -0xe0(%rbp),%rax
movzbl -0xa0(%rbp,%rax,1),%edx
ff
movslq -0xe0(%rbp),%rax
movzbl -0xc0(%rbp,%rax,1),%ecx
ff
xor    %edx,%ecx
mov    %cl,-0xc0(%rbp,%rax,1)
mov    -0xe0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe0(%rbp)
jmp    129f <AEAD_TGEN+0x18f>
jmp    12ec <AEAD_TGEN+0x1dc>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
mov    -0x50(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x50(%rbp)
mov    -0x58(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x58(%rbp)
jmp    1211 <AEAD_TGEN+0x101>
cmpq   $0x1,-0x50(%rbp)
jne    152d <AEAD_TGEN+0x41d>
cmpl   $0x0,-0x38(%rbp)
jne    1388 <AEAD_TGEN+0x278>
cmpq   $0x0,-0x20(%rbp)
je     1388 <AEAD_TGEN+0x278>
jmp    133a <AEAD_TGEN+0x22a>
movl   $0x0,-0xe4(%rbp)
cmpl   $0x20,-0xe4(%rbp)
jge    137e <AEAD_TGEN+0x26e>
mov    -0x58(%rbp),%rax
movslq -0xe4(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
movslq -0xe4(%rbp),%rax
mov    %cl,-0x80(%rbp,%rax,1)
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    1344 <AEAD_TGEN+0x234>
jmp    1383 <AEAD_TGEN+0x273>
jmp    1410 <AEAD_TGEN+0x300>
jmp    138d <AEAD_TGEN+0x27d>
movl   $0x0,-0xe8(%rbp)
mov    -0xe8(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    13d3 <AEAD_TGEN+0x2c3>
mov    -0x58(%rbp),%rax
movslq -0xe8(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
movslq -0xe8(%rbp),%rax
mov    %cl,-0x80(%rbp,%rax,1)
mov    -0xe8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe8(%rbp)
jmp    1397 <AEAD_TGEN+0x287>
jmp    13d8 <AEAD_TGEN+0x2c8>
movslq -0x38(%rbp),%rax
movb   $0x80,-0x80(%rbp,%rax,1)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
cmpl   $0x20,-0x34(%rbp)
jge    140b <AEAD_TGEN+0x2fb>
movslq -0x34(%rbp),%rax
movb   $0x0,-0x80(%rbp,%rax,1)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13ea <AEAD_TGEN+0x2da>
jmp    1410 <AEAD_TGEN+0x300>
jmp    1415 <AEAD_TGEN+0x305>
movl   $0x0,-0xec(%rbp)
cmpl   $0x20,-0xec(%rbp)
jge    1461 <AEAD_TGEN+0x351>
movslq -0xec(%rbp),%rax
movzbl -0xc0(%rbp,%rax,1),%edx
ff
movslq -0xec(%rbp),%rax
movzbl -0x80(%rbp,%rax,1),%ecx
xor    %edx,%ecx
mov    %cl,-0x80(%rbp,%rax,1)
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    141f <AEAD_TGEN+0x30f>
jmp    1466 <AEAD_TGEN+0x356>
cmpl   $0x0,-0x38(%rbp)
jne    14a6 <AEAD_TGEN+0x396>
mov    -0x8(%rbp),%rdi
lea    -0xcd(%rbp),%rdx
mov    -0x40(%rbp),%rax
sub    $0x1,%rax
mov    %eax,%ecx
lea    -0x80(%rbp),%r9
lea    -0xa0(%rbp),%rax
xor    %esi,%esi
mov    $0x1,%r8d
mov    %rax,(%rsp)
call   1030 <TEM_ENC@plt>
jmp    14d7 <AEAD_TGEN+0x3c7>
mov    -0x8(%rbp),%rdi
lea    -0xcd(%rbp),%rdx
mov    -0x40(%rbp),%rax
sub    $0x1,%rax
mov    %eax,%ecx
lea    -0x80(%rbp),%r9
lea    -0xa0(%rbp),%rax
xor    %esi,%esi
mov    $0x2,%r8d
mov    %rax,(%rsp)
call   1030 <TEM_ENC@plt>
jmp    14dc <AEAD_TGEN+0x3cc>
movl   $0x0,-0xf0(%rbp)
cmpl   $0x20,-0xf0(%rbp)
jge    1523 <AEAD_TGEN+0x413>
movslq -0xf0(%rbp),%rax
mov    -0xa0(%rbp,%rax,1),%cl
movslq -0xf0(%rbp),%rax
mov    %cl,-0xc0(%rbp,%rax,1)
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf0(%rbp)
jmp    14e6 <AEAD_TGEN+0x3d6>
jmp    1528 <AEAD_TGEN+0x418>
jmp    152d <AEAD_TGEN+0x41d>
movq   $0x1,-0x40(%rbp)
mov    -0x30(%rbp),%rax
shr    $0x5,%rax
mov    %rax,-0x50(%rbp)
cmpq   $0x1,-0x50(%rbp)
jbe    1648 <AEAD_TGEN+0x538>
jmp    1551 <AEAD_TGEN+0x441>
movl   $0x0,-0xf4(%rbp)
cmpl   $0x20,-0xf4(%rbp)
jge    1595 <AEAD_TGEN+0x485>
mov    -0x60(%rbp),%rax
movslq -0xf4(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
movslq -0xf4(%rbp),%rax
mov    %cl,-0x80(%rbp,%rax,1)
mov    -0xf4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
jmp    155b <AEAD_TGEN+0x44b>
jmp    159a <AEAD_TGEN+0x48a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x40(%rbp),%rax
shl    $0x1,%rax
mov    %eax,%ecx
lea    -0x80(%rbp),%r9
lea    -0xa0(%rbp),%rax
mov    $0x40,%esi
xor    %r8d,%r8d
mov    %rax,(%rsp)
call   1030 <TEM_ENC@plt>
movl   $0x0,-0xf8(%rbp)
cmpl   $0x20,-0xf8(%rbp)
jge    161a <AEAD_TGEN+0x50a>
movslq -0xf8(%rbp),%rax
movzbl -0xa0(%rbp,%rax,1),%edx
ff
movslq -0xf8(%rbp),%rax
movzbl -0xc0(%rbp,%rax,1),%ecx
ff
xor    %edx,%ecx
mov    %cl,-0xc0(%rbp,%rax,1)
mov    -0xf8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf8(%rbp)
jmp    15d2 <AEAD_TGEN+0x4c2>
jmp    161f <AEAD_TGEN+0x50f>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
mov    -0x50(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x50(%rbp)
mov    -0x60(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x60(%rbp)
jmp    1541 <AEAD_TGEN+0x431>
movl   $0x0,-0x34(%rbp)
cmpl   $0x20,-0x34(%rbp)
jge    168b <AEAD_TGEN+0x57b>
mov    -0x60(%rbp),%rax
movslq -0x34(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
movslq -0x34(%rbp),%rcx
movzbl -0xc0(%rbp,%rcx,1),%ecx
ff
xor    %ecx,%eax
mov    %al,%cl
movslq -0x34(%rbp),%rax
mov    %cl,-0x80(%rbp,%rax,1)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    164f <AEAD_TGEN+0x53f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x40(%rbp),%rax
shl    $0x1,%rax
sub    $0x1,%rax
mov    %eax,%ecx
lea    -0x80(%rbp),%r9
lea    -0xa0(%rbp),%rax
mov    $0x40,%esi
mov    $0x1,%r8d
mov    %rax,(%rsp)
call   1030 <TEM_ENC@plt>
movl   $0x0,-0xfc(%rbp)
cmpl   $0x10,-0xfc(%rbp)
jge    1707 <AEAD_TGEN+0x5f7>
movslq -0xfc(%rbp),%rax
mov    -0xa0(%rbp,%rax,1),%dl
mov    0x10(%rbp),%rax
movslq -0xfc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xfc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfc(%rbp)
jmp    16ca <AEAD_TGEN+0x5ba>
jmp    170c <AEAD_TGEN+0x5fc>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AEAD_TGEN>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %r9,%r12
mov    %r8,%r15
mov    %rdx,%rbp
mov    %rsi,%rbx
mov    %ecx,%r13d
and    $0x1f,%r13d
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x40(%rsp)
mov    %rcx,%r14
shr    $0x5,%r14
movq   $0x0,0x80(%rsp)
movq   $0x0,0x85(%rsp)
cmp    $0x1,%r13
sbb    $0xffffffffffffffff,%r14
cmp    $0x2,%r14
mov    %rdi,0x58(%rsp)
jb     1234 <AEAD_TGEN+0x114>
mov    %rcx,0x90(%rsp)
mov    %r13,0x98(%rsp)
mov    %rbx,0xa0(%rsp)
mov    $0x1,%r13d
lea    0x10(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
movups 0x0(%rbp),%xmm0
movups 0x10(%rbp),%xmm1
movaps %xmm1,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
lea    0x60(%rsp),%rax
mov    %rax,(%rsp)
xor    %esi,%esi
lea    0x80(%rsp),%rdx
mov    %r13d,%ecx
xor    %r8d,%r8d
mov    %rbx,%r9
call   1040 <TEM_ENC@plt>
mov    0x58(%rsp),%rdi
movaps 0x30(%rsp),%xmm0
xorps  0x60(%rsp),%xmm0
movaps 0x40(%rsp),%xmm1
movaps %xmm0,0x30(%rsp)
xorps  0x70(%rsp),%xmm1
movaps %xmm1,0x40(%rsp)
add    $0x1,%r13
add    $0x20,%rbp
cmp    %r13,%r14
jne    11b0 <AEAD_TGEN+0x90>
add    $0xffffffff,%r14d
mov    %r14d,%r10d
mov    0xa0(%rsp),%rbx
mov    0x98(%rsp),%r13
mov    0x90(%rsp),%rcx
jmp    1241 <AEAD_TGEN+0x121>
xor    %r10d,%r10d
cmp    $0x1,%r14
jne    13a8 <AEAD_TGEN+0x288>
test   %rcx,%rcx
je     1262 <AEAD_TGEN+0x142>
test   %r13d,%r13d
jne    1262 <AEAD_TGEN+0x142>
movups 0x0(%rbp),%xmm0
movaps %xmm0,0x10(%rsp)
movups 0x10(%rbp),%xmm0
movaps %xmm0,0x20(%rsp)
jmp    1343 <AEAD_TGEN+0x223>
test   %r13d,%r13d
je     130b <AEAD_TGEN+0x1eb>
cmp    $0x8,%r13d
jb     1296 <AEAD_TGEN+0x176>
mov    %rbp,%rax
add    %r13,%rax
lea    0x10(%rsp),%rdx
cmp    %rax,%rdx
jae    151f <AEAD_TGEN+0x3ff>
lea    (%rsp,%r13,1),%rax
add    $0x10,%rax
cmp    %rax,%rbp
jae    151f <AEAD_TGEN+0x3ff>
xor    %eax,%eax
mov    %rbx,%r8
mov    %rax,%rsi
not    %rsi
add    %r13,%rsi
mov    %r13,%rdx
and    $0x3,%rdx
je     12c3 <AEAD_TGEN+0x1a3>
nopl   (%rax)
movzbl 0x0(%rbp,%rax,1),%ebx
mov    %bl,0x10(%rsp,%rax,1)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    12b0 <AEAD_TGEN+0x190>
cmp    $0x3,%rsi
mov    %r8,%rbx
jb     12fd <AEAD_TGEN+0x1dd>
nopl   0x0(%rax)
movzbl 0x0(%rbp,%rax,1),%edx
mov    %dl,0x10(%rsp,%rax,1)
movzbl 0x1(%rbp,%rax,1),%edx
mov    %dl,0x11(%rsp,%rax,1)
movzbl 0x2(%rbp,%rax,1),%edx
mov    %dl,0x12(%rsp,%rax,1)
movzbl 0x3(%rbp,%rax,1),%edx
mov    %dl,0x13(%rsp,%rax,1)
add    $0x4,%rax
cmp    %rax,%r13
jne    12d0 <AEAD_TGEN+0x1b0>
movb   $0x80,0x10(%rsp,%r13,1)
cmp    $0x1f,%r13d
je     1343 <AEAD_TGEN+0x223>
jmp    1311 <AEAD_TGEN+0x1f1>
movb   $0x80,0x10(%rsp,%r13,1)
and    $0x1f,%ecx
lea    0x10(%rsp),%rax
lea    (%rcx,%rax,1),%rdi
add    $0x1,%rdi
xor    %eax,%eax
mov    $0x1e,%edx
sub    %r13d,%edx
cmovb  %eax,%edx
add    $0x1,%edx
xor    %esi,%esi
mov    %r10d,%ebp
call   1030 <memset@plt>
mov    %ebp,%r10d
mov    0x58(%rsp),%rdi
movaps 0x10(%rsp),%xmm0
movaps 0x20(%rsp),%xmm1
xorps  0x30(%rsp),%xmm0
movaps %xmm0,0x10(%rsp)
xorps  0x40(%rsp),%xmm1
movaps %xmm1,0x20(%rsp)
cmp    $0x1,%r13d
mov    $0x2,%r8d
sbb    $0x0,%r8d
lea    0x60(%rsp),%rax
mov    %rax,(%rsp)
lea    0x80(%rsp),%rdx
lea    0x10(%rsp),%r9
xor    %esi,%esi
mov    %r10d,%ecx
call   1040 <TEM_ENC@plt>
mov    0x58(%rsp),%rdi
movaps 0x60(%rsp),%xmm0
movaps 0x70(%rsp),%xmm1
movaps %xmm0,0x30(%rsp)
movaps %xmm1,0x40(%rsp)
mov    $0x1,%ebp
cmp    $0x40,%r12
jb     1431 <AEAD_TGEN+0x311>
shr    $0x5,%r12
mov    $0x1,%ebp
lea    0x60(%rsp),%r14
lea    0x10(%rsp),%r13
cs nopw 0x0(%rax,%rax,1)
movups (%r15),%xmm0
movups 0x10(%r15),%xmm1
movaps %xmm1,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
lea    0x1(%rbp),%ecx
mov    %r14,(%rsp)
mov    $0x40,%esi
mov    %rbx,%rdx
xor    %r8d,%r8d
mov    %r13,%r9
call   1040 <TEM_ENC@plt>
mov    0x58(%rsp),%rdi
movaps 0x30(%rsp),%xmm0
movaps 0x40(%rsp),%xmm1
xorps  0x60(%rsp),%xmm0
movaps %xmm0,0x30(%rsp)
xorps  0x70(%rsp),%xmm1
movaps %xmm1,0x40(%rsp)
add    $0xffffffffffffffff,%r12
add    $0x20,%r15
add    $0x2,%ebp
cmp    $0x1,%r12
ja     13d0 <AEAD_TGEN+0x2b0>
mov    0xe0(%rsp),%r14
lea    0x30(%rsp),%r9
lea    0x20(%r15),%rax
lea    0x50(%rsp),%r8
lea    0x10(%rsp),%rsi
cmp    %rax,%rsi
setb   %dl
cmp    %r9,%r15
setb   %cl
cmp    %r8,%rsi
setb   %al
lea    0x30(%rsp),%rsi
cmp    %r9,%rsi
setb   %sil
test   %cl,%dl
jne    1492 <AEAD_TGEN+0x372>
and    %sil,%al
jne    1492 <AEAD_TGEN+0x372>
movups (%r15),%xmm0
xorps  0x30(%rsp),%xmm0
movaps %xmm0,0x10(%rsp)
movups 0x10(%r15),%xmm0
xorps  0x40(%rsp),%xmm0
movaps %xmm0,0x20(%rsp)
jmp    14e1 <AEAD_TGEN+0x3c1>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl 0x30(%rsp,%rax,1),%ecx
xor    (%r15,%rax,1),%cl
movzbl 0x31(%rsp,%rax,1),%edx
mov    %cl,0x10(%rsp,%rax,1)
xor    0x1(%r15,%rax,1),%dl
mov    %dl,0x11(%rsp,%rax,1)
movzbl 0x32(%rsp,%rax,1),%ecx
xor    0x2(%r15,%rax,1),%cl
mov    %cl,0x12(%rsp,%rax,1)
movzbl 0x33(%rsp,%rax,1),%ecx
xor    0x3(%r15,%rax,1),%cl
mov    %cl,0x13(%rsp,%rax,1)
add    $0x4,%rax
cmp    $0x20,%rax
jne    14a0 <AEAD_TGEN+0x380>
lea    0x60(%rsp),%rax
mov    %rax,(%rsp)
lea    0x10(%rsp),%r9
mov    $0x40,%esi
mov    %rbx,%rdx
mov    %ebp,%ecx
mov    $0x1,%r8d
call   1040 <TEM_ENC@plt>
movaps 0x60(%rsp),%xmm0
movups %xmm0,(%r14)
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
cmp    $0x10,%r13d
jae    152c <AEAD_TGEN+0x40c>
xor    %eax,%eax
jmp    1605 <AEAD_TGEN+0x4e5>
mov    %r13d,%eax
and    $0xfffffff0,%eax
lea    -0x10(%rax),%rdx
mov    %rdx,%rsi
shr    $0x4,%rsi
add    $0x1,%rsi
mov    %esi,%r8d
and    $0x7,%r8d
cmp    $0x70,%rdx
jae    1552 <AEAD_TGEN+0x432>
xor    %edx,%edx
jmp    15bd <AEAD_TGEN+0x49d>
and    $0xfffffffffffffff8,%rsi
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movups 0x0(%rbp,%rdx,1),%xmm0
movaps %xmm0,0x10(%rsp,%rdx,1)
movups 0x10(%rbp,%rdx,1),%xmm0
movaps %xmm0,0x20(%rsp,%rdx,1)
movups 0x20(%rbp,%rdx,1),%xmm0
movaps %xmm0,0x30(%rsp,%rdx,1)
movups 0x30(%rbp,%rdx,1),%xmm0
movaps %xmm0,0x40(%rsp,%rdx,1)
movups 0x40(%rbp,%rdx,1),%xmm0
movaps %xmm0,0x50(%rsp,%rdx,1)
movups 0x50(%rbp,%rdx,1),%xmm0
movaps %xmm0,0x60(%rsp,%rdx,1)
movups 0x60(%rbp,%rdx,1),%xmm0
movaps %xmm0,0x70(%rsp,%rdx,1)
movups 0x70(%rbp,%rdx,1),%xmm0
movaps %xmm0,0x80(%rsp,%rdx,1)
sub    $0xffffffffffffff80,%rdx
add    $0xfffffffffffffff8,%rsi
jne    1560 <AEAD_TGEN+0x440>
test   %r8,%r8
je     15f2 <AEAD_TGEN+0x4d2>
lea    (%rsp,%rdx,1),%r9
add    $0x10,%r9
add    %rbp,%rdx
shl    $0x4,%r8
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movups (%rdx,%rsi,1),%xmm0
movaps %xmm0,(%r9,%rsi,1)
add    $0x10,%rsi
cmp    %rsi,%r8
jne    15e0 <AEAD_TGEN+0x4c0>
cmp    %r13,%rax
je     12fd <AEAD_TGEN+0x1dd>
test   $0x8,%r13b
je     1298 <AEAD_TGEN+0x178>
mov    %rax,%rsi
mov    %r13d,%eax
and    $0xfffffff8,%eax
xchg   %ax,%ax
mov    0x0(%rbp,%rsi,1),%rdx
mov    %rdx,0x10(%rsp,%rsi,1)
add    $0x8,%rsi
cmp    %rsi,%rax
jne    1610 <AEAD_TGEN+0x4f0>
cmp    %r13,%rax
je     12fd <AEAD_TGEN+0x1dd>
jmp    1298 <AEAD_TGEN+0x178>

LLVM IR (-O0):
define void @AEAD_TGEN(i8* %0, i8* %1, i8* %2, i64 %3, i8* %4, i64 %5, i8* %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i8*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
%20 = alloca i8*
%21 = alloca i8*
%22 = alloca [32 x i8]
%23 = alloca [32 x i8]
%24 = alloca [32 x i8]
%25 = alloca [13 x i8]
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
store i8* %0, i8** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i64 %3, i64* %11
store i8* %4, i8** %12
store i64 %5, i64* %13
store i8* %6, i8** %14
store i64 1, i64* %17
store i64 1, i64* %18
%37 = load i8*, i8** %10
store i8* %37, i8** %20
%38 = load i8*, i8** %12
store i8* %38, i8** %21
%39 = load i64, i64* %11
%40 = urem i64 %39, 32
%41 = trunc i64 %40 to i32
store i32 %41, i32* %16
%42 = load i64, i64* %11
%43 = udiv i64 %42, 32
store i64 %43, i64* %19
%44 = load i32, i32* %16
%45 = icmp ne i32 %44, 0
br i1 %45, label %46, label %49
46: ; preds = %7
%47 = load i64, i64* %19
%48 = add i64 %47, 1
store i64 %48, i64* %19
br label %49
49: ; preds = %46, %7
br label %50
50: ; preds = %49
store i32 0, i32* %26
br label %51
51: ; preds = %58, %50
%52 = load i32, i32* %26
%53 = icmp slt i32 %52, 32
br i1 %53, label %54, label %61
54: ; preds = %51
%55 = load i32, i32* %26
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [32 x i8], [32 x i8]* %24, i64 0, i64 %56
store i8 0, i8* %57
br label %58
58: ; preds = %54
%59 = load i32, i32* %26
%60 = add nsw i32 %59, 1
store i32 %60, i32* %26
br label %51
61: ; preds = %51
br label %62
62: ; preds = %61
br label %63
63: ; preds = %62
store i32 0, i32* %27
br label %64
64: ; preds = %71, %63
%65 = load i32, i32* %27
%66 = icmp slt i32 %65, 13
br i1 %66, label %67, label %74
67: ; preds = %64
%68 = load i32, i32* %27
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [13 x i8], [13 x i8]* %25, i64 0, i64 %69
store i8 0, i8* %70
br label %71
71: ; preds = %67
%72 = load i32, i32* %27
%73 = add nsw i32 %72, 1
store i32 %73, i32* %27
br label %64
74: ; preds = %64
br label %75
75: ; preds = %74
br label %76
76: ; preds = %126, %75
%77 = load i64, i64* %19
%78 = icmp ugt i64 %77, 1
br i1 %78, label %79, label %133
79: ; preds = %76
br label %80
80: ; preds = %79
store i32 0, i32* %28
br label %81
81: ; preds = %93, %80
%82 = load i32, i32* %28
%83 = icmp slt i32 %82, 32
br i1 %83, label %84, label %96
84: ; preds = %81
%85 = load i8*, i8** %20
%86 = load i32, i32* %28
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds i8, i8* %85, i64 %87
%89 = load i8, i8* %88
%90 = load i32, i32* %28
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [32 x i8], [32 x i8]* %22, i64 0, i64 %91
store i8 %89, i8* %92
br label %93
93: ; preds = %84
%94 = load i32, i32* %28
%95 = add nsw i32 %94, 1
store i32 %95, i32* %28
br label %81
96: ; preds = %81
br label %97
97: ; preds = %96
%98 = load i8*, i8** %8
%99 = getelementptr inbounds [13 x i8], [13 x i8]* %25, i64 0, i64 0
%100 = load i64, i64* %17
%101 = trunc i64 %100 to i32
%102 = getelementptr inbounds [32 x i8], [32 x i8]* %22, i64 0, i64 0
%103 = getelementptr inbounds [32 x i8], [32 x i8]* %23, i64 0, i64 0
%104 = call i32 @TEM_ENC(i8* %98, i32 0, i8* %99, i32 %101, i32 0, i8* %102, i8* %103)
br label %105
105: ; preds = %97
store i32 0, i32* %29
br label %106
106: ; preds = %122, %105
%107 = load i32, i32* %29
%108 = icmp slt i32 %107, 32
br i1 %108, label %109, label %125
109: ; preds = %106
%110 = load i32, i32* %29
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [32 x i8], [32 x i8]* %23, i64 0, i64 %111
%113 = load i8, i8* %112
%114 = zext i8 %113 to i32
%115 = load i32, i32* %29
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds [32 x i8], [32 x i8]* %24, i64 0, i64 %116
%118 = load i8, i8* %117
%119 = zext i8 %118 to i32
%120 = xor i32 %119, %114
%121 = trunc i32 %120 to i8
store i8 %121, i8* %117
br label %122
122: ; preds = %109
%123 = load i32, i32* %29
%124 = add nsw i32 %123, 1
store i32 %124, i32* %29
br label %106
125: ; preds = %106
br label %126
126: ; preds = %125
%127 = load i64, i64* %17
%128 = add i64 %127, 1
store i64 %128, i64* %17
%129 = load i64, i64* %19
%130 = add i64 %129, -1
store i64 %130, i64* %19
%131 = load i8*, i8** %20
%132 = getelementptr inbounds i8, i8* %131, i64 32
store i8* %132, i8** %20
br label %76
133: ; preds = %76
%134 = load i64, i64* %19
%135 = icmp eq i64 %134, 1
br i1 %135, label %136, label %258
136: ; preds = %133
%137 = load i32, i32* %16
%138 = icmp eq i32 %137, 0
br i1 %138, label %139, label %161
139: ; preds = %136
%140 = load i64, i64* %11
%141 = icmp ne i64 %140, 0
br i1 %141, label %142, label %161
142: ; preds = %139
br label %143
143: ; preds = %142
store i32 0, i32* %30
br label %144
144: ; preds = %156, %143
%145 = load i32, i32* %30
%146 = icmp slt i32 %145, 32
br i1 %146, label %147, label %159
147: ; preds = %144
%148 = load i8*, i8** %20
%149 = load i32, i32* %30
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds i8, i8* %148, i64 %150
%152 = load i8, i8* %151
%153 = load i32, i32* %30
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds [32 x i8], [32 x i8]* %22, i64 0, i64 %154
store i8 %152, i8* %155
br label %156
156: ; preds = %147
%157 = load i32, i32* %30
%158 = add nsw i32 %157, 1
store i32 %158, i32* %30
br label %144
159: ; preds = %144
br label %160
160: ; preds = %159
br label %197
161: ; preds = %139, %136
br label %162
162: ; preds = %161
store i32 0, i32* %31
br label %163
163: ; preds = %176, %162
%164 = load i32, i32* %31
%165 = load i32, i32* %16
%166 = icmp slt i32 %164, %165
br i1 %166, label %167, label %179
167: ; preds = %163
%168 = load i8*, i8** %20
%169 = load i32, i32* %31
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds i8, i8* %168, i64 %170
%172 = load i8, i8* %171
%173 = load i32, i32* %31
%174 = sext i32 %173 to i64
%175 = getelementptr inbounds [32 x i8], [32 x i8]* %22, i64 0, i64 %174
store i8 %172, i8* %175
br label %176
176: ; preds = %167
%177 = load i32, i32* %31
%178 = add nsw i32 %177, 1
store i32 %178, i32* %31
br label %163
179: ; preds = %163
br label %180
180: ; preds = %179
%181 = load i32, i32* %16
%182 = sext i32 %181 to i64
%183 = getelementptr inbounds [32 x i8], [32 x i8]* %22, i64 0, i64 %182
store i8 -128, i8* %183
%184 = load i32, i32* %16
%185 = add nsw i32 %184, 1
store i32 %185, i32* %15
br label %186
186: ; preds = %193, %180
%187 = load i32, i32* %15
%188 = icmp slt i32 %187, 32
br i1 %188, label %189, label %196
189: ; preds = %186
%190 = load i32, i32* %15
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds [32 x i8], [32 x i8]* %22, i64 0, i64 %191
store i8 0, i8* %192
br label %193
193: ; preds = %189
%194 = load i32, i32* %15
%195 = add nsw i32 %194, 1
store i32 %195, i32* %15
br label %186
196: ; preds = %186
br label %197
197: ; preds = %196, %160
br label %198
198: ; preds = %197
store i32 0, i32* %32
br label %199
199: ; preds = %215, %198
%200 = load i32, i32* %32
%201 = icmp slt i32 %200, 32
br i1 %201, label %202, label %218
202: ; preds = %199
%203 = load i32, i32* %32
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds [32 x i8], [32 x i8]* %24, i64 0, i64 %204
%206 = load i8, i8* %205
%207 = zext i8 %206 to i32
%208 = load i32, i32* %32
%209 = sext i32 %208 to i64
%210 = getelementptr inbounds [32 x i8], [32 x i8]* %22, i64 0, i64 %209
%211 = load i8, i8* %210
%212 = zext i8 %211 to i32
%213 = xor i32 %212, %207
%214 = trunc i32 %213 to i8
store i8 %214, i8* %210
br label %215
215: ; preds = %202
%216 = load i32, i32* %32
%217 = add nsw i32 %216, 1
store i32 %217, i32* %32
br label %199
218: ; preds = %199
br label %219
219: ; preds = %218
%220 = load i32, i32* %16
%221 = icmp eq i32 %220, 0
br i1 %221, label %222, label %231
222: ; preds = %219
%223 = load i8*, i8** %8
%224 = getelementptr inbounds [13 x i8], [13 x i8]* %25, i64 0, i64 0
%225 = load i64, i64* %17
%226 = sub i64 %225, 1
%227 = trunc i64 %226 to i32
%228 = getelementptr inbounds [32 x i8], [32 x i8]* %22, i64 0, i64 0
%229 = getelementptr inbounds [32 x i8], [32 x i8]* %23, i64 0, i64 0
%230 = call i32 @TEM_ENC(i8* %223, i32 0, i8* %224, i32 %227, i32 1, i8* %228, i8* %229)
br label %240
231: ; preds = %219
%232 = load i8*, i8** %8
%233 = getelementptr inbounds [13 x i8], [13 x i8]* %25, i64 0, i64 0
%234 = load i64, i64* %17
%235 = sub i64 %234, 1
%236 = trunc i64 %235 to i32
%237 = getelementptr inbounds [32 x i8], [32 x i8]* %22, i64 0, i64 0
%238 = getelementptr inbounds [32 x i8], [32 x i8]* %23, i64 0, i64 0
%239 = call i32 @TEM_ENC(i8* %232, i32 0, i8* %233, i32 %236, i32 2, i8* %237, i8* %238)
br label %240
240: ; preds = %231, %222
br label %241
241: ; preds = %240
store i32 0, i32* %33
br label %242
242: ; preds = %253, %241
%243 = load i32, i32* %33
%244 = icmp slt i32 %243, 32
br i1 %244, label %245, label %256
245: ; preds = %242
%246 = load i32, i32* %33
%247 = sext i32 %246 to i64
%248 = getelementptr inbounds [32 x i8], [32 x i8]* %23, i64 0, i64 %247
%249 = load i8, i8* %248
%250 = load i32, i32* %33
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds [32 x i8], [32 x i8]* %24, i64 0, i64 %251
store i8 %249, i8* %252
br label %253
253: ; preds = %245
%254 = load i32, i32* %33
%255 = add nsw i32 %254, 1
store i32 %255, i32* %33
br label %242
256: ; preds = %242
br label %257
257: ; preds = %256
br label %258
258: ; preds = %257, %133
store i64 1, i64* %17
%259 = load i64, i64* %13
%260 = udiv i64 %259, 32
store i64 %260, i64* %19
br label %261
261: ; preds = %312, %258
%262 = load i64, i64* %19
%263 = icmp ugt i64 %262, 1
br i1 %263, label %264, label %319
264: ; preds = %261
br label %265
265: ; preds = %264
store i32 0, i32* %34
br label %266
266: ; preds = %278, %265
%267 = load i32, i32* %34
%268 = icmp slt i32 %267, 32
br i1 %268, label %269, label %281
269: ; preds = %266
%270 = load i8*, i8** %21
%271 = load i32, i32* %34
%272 = sext i32 %271 to i64
%273 = getelementptr inbounds i8, i8* %270, i64 %272
%274 = load i8, i8* %273
%275 = load i32, i32* %34
%276 = sext i32 %275 to i64
%277 = getelementptr inbounds [32 x i8], [32 x i8]* %22, i64 0, i64 %276
store i8 %274, i8* %277
br label %278
278: ; preds = %269
%279 = load i32, i32* %34
%280 = add nsw i32 %279, 1
store i32 %280, i32* %34
br label %266
281: ; preds = %266
br label %282
282: ; preds = %281
%283 = load i8*, i8** %8
%284 = load i8*, i8** %9
%285 = load i64, i64* %17
%286 = mul i64 2, %285
%287 = trunc i64 %286 to i32
%288 = getelementptr inbounds [32 x i8], [32 x i8]* %22, i64 0, i64 0
%289 = getelementptr inbounds [32 x i8], [32 x i8]* %23, i64 0, i64 0
%290 = call i32 @TEM_ENC(i8* %283, i32 64, i8* %284, i32 %287, i32 0, i8* %288, i8* %289)
br label %291
291: ; preds = %282
store i32 0, i32* %35
br label %292
292: ; preds = %308, %291
%293 = load i32, i32* %35
%294 = icmp slt i32 %293, 32
br i1 %294, label %295, label %311
295: ; preds = %292
%296 = load i32, i32* %35
%297 = sext i32 %296 to i64
%298 = getelementptr inbounds [32 x i8], [32 x i8]* %23, i64 0, i64 %297
%299 = load i8, i8* %298
%300 = zext i8 %299 to i32
%301 = load i32, i32* %35
%302 = sext i32 %301 to i64
%303 = getelementptr inbounds [32 x i8], [32 x i8]* %24, i64 0, i64 %302
%304 = load i8, i8* %303
%305 = zext i8 %304 to i32
%306 = xor i32 %305, %300
%307 = trunc i32 %306 to i8
store i8 %307, i8* %303
br label %308
308: ; preds = %295
%309 = load i32, i32* %35
%310 = add nsw i32 %309, 1
store i32 %310, i32* %35
br label %292
311: ; preds = %292
br label %312
312: ; preds = %311
%313 = load i64, i64* %17
%314 = add i64 %313, 1
store i64 %314, i64* %17
%315 = load i64, i64* %19
%316 = add i64 %315, -1
store i64 %316, i64* %19
%317 = load i8*, i8** %21
%318 = getelementptr inbounds i8, i8* %317, i64 32
store i8* %318, i8** %21
br label %261
319: ; preds = %261
store i32 0, i32* %15
br label %320
320: ; preds = %340, %319
%321 = load i32, i32* %15
%322 = icmp slt i32 %321, 32
br i1 %322, label %323, label %343
323: ; preds = %320
%324 = load i8*, i8** %21
%325 = load i32, i32* %15
%326 = sext i32 %325 to i64
%327 = getelementptr inbounds i8, i8* %324, i64 %326
%328 = load i8, i8* %327
%329 = zext i8 %328 to i32
%330 = load i32, i32* %15
%331 = sext i32 %330 to i64
%332 = getelementptr inbounds [32 x i8], [32 x i8]* %24, i64 0, i64 %331
%333 = load i8, i8* %332
%334 = zext i8 %333 to i32
%335 = xor i32 %329, %334
%336 = trunc i32 %335 to i8
%337 = load i32, i32* %15
%338 = sext i32 %337 to i64
%339 = getelementptr inbounds [32 x i8], [32 x i8]* %22, i64 0, i64 %338
store i8 %336, i8* %339
br label %340
340: ; preds = %323
%341 = load i32, i32* %15
%342 = add nsw i32 %341, 1
store i32 %342, i32* %15
br label %320
343: ; preds = %320
%344 = load i8*, i8** %8
%345 = load i8*, i8** %9
%346 = load i64, i64* %17
%347 = mul i64 2, %346
%348 = sub i64 %347, 1
%349 = trunc i64 %348 to i32
%350 = getelementptr inbounds [32 x i8], [32 x i8]* %22, i64 0, i64 0
%351 = getelementptr inbounds [32 x i8], [32 x i8]* %23, i64 0, i64 0
%352 = call i32 @TEM_ENC(i8* %344, i32 64, i8* %345, i32 %349, i32 1, i8* %350, i8* %351)
br label %353
353: ; preds = %343
store i32 0, i32* %36
br label %354
354: ; preds = %366, %353
%355 = load i32, i32* %36
%356 = icmp slt i32 %355, 16
br i1 %356, label %357, label %369
357: ; preds = %354
%358 = load i32, i32* %36
%359 = sext i32 %358 to i64
%360 = getelementptr inbounds [32 x i8], [32 x i8]* %23, i64 0, i64 %359
%361 = load i8, i8* %360
%362 = load i8*, i8** %14
%363 = load i32, i32* %36
%364 = sext i32 %363 to i64
%365 = getelementptr inbounds i8, i8* %362, i64 %364
store i8 %361, i8* %365
br label %366
366: ; preds = %357
%367 = load i32, i32* %36
%368 = add nsw i32 %367, 1
store i32 %368, i32* %36
br label %354
369: ; preds = %354
br label %370
370: ; preds = %369
ret void
}

LLVM IR (-O2):
define void @AEAD_TGEN(i8* %0, i8* %1, i8* nocapture %2, i64 %3, i8* nocapture %4, i64 %5, i8* nocapture writeonly %6) {
%8 = alloca [32 x i8]
%9 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%10 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%11 = alloca [32 x i8]
%12 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%13 = alloca [32 x i8]
%14 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%15 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%16 = alloca [13 x i8]
%17 = getelementptr inbounds [13 x i8], [13 x i8]* %16, i64 0, i64 0
%18 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%19 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 0
%20 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%21 = getelementptr inbounds [13 x i8], [13 x i8]* %16, i64 0, i64 0
%22 = trunc i64 %3 to i32
%23 = and i32 %22, 31
%24 = icmp eq i32 %23, 0
%25 = xor i1 %24, true
%26 = zext i1 %25 to i64
%27 = lshr i64 %3, 5
%28 = add nuw nsw i64 %27, %26
%29 = icmp ugt i64 %28, 1
br i1 %29, label %30, label %56
30: ; preds = %7
%31 = bitcast [32 x i8]* %11 to <16 x i8>*
%32 = bitcast [32 x i8]* %13 to <16 x i8>*
%33 = bitcast [32 x i8]* %13 to <16 x i8>*
%34 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 16
%35 = bitcast i8* %34 to <16 x i8>*
%36 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 16
%37 = bitcast i8* %36 to <16 x i8>*
%38 = bitcast i8* %36 to <16 x i8>*
br label %39
39: ; preds = %30, %39
%40 = phi i8* [ %51, %39 ], [ %2, %30 ]
%41 = phi i64 [ %50, %39 ], [ 1, %30 ]
%42 = trunc i64 %41 to i32
%43 = call i32 @TEM_ENC(i8* %0, i32 0, i8* %21, i32 %42, i32 0, i8* %18, i8* %19)
%44 = load <16 x i8>, <16 x i8>* %31
%45 = load <16 x i8>, <16 x i8>* %32
%46 = xor <16 x i8> %45, %44
store <16 x i8> %46, <16 x i8>* %33
%47 = load <16 x i8>, <16 x i8>* %35
%48 = load <16 x i8>, <16 x i8>* %37
%49 = xor <16 x i8> %48, %47
store <16 x i8> %49, <16 x i8>* %38
%50 = add i64 %41, 1
%51 = getelementptr inbounds i8, i8* %40, i64 32
%52 = icmp eq i64 %50, %28
br i1 %52, label %53, label %39
53: ; preds = %39
%54 = trunc i64 %28 to i32
%55 = add i32 %54, -1
br label %58
56: ; preds = %7
%57 = icmp eq i64 %28, 1
br i1 %57, label %58, label %245
58: ; preds = %53, %56
%59 = phi i8* [ %51, %53 ], [ %2, %56 ]
%60 = phi i32 [ %55, %53 ], [ 0, %56 ]
%61 = icmp ne i64 %3, 0
%62 = and i1 %61, %24
br i1 %62, label %63, label %72
63: ; preds = %58
%64 = bitcast i8* %59 to <16 x i8>*
%65 = load <16 x i8>, <16 x i8>* %64
%66 = bitcast [32 x i8]* %8 to <16 x i8>*
store <16 x i8> %65, <16 x i8>* %66
%67 = getelementptr inbounds i8, i8* %59, i64 16
%68 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 16
%69 = bitcast i8* %67 to <16 x i8>*
%70 = load <16 x i8>, <16 x i8>* %69
%71 = bitcast i8* %68 to <16 x i8>*
store <16 x i8> %70, <16 x i8>* %71
br label %228
72: ; preds = %58
%73 = zext i32 %23 to i64
br i1 %24, label %197, label %74
74: ; preds = %72
%75 = icmp ult i32 %23, 8
br i1 %75, label %179, label %76
76: ; preds = %74
%77 = getelementptr [32 x i8], [32 x i8]* %8, i64 0, i64 %73
%78 = getelementptr i8, i8* %59, i64 %73
%79 = icmp ult i8* %9, %78
%80 = icmp ult i8* %59, %77
%81 = and i1 %79, %80
br i1 %81, label %179, label %82
82: ; preds = %76
%83 = icmp ult i32 %23, 16
br i1 %83, label %165, label %84
84: ; preds = %82
%85 = and i64 %73, 16
%86 = add nsw i64 %85, -16
%87 = lshr exact i64 %86, 4
%88 = add nuw nsw i64 %87, 1
%89 = and i64 %88, 7
%90 = icmp ult i64 %86, 112
br i1 %90, label %146, label %91
91: ; preds = %84
%92 = and i64 %88, 2305843009213693944
br label %93
93: ; preds = %93, %91
%94 = phi i64 [ 0, %91 ], [ %143, %93 ]
%95 = phi i64 [ 0, %91 ], [ %144, %93 ]
%96 = getelementptr inbounds i8, i8* %59, i64 %94
%97 = bitcast i8* %96 to <16 x i8>*
%98 = load <16 x i8>, <16 x i8>* %97
%99 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %94
%100 = bitcast i8* %99 to <16 x i8>*
store <16 x i8> %98, <16 x i8>* %100
%101 = or i64 %94, 16
%102 = getelementptr inbounds i8, i8* %59, i64 %101
%103 = bitcast i8* %102 to <16 x i8>*
%104 = load <16 x i8>, <16 x i8>* %103
%105 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %101
%106 = bitcast i8* %105 to <16 x i8>*
store <16 x i8> %104, <16 x i8>* %106
%107 = or i64 %94, 32
%108 = getelementptr inbounds i8, i8* %59, i64 %107
%109 = bitcast i8* %108 to <16 x i8>*
%110 = load <16 x i8>, <16 x i8>* %109
%111 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %107
%112 = bitcast i8* %111 to <16 x i8>*
store <16 x i8> %110, <16 x i8>* %112
%113 = or i64 %94, 48
%114 = getelementptr inbounds i8, i8* %59, i64 %113
%115 = bitcast i8* %114 to <16 x i8>*
%116 = load <16 x i8>, <16 x i8>* %115
%117 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %113
%118 = bitcast i8* %117 to <16 x i8>*
store <16 x i8> %116, <16 x i8>* %118
%119 = or i64 %94, 64
%120 = getelementptr inbounds i8, i8* %59, i64 %119
%121 = bitcast i8* %120 to <16 x i8>*
%122 = load <16 x i8>, <16 x i8>* %121
%123 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %119
%124 = bitcast i8* %123 to <16 x i8>*
store <16 x i8> %122, <16 x i8>* %124
%125 = or i64 %94, 80
%126 = getelementptr inbounds i8, i8* %59, i64 %125
%127 = bitcast i8* %126 to <16 x i8>*
%128 = load <16 x i8>, <16 x i8>* %127
%129 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %125
%130 = bitcast i8* %129 to <16 x i8>*
store <16 x i8> %128, <16 x i8>* %130
%131 = or i64 %94, 96
%132 = getelementptr inbounds i8, i8* %59, i64 %131
%133 = bitcast i8* %132 to <16 x i8>*
%134 = load <16 x i8>, <16 x i8>* %133
%135 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %131
%136 = bitcast i8* %135 to <16 x i8>*
store <16 x i8> %134, <16 x i8>* %136
%137 = or i64 %94, 112
%138 = getelementptr inbounds i8, i8* %59, i64 %137
%139 = bitcast i8* %138 to <16 x i8>*
%140 = load <16 x i8>, <16 x i8>* %139
%141 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %137
%142 = bitcast i8* %141 to <16 x i8>*
store <16 x i8> %140, <16 x i8>* %142
%143 = add nuw i64 %94, 128
%144 = add i64 %95, 8
%145 = icmp eq i64 %144, %92
br i1 %145, label %146, label %93
146: ; preds = %93, %84
%147 = phi i64 [ 0, %84 ], [ %143, %93 ]
%148 = icmp eq i64 %89, 0
br i1 %148, label %160, label %149
149: ; preds = %146, %149
%150 = phi i64 [ %157, %149 ], [ %147, %146 ]
%151 = phi i64 [ %158, %149 ], [ 0, %146 ]
%152 = getelementptr inbounds i8, i8* %59, i64 %150
%153 = bitcast i8* %152 to <16 x i8>*
%154 = load <16 x i8>, <16 x i8>* %153
%155 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %150
%156 = bitcast i8* %155 to <16 x i8>*
store <16 x i8> %154, <16 x i8>* %156
%157 = add nuw i64 %150, 16
%158 = add i64 %151, 1
%159 = icmp eq i64 %158, %89
br i1 %159, label %160, label %149
160: ; preds = %149, %146
%161 = icmp eq i64 %85, %73
br i1 %161, label %218, label %162
162: ; preds = %160
%163 = and i64 %73, 8
%164 = icmp eq i64 %163, 0
br i1 %164, label %179, label %165
165: ; preds = %82, %162
%166 = phi i64 [ %85, %162 ], [ 0, %82 ]
%167 = and i64 %73, 24
br label %168
168: ; preds = %168, %165
%169 = phi i64 [ %166, %165 ], [ %175, %168 ]
%170 = getelementptr inbounds i8, i8* %59, i64 %169
%171 = bitcast i8* %170 to <8 x i8>*
%172 = load <8 x i8>, <8 x i8>* %171
%173 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %169
%174 = bitcast i8* %173 to <8 x i8>*
store <8 x i8> %172, <8 x i8>* %174
%175 = add nuw i64 %169, 8
%176 = icmp eq i64 %175, %167
br i1 %176, label %177, label %168
177: ; preds = %168
%178 = icmp eq i64 %167, %73
br i1 %178, label %218, label %179
179: ; preds = %76, %74, %162, %177
%180 = phi i64 [ 0, %74 ], [ 0, %76 ], [ %85, %162 ], [ %167, %177 ]
%181 = xor i64 %180, -1
%182 = add nsw i64 %181, %73
%183 = and i64 %73, 3
%184 = icmp eq i64 %183, 0
br i1 %184, label %194, label %185
185: ; preds = %179, %185
%186 = phi i64 [ %191, %185 ], [ %180, %179 ]
%187 = phi i64 [ %192, %185 ], [ 0, %179 ]
%188 = getelementptr inbounds i8, i8* %59, i64 %186
%189 = load i8, i8* %188
%190 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %186
store i8 %189, i8* %190
%191 = add nuw nsw i64 %186, 1
%192 = add i64 %187, 1
%193 = icmp eq i64 %192, %183
br i1 %193, label %194, label %185
194: ; preds = %185, %179
%195 = phi i64 [ %180, %179 ], [ %191, %185 ]
%196 = icmp ult i64 %182, 3
br i1 %196, label %218, label %199
197: ; preds = %72
%198 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %73
store i8 -128, i8* %198
br label %221
199: ; preds = %194, %199
%200 = phi i64 [ %216, %199 ], [ %195, %194 ]
%201 = getelementptr inbounds i8, i8* %59, i64 %200
%202 = load i8, i8* %201
%203 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %200
store i8 %202, i8* %203
%204 = add nuw nsw i64 %200, 1
%205 = getelementptr inbounds i8, i8* %59, i64 %204
%206 = load i8, i8* %205
%207 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %204
store i8 %206, i8* %207
%208 = add nuw nsw i64 %200, 2
%209 = getelementptr inbounds i8, i8* %59, i64 %208
%210 = load i8, i8* %209
%211 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %208
store i8 %210, i8* %211
%212 = add nuw nsw i64 %200, 3
%213 = getelementptr inbounds i8, i8* %59, i64 %212
%214 = load i8, i8* %213
%215 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %212
store i8 %214, i8* %215
%216 = add nuw nsw i64 %200, 4
%217 = icmp eq i64 %216, %73
br i1 %217, label %218, label %199
218: ; preds = %194, %199, %177, %160
%219 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %73
store i8 -128, i8* %219
%220 = icmp eq i32 %23, 31
br i1 %220, label %228, label %221
221: ; preds = %197, %218
%222 = and i64 %3, 31
%223 = add nuw nsw i64 %222, 1
%224 = getelementptr [32 x i8], [32 x i8]* %8, i64 0, i64 %223
%225 = call i32 @llvm.usub.sat.i32(i32 30, i32 %23)
%226 = add nuw nsw i32 %225, 1
%227 = zext i32 %226 to i64
br label %228
228: ; preds = %218, %63, %221
%229 = bitcast [32 x i8]* %13 to <16 x i8>*
%230 = load <16 x i8>, <16 x i8>* %229
%231 = bitcast [32 x i8]* %8 to <16 x i8>*
%232 = load <16 x i8>, <16 x i8>* %231
%233 = xor <16 x i8> %232, %230
%234 = bitcast [32 x i8]* %8 to <16 x i8>*
store <16 x i8> %233, <16 x i8>* %234
%235 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 16
%236 = bitcast i8* %235 to <16 x i8>*
%237 = load <16 x i8>, <16 x i8>* %236
%238 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 16
%239 = bitcast i8* %238 to <16 x i8>*
%240 = load <16 x i8>, <16 x i8>* %239
%241 = xor <16 x i8> %240, %237
%242 = bitcast i8* %238 to <16 x i8>*
store <16 x i8> %241, <16 x i8>* %242
%243 = select i1 %24, i32 1, i32 2
%244 = call i32 @TEM_ENC(i8* %0, i32 0, i8* %21, i32 %60, i32 %243, i8* %18, i8* %19)
br label %245
245: ; preds = %228, %56
%246 = icmp ugt i64 %5, 63
br i1 %246, label %247, label %278
247: ; preds = %245
%248 = lshr i64 %5, 5
%249 = bitcast [32 x i8]* %11 to <16 x i8>*
%250 = bitcast [32 x i8]* %13 to <16 x i8>*
%251 = bitcast [32 x i8]* %13 to <16 x i8>*
%252 = getelementptr inbounds [32 x i8], [32 x i8]* %11, i64 0, i64 16
%253 = bitcast i8* %252 to <16 x i8>*
%254 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 16
%255 = bitcast i8* %254 to <16 x i8>*
%256 = bitcast i8* %254 to <16 x i8>*
br label %257
257: ; preds = %247, %257
%258 = phi i8* [ %272, %257 ], [ %4, %247 ]
%259 = phi i64 [ %271, %257 ], [ %248, %247 ]
%260 = phi i64 [ %270, %257 ], [ 1, %247 ]
%261 = trunc i64 %260 to i32
%262 = shl i32 %261, 1
%263 = call i32 @TEM_ENC(i8* %0, i32 64, i8* %1, i32 %262, i32 0, i8* %18, i8* %19)
%264 = load <16 x i8>, <16 x i8>* %249
%265 = load <16 x i8>, <16 x i8>* %250
%266 = xor <16 x i8> %265, %264
store <16 x i8> %266, <16 x i8>* %251
%267 = load <16 x i8>, <16 x i8>* %253
%268 = load <16 x i8>, <16 x i8>* %255
%269 = xor <16 x i8> %268, %267
store <16 x i8> %269, <16 x i8>* %256
%270 = add i64 %260, 1
%271 = add i64 %259, -1
%272 = getelementptr inbounds i8, i8* %258, i64 32
%273 = icmp ugt i64 %271, 1
br i1 %273, label %257, label %274
274: ; preds = %257
%275 = trunc i64 %270 to i32
%276 = shl i32 %275, 1
%277 = add i32 %276, -1
br label %278
278: ; preds = %245, %274
%279 = phi i32 [ 1, %245 ], [ %277, %274 ]
%280 = phi i8* [ %4, %245 ], [ %272, %274 ]
%281 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 1, i64 0
%282 = getelementptr i8, i8* %280, i64 32
%283 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 1, i64 0
%284 = icmp ult i8* %9, %282
%285 = icmp ult i8* %280, %281
%286 = and i1 %284, %285
%287 = icmp ult i8* %9, %283
%288 = icmp ult i8* %14, %281
%289 = and i1 %287, %288
%290 = or i1 %286, %289
br i1 %290, label %307, label %291
291: ; preds = %278
%292 = bitcast i8* %280 to <16 x i8>*
%293 = load <16 x i8>, <16 x i8>* %292
%294 = bitcast [32 x i8]* %13 to <16 x i8>*
%295 = load <16 x i8>, <16 x i8>* %294
%296 = xor <16 x i8> %295, %293
%297 = bitcast [32 x i8]* %8 to <16 x i8>*
store <16 x i8> %296, <16 x i8>* %297
%298 = getelementptr inbounds i8, i8* %280, i64 16
%299 = bitcast i8* %298 to <16 x i8>*
%300 = load <16 x i8>, <16 x i8>* %299
%301 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 16
%302 = bitcast i8* %301 to <16 x i8>*
%303 = load <16 x i8>, <16 x i8>* %302
%304 = xor <16 x i8> %303, %300
%305 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 16
%306 = bitcast i8* %305 to <16 x i8>*
store <16 x i8> %304, <16 x i8>* %306
br label %338
307: ; preds = %278, %307
%308 = phi i64 [ %336, %307 ], [ 0, %278 ]
%309 = getelementptr inbounds i8, i8* %280, i64 %308
%310 = load i8, i8* %309
%311 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 %308
%312 = load i8, i8* %311
%313 = xor i8 %312, %310
%314 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %308
store i8 %313, i8* %314
%315 = or i64 %308, 1
%316 = getelementptr inbounds i8, i8* %280, i64 %315
%317 = load i8, i8* %316
%318 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 %315
%319 = load i8, i8* %318
%320 = xor i8 %319, %317
%321 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %315
store i8 %320, i8* %321
%322 = or i64 %308, 2
%323 = getelementptr inbounds i8, i8* %280, i64 %322
%324 = load i8, i8* %323
%325 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 %322
%326 = load i8, i8* %325
%327 = xor i8 %326, %324
%328 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %322
store i8 %327, i8* %328
%329 = or i64 %308, 3
%330 = getelementptr inbounds i8, i8* %280, i64 %329
%331 = load i8, i8* %330
%332 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 %329
%333 = load i8, i8* %332
%334 = xor i8 %333, %331
%335 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 %329
store i8 %334, i8* %335
%336 = add nuw nsw i64 %308, 4
%337 = icmp eq i64 %336, 32
br i1 %337, label %338, label %307
338: ; preds = %307, %291
%339 = call i32 @TEM_ENC(i8* %0, i32 64, i8* %1, i32 %279, i32 1, i8* %18, i8* %19)
ret void
}