int jhae_encryption_authentication(unsigned char *c, unsigned long long *clen,
                                   unsigned char *t, const unsigned char *key,
                                   const unsigned char *noc,
                                   const unsigned char *msg,
                                   unsigned long long msglen,
                                   const unsigned char *ad,
                                   unsigned long long adlen) {
  unsigned long long i;
  int j, k;
  unsigned char *yprim;
  unsigned char *y;
  unsigned char *xprim;
  unsigned char *x;
  const unsigned char *m;
  const unsigned char *mnext;
  i = msglen + 13;
  i += i % 32 == 0 ? 0 : 32 - (i % 32);
  *clen = i;
  x = (unsigned char *)malloc(2 * 32 * sizeof(unsigned char));
  xprim = x + 32;
  y = (unsigned char *)malloc(2 * 32 * sizeof(unsigned char));
  yprim = y + 32;
  if (x == 0x0 || xprim == 0x0 || y == 0x0 || yprim == 0x0)
    return -2;
  m = noc;
  mnext = ad;
  for (i = 0; i < 32; i++) {
    xprim[i] = noc[i];
    x[i] = key[i];
  }
  if (adlen != 0) {
    unsigned long long ab = adlen / 32;
    for (i = 0; i < ab; i++) {
      artemia_permutation(x, y);
      for (j = 0; j < 32; j++) {
        xprim[j] = yprim[j] ^ mnext[j];
        x[j] = y[j] ^ m[j];
      }
      m = mnext;
      mnext += 32;
    }
    unsigned char *padded;
    padded = padding_associated_data(mnext, adlen % 32, &k);
    mnext = padded;
    for (i = 0; i < k / 32; i++) {
      artemia_permutation(x, y);
      for (j = 0; j < 32; j++) {
        xprim[j] = yprim[j] ^ mnext[j];
        x[j] = y[j] ^ m[j];
      }
      m = mnext;
      mnext += 32;
    }
  }
  unsigned long long mb = msglen / 32;
  mnext = msg;
  for (i = 0; i < mb; i++) {
    artemia_permutation(x, y);
    for (j = 0; j < 32; j++) {
      xprim[j] = yprim[j] ^ mnext[j];
      x[j] = y[j] ^ m[j];
      c[i * 32 + j] = xprim[j];
    }
    m = mnext;
    mnext += 32;
  }
  unsigned char *padded;
  padded = padding_message(mnext, msglen % 32, msglen, noc, ad, adlen, &k);
  mnext = padded;
  for (i = 0; i < k / 32; i++) {
    artemia_permutation(x, y);
    for (j = 0; j < 32; j++) {
      xprim[j] = yprim[j] ^ mnext[j];
      x[j] = y[j] ^ m[j];
      c[(mb + i) * 32 + j] = xprim[j];
    }
    m = mnext;
    mnext += 32;
  }
  artemia_permutation(x, y);
  for (j = 0; j < 32; j++) {
    t[j] = y[j] ^ m[j] ^ key[j];
  }
  m = mnext = 0x0;
  xprim = yprim = 0x0;
  free(y);
  free(x);
  return 0;
}


x86 assembly (clang, -O0):
<jhae_encryption_authentication>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    0x10(%rbp),%rax
add    $0xd,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
and    $0x1f,%rax
cmp    $0x0,%rax
jne    11ab <jhae_encryption_authentication+0x5b>
xor    %eax,%eax
mov    %rax,-0xa0(%rbp)
jmp    11c2 <jhae_encryption_authentication+0x72>
mov    -0x40(%rbp),%rcx
and    $0x1f,%rcx
mov    $0x20,%eax
sub    %rcx,%rax
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rax
add    -0x40(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    $0x40,%edi
call   1060 <malloc@plt>
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x60(%rbp)
mov    $0x40,%edi
call   1060 <malloc@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x68(%rbp)
je     123c <jhae_encryption_authentication+0xec>
cmpq   $0x0,-0x60(%rbp)
je     123c <jhae_encryption_authentication+0xec>
cmpq   $0x0,-0x58(%rbp)
je     123c <jhae_encryption_authentication+0xec>
cmpq   $0x0,-0x50(%rbp)
jne    1248 <jhae_encryption_authentication+0xf8>
movl   $0xfffffffe,-0x4(%rbp)
jmp    1743 <jhae_encryption_authentication+0x5f3>
mov    -0x30(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    0x18(%rbp),%rax
mov    %rax,-0x78(%rbp)
movq   $0x0,-0x40(%rbp)
cmpq   $0x20,-0x40(%rbp)
jae    12a8 <jhae_encryption_authentication+0x158>
mov    -0x30(%rbp),%rax
mov    -0x40(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x60(%rbp),%rax
mov    -0x40(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x68(%rbp),%rax
mov    -0x40(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    1260 <jhae_encryption_authentication+0x110>
cmpq   $0x0,0x20(%rbp)
je     147a <jhae_encryption_authentication+0x32a>
mov    0x20(%rbp),%rax
shr    $0x5,%rax
mov    %rax,-0x80(%rbp)
movq   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%rax
cmp    -0x80(%rbp),%rax
jae    1376 <jhae_encryption_authentication+0x226>
mov    -0x68(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    $0x0,%al
call   1040 <artemia_permutation@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0x20,-0x44(%rbp)
jge    1351 <jhae_encryption_authentication+0x201>
mov    -0x50(%rbp),%rax
movslq -0x44(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x78(%rbp),%rcx
movslq -0x44(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
xor    %ecx,%eax
mov    %al,%dl
mov    -0x60(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x58(%rbp),%rax
movslq -0x44(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x70(%rbp),%rcx
movslq -0x44(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
xor    %ecx,%eax
mov    %al,%dl
mov    -0x68(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12eb <jhae_encryption_authentication+0x19b>
mov    -0x78(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x78(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x78(%rbp)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    12c7 <jhae_encryption_authentication+0x177>
mov    -0x78(%rbp),%rdi
mov    0x20(%rbp),%rsi
and    $0x1f,%rsi
lea    -0x48(%rbp),%rdx
mov    $0x0,%al
call   1070 <padding_associated_data@plt>
cltq
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
mov    %rax,-0x78(%rbp)
movq   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x48(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xa8(%rbp),%rax
movslq %ecx,%rcx
cmp    %rcx,%rax
jae    1475 <jhae_encryption_authentication+0x325>
mov    -0x68(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    $0x0,%al
call   1040 <artemia_permutation@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0x20,-0x44(%rbp)
jge    1450 <jhae_encryption_authentication+0x300>
mov    -0x50(%rbp),%rax
movslq -0x44(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x78(%rbp),%rcx
movslq -0x44(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
xor    %ecx,%eax
mov    %al,%dl
mov    -0x60(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x58(%rbp),%rax
movslq -0x44(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x70(%rbp),%rcx
movslq -0x44(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
xor    %ecx,%eax
mov    %al,%dl
mov    -0x68(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    13ea <jhae_encryption_authentication+0x29a>
mov    -0x78(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x78(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x78(%rbp)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    13a9 <jhae_encryption_authentication+0x259>
jmp    147a <jhae_encryption_authentication+0x32a>
mov    0x10(%rbp),%rax
shr    $0x5,%rax
mov    %rax,-0x90(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x78(%rbp)
movq   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%rax
cmp    -0x90(%rbp),%rax
jae    156c <jhae_encryption_authentication+0x41c>
mov    -0x68(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    $0x0,%al
call   1040 <artemia_permutation@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0x20,-0x44(%rbp)
jge    1547 <jhae_encryption_authentication+0x3f7>
mov    -0x50(%rbp),%rax
movslq -0x44(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x78(%rbp),%rcx
movslq -0x44(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
xor    %ecx,%eax
mov    %al,%dl
mov    -0x60(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x58(%rbp),%rax
movslq -0x44(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x70(%rbp),%rcx
movslq -0x44(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
xor    %ecx,%eax
mov    %al,%dl
mov    -0x68(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x60(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x10(%rbp),%rax
mov    -0x40(%rbp),%rcx
shl    $0x5,%rcx
movslq -0x44(%rbp),%rsi
add    %rsi,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    14c0 <jhae_encryption_authentication+0x370>
mov    -0x78(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x78(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x78(%rbp)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    1499 <jhae_encryption_authentication+0x349>
mov    -0x78(%rbp),%rdi
mov    0x10(%rbp),%rsi
and    $0x1f,%rsi
mov    0x10(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    0x18(%rbp),%r8
mov    0x20(%rbp),%r9
lea    -0x48(%rbp),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   1050 <padding_message@plt>
cltq
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rax
mov    %rax,-0x78(%rbp)
movq   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x48(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xb0(%rbp),%rax
movslq %ecx,%rcx
cmp    %rcx,%rax
jae    16a7 <jhae_encryption_authentication+0x557>
mov    -0x68(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    $0x0,%al
call   1040 <artemia_permutation@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0x20,-0x44(%rbp)
jge    1682 <jhae_encryption_authentication+0x532>
mov    -0x50(%rbp),%rax
movslq -0x44(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x78(%rbp),%rcx
movslq -0x44(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
xor    %ecx,%eax
mov    %al,%dl
mov    -0x60(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x58(%rbp),%rax
movslq -0x44(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x70(%rbp),%rcx
movslq -0x44(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
xor    %ecx,%eax
mov    %al,%dl
mov    -0x68(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x60(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x10(%rbp),%rax
mov    -0x90(%rbp),%rcx
add    -0x40(%rbp),%rcx
shl    $0x5,%rcx
movslq -0x44(%rbp),%rsi
add    %rsi,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    15f4 <jhae_encryption_authentication+0x4a4>
mov    -0x78(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x78(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x78(%rbp)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    15b3 <jhae_encryption_authentication+0x463>
mov    -0x68(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    $0x0,%al
call   1040 <artemia_permutation@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0x20,-0x44(%rbp)
jge    170a <jhae_encryption_authentication+0x5ba>
mov    -0x58(%rbp),%rax
movslq -0x44(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x70(%rbp),%rcx
movslq -0x44(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
xor    %ecx,%eax
mov    -0x28(%rbp),%rcx
movslq -0x44(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
xor    %ecx,%eax
mov    %al,%dl
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    16bd <jhae_encryption_authentication+0x56d>
movq   $0x0,-0x78(%rbp)
movq   $0x0,-0x70(%rbp)
movq   $0x0,-0x50(%rbp)
movq   $0x0,-0x60(%rbp)
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jhae_encryption_authentication>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %r9,0x30(%rsp)
mov    %r8,%rbp
mov    %rcx,%r15
mov    %rdx,%r14
mov    %rdi,0x20(%rsp)
mov    0xd0(%rsp),%rdx
lea    0xd(%rdx),%rax
and    $0x1f,%eax
mov    $0x20,%ecx
sub    %rax,%rcx
test   %rax,%rax
cmove  %rax,%rcx
lea    (%rcx,%rdx,1),%rax
add    $0xd,%rax
mov    %rax,(%rsi)
mov    $0x40,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    $0x40,%edi
call   1060 <malloc@plt>
mov    %rax,%r12
mov    $0xfffffffe,%eax
test   %rbx,%rbx
je     17bd <jhae_encryption_authentication+0x66d>
test   %r12,%r12
je     17bd <jhae_encryption_authentication+0x66d>
mov    %r14,0x88(%rsp)
movups (%r15),%xmm0
mov    %r15,0x80(%rsp)
movups 0x10(%r15),%xmm1
movups %xmm1,0x10(%rbx)
movups %xmm0,(%rbx)
movups 0x0(%rbp),%xmm0
movups %xmm0,0x20(%rbx)
movups 0x10(%rbp),%xmm0
movups %xmm0,0x30(%rbx)
mov    %rbp,0x28(%rsp)
mov    %rbp,%r15
cmpq   $0x0,0xe0(%rsp)
je     1257 <jhae_encryption_authentication+0x107>
mov    0x28(%rsp),%r14
mov    0xd8(%rsp),%rdi
cmpq   $0x20,0xe0(%rsp)
jae    17cf <jhae_encryption_authentication+0x67f>
mov    0xe0(%rsp),%rsi
and    $0x1f,%esi
lea    0xc(%rsp),%rdx
xor    %eax,%eax
call   1070 <padding_associated_data@plt>
mov    0xc(%rsp),%ecx
add    $0x1f,%ecx
cmp    $0x3f,%ecx
jae    1906 <jhae_encryption_authentication+0x7b6>
mov    %r14,%r15
lea    0x20(%r12),%rbp
mov    0xd0(%rsp),%rax
mov    %rax,%rcx
shr    $0x5,%rcx
cmp    $0x20,%rax
mov    %rcx,0x70(%rsp)
jae    136f <jhae_encryption_authentication+0x21f>
mov    %r15,%r14
mov    0x30(%rsp),%rdi
mov    0xd0(%rsp),%r15
mov    %r15d,%esi
and    $0x1f,%esi
lea    0xc(%rsp),%rax
mov    %rax,(%rsp)
mov    %r15,%rdx
mov    0x28(%rsp),%rcx
mov    0xd8(%rsp),%r8
mov    0xe0(%rsp),%r9
xor    %eax,%eax
call   1050 <padding_message@plt>
mov    0xc(%rsp),%ecx
add    $0x1f,%ecx
cmp    $0x3f,%ecx
jae    154d <jhae_encryption_authentication+0x3fd>
mov    %r14,%rsi
mov    %rbx,%rdi
mov    %rsi,%r14
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <artemia_permutation@plt>
mov    0x88(%rsp),%rdx
lea    0x20(%rdx),%rsi
lea    0x20(%r14),%rax
mov    0x80(%rsp),%rdi
lea    0x20(%rdi),%r11
cmp    %rdx,%rbp
seta   %r9b
cmp    %rsi,%r12
setb   %r10b
cmp    %rdx,%rax
seta   %cl
mov    %r14,%rbp
cmp    %rsi,%r14
setb   %r8b
cmp    %rdx,%r11
seta   %al
cmp    %rdi,%rsi
seta   %sil
test   %r10b,%r9b
jne    177c <jhae_encryption_authentication+0x62c>
and    %r8b,%cl
jne    177c <jhae_encryption_authentication+0x62c>
and    %sil,%al
jne    177c <jhae_encryption_authentication+0x62c>
movups (%r12),%xmm0
movups 0x0(%rbp),%xmm1
xorps  %xmm0,%xmm1
movups (%rdi),%xmm0
xorps  %xmm1,%xmm0
movups %xmm0,(%rdx)
movups 0x10(%r12),%xmm0
movups 0x10(%rbp),%xmm1
xorps  %xmm0,%xmm1
movups 0x10(%rdi),%xmm0
xorps  %xmm1,%xmm0
movups %xmm0,0x10(%rdx)
jmp    17ab <jhae_encryption_authentication+0x65b>
cmp    $0x2,%rcx
mov    $0x1,%edx
cmovae %rcx,%rdx
mov    %rdx,0x58(%rsp)
lea    0x40(%rbx),%rcx
lea    0x40(%r12),%rax
mov    %rax,0x48(%rsp)
cmp    %rax,%rbx
setb   %al
mov    %rcx,0x50(%rsp)
cmp    %rcx,%r12
setb   %cl
and    %al,%cl
mov    %cl,0x40(%rsp)
mov    0x20(%rsp),%r13
xor    %esi,%esi
mov    0x30(%rsp),%rdi
jmp    1439 <jhae_encryption_authentication+0x2e9>
nopw   0x0(%rax,%rax,1)
movups 0x20(%r12),%xmm0
movups (%r14),%xmm1
xorps  %xmm0,%xmm1
movups %xmm1,0x20(%rbx)
movups (%r12),%xmm0
movups (%r15),%xmm2
xorps  %xmm0,%xmm2
movups %xmm2,(%rbx)
mov    0x20(%rsp),%rax
mov    0x60(%rsp),%rcx
movups %xmm1,(%rax,%rcx,1)
movups 0x30(%r12),%xmm0
movups 0x10(%r14),%xmm1
xorps  %xmm0,%xmm1
movups %xmm1,0x30(%rbx)
movups 0x10(%r12),%xmm0
movups 0x10(%r15),%xmm2
xorps  %xmm0,%xmm2
movups %xmm2,0x10(%rbx)
or     $0x10,%rcx
movups %xmm1,(%rax,%rcx,1)
mov    0x38(%rsp),%rsi
lea    0x20(%r14),%rdi
add    $0x1,%rsi
add    $0x20,%r13
mov    %r14,%r15
cmp    0x58(%rsp),%rsi
je     1282 <jhae_encryption_authentication+0x132>
mov    %rdi,%r14
mov    %rsi,0x38(%rsp)
shl    $0x5,%rsi
mov    0x20(%rsp),%rax
lea    (%rax,%rsi,1),%rcx
mov    %rcx,0x18(%rsp)
add    %rsi,%rax
add    $0x20,%rax
mov    %rax,0x68(%rsp)
mov    0x30(%rsp),%rax
mov    %rsi,0x60(%rsp)
lea    0x20(%rax,%rsi,1),%rax
mov    %rax,0x10(%rsp)
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <artemia_permutation@plt>
lea    0x20(%r15),%r10
mov    0x68(%rsp),%r9
cmp    %r9,%rbx
setb   %cl
mov    0x50(%rsp),%rdi
mov    0x18(%rsp),%rsi
cmp    %rdi,%rsi
setb   %dl
and    %cl,%dl
cmp    %r10,%rbx
setb   %cl
cmp    %rdi,%r15
setb   %al
and    %cl,%al
or     %dl,%al
mov    0x10(%rsp),%rdx
cmp    %rdx,%rbx
setb   %r8b
cmp    %rdi,%r14
setb   %cl
and    %r8b,%cl
or     %al,%cl
or     0x40(%rsp),%cl
mov    %rsi,%rax
cmp    %r10,%rsi
setb   %r11b
mov    %r9,%rsi
cmp    %r9,%r15
setb   %r8b
cmp    %rdx,%rax
setb   %r10b
cmp    %r9,%r14
setb   %dil
cmp    0x48(%rsp),%rax
setb   %r9b
cmp    %rsi,%r12
setb   %sil
test   %cl,%cl
jne    1515 <jhae_encryption_authentication+0x3c5>
and    %r8b,%r11b
jne    1515 <jhae_encryption_authentication+0x3c5>
and    %dil,%r10b
jne    1515 <jhae_encryption_authentication+0x3c5>
and    %sil,%r9b
je     13c0 <jhae_encryption_authentication+0x270>
xor    %eax,%eax
mov    0x38(%rsp),%rsi
nopl   0x0(%rax)
movzbl (%r14,%rax,1),%ecx
xor    0x0(%rbp,%rax,1),%cl
mov    %cl,0x20(%rbx,%rax,1)
movzbl (%r15,%rax,1),%edx
xor    -0x20(%rbp,%rax,1),%dl
mov    %dl,(%rbx,%rax,1)
mov    %cl,0x0(%r13,%rax,1)
add    $0x1,%rax
cmp    $0x20,%rax
jne    1520 <jhae_encryption_authentication+0x3d0>
jmp    141f <jhae_encryption_authentication+0x2cf>
movslq %eax,%rcx
lea    0x40(%rbx),%rdx
and    $0xffffffffffffffe0,%r15
lea    0x20(%r15),%rax
mov    %rax,0x28(%rsp)
lea    0x40(%r12),%rax
mov    %rax,0x90(%rsp)
cmp    %rax,%rbx
setb   %al
mov    %rdx,0x40(%rsp)
cmp    %rdx,%r12
setb   %dl
and    %al,%dl
mov    %dl,0xb(%rsp)
mov    0x70(%rsp),%r13
shl    $0x5,%r13
add    0x20(%rsp),%r13
xor    %edi,%edi
mov    %rcx,%rax
mov    %rcx,0x48(%rsp)
mov    %r15,0x78(%rsp)
jmp    1648 <jhae_encryption_authentication+0x4f8>
nopw   0x0(%rax,%rax,1)
mov    0x70(%rsp),%rax
mov    0x38(%rsp),%rdi
add    %rdi,%rax
shl    $0x5,%rax
movups 0x20(%r12),%xmm0
mov    0x10(%rsp),%rsi
movups (%rsi),%xmm1
xorps  %xmm0,%xmm1
movups %xmm1,0x20(%rbx)
movups (%r12),%xmm0
movups (%r14),%xmm2
xorps  %xmm0,%xmm2
movups %xmm2,(%rbx)
mov    0x20(%rsp),%rcx
movups %xmm1,(%rcx,%rax,1)
movups 0x30(%r12),%xmm0
movups 0x10(%rsi),%xmm1
xorps  %xmm0,%xmm1
movups %xmm1,0x30(%rbx)
movups 0x10(%r12),%xmm0
movups 0x10(%r14),%xmm2
xorps  %xmm0,%xmm2
movups %xmm2,0x10(%rbx)
or     $0x10,%rax
movups %xmm1,(%rcx,%rax,1)
mov    0x78(%rsp),%r15
lea    0x20(%rsi),%rax
add    $0x1,%rdi
mov    0xc(%rsp),%ecx
lea    0x1f(%rcx),%edx
test   %ecx,%ecx
cmovns %ecx,%edx
sar    $0x5,%edx
movslq %edx,%rcx
add    $0x20,%r13
mov    %rsi,%r14
cmp    %rcx,%rdi
jae    12cb <jhae_encryption_authentication+0x17b>
mov    %rax,0x10(%rsp)
mov    %rdi,0x38(%rsp)
mov    %rdi,%rax
shl    $0x5,%rax
lea    (%r15,%rax,1),%rdx
mov    0x20(%rsp),%rcx
add    %rcx,%rdx
mov    %rdx,0x68(%rsp)
mov    0x28(%rsp),%rdx
lea    (%rdx,%rax,1),%r15
add    %rcx,%r15
mov    0x48(%rsp),%rcx
add    %rcx,%rax
add    $0x20,%rax
mov    %rax,0x18(%rsp)
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <artemia_permutation@plt>
lea    0x20(%r14),%rdi
cmp    %r15,%rbx
setb   %al
mov    0x40(%rsp),%rdx
mov    0x68(%rsp),%rsi
cmp    %rdx,%rsi
setb   %r8b
and    %al,%r8b
or     0xb(%rsp),%r8b
cmp    %rdi,%rbx
setb   %cl
cmp    %rdx,%r14
setb   0x60(%rsp)
mov    0x18(%rsp),%r11
cmp    %r11,%rbx
setb   %al
mov    0x10(%rsp),%r10
cmp    %rdx,%r10
setb   0x30(%rsp)
cmp    0x90(%rsp),%rsi
setb   %dl
cmp    %r15,%r12
setb   0x58(%rsp)
cmp    %rdi,%rsi
setb   %r9b
cmp    %r15,%r14
setb   0x50(%rsp)
cmp    %r11,%rsi
setb   %dil
cmp    %r15,%r10
setb   %r15b
test   %r8b,%r8b
jne    1734 <jhae_encryption_authentication+0x5e4>
and    0x60(%rsp),%cl
jne    1734 <jhae_encryption_authentication+0x5e4>
and    0x30(%rsp),%al
jne    1734 <jhae_encryption_authentication+0x5e4>
and    0x58(%rsp),%dl
jne    1734 <jhae_encryption_authentication+0x5e4>
and    0x50(%rsp),%r9b
jne    1734 <jhae_encryption_authentication+0x5e4>
and    %r15b,%dil
je     15b0 <jhae_encryption_authentication+0x460>
xor    %eax,%eax
mov    0x78(%rsp),%r15
mov    0x10(%rsp),%rsi
mov    0x38(%rsp),%rdi
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rax,1),%ecx
xor    0x0(%rbp,%rax,1),%cl
mov    %cl,0x20(%rbx,%rax,1)
movzbl (%r14,%rax,1),%edx
xor    -0x20(%rbp,%rax,1),%dl
mov    %dl,(%rbx,%rax,1)
mov    %cl,0x0(%r13,%rax,1)
add    $0x1,%rax
cmp    $0x20,%rax
jne    1750 <jhae_encryption_authentication+0x600>
jmp    161e <jhae_encryption_authentication+0x4ce>
xor    %eax,%eax
xchg   %ax,%ax
movzbl 0x0(%rbp,%rax,1),%ecx
xor    (%r12,%rax,1),%cl
xor    (%rdi,%rax,1),%cl
mov    %cl,(%rdx,%rax,1)
movzbl 0x1(%rbp,%rax,1),%ecx
xor    0x1(%r12,%rax,1),%cl
xor    0x1(%rdi,%rax,1),%cl
mov    %cl,0x1(%rdx,%rax,1)
add    $0x2,%rax
cmp    $0x20,%rax
jne    1780 <jhae_encryption_authentication+0x630>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0xe0(%rsp),%rax
shr    $0x5,%rax
mov    %rax,0x10(%rsp)
lea    0x40(%rbx),%r15
lea    0x40(%r12),%rax
cmp    %rax,%rbx
setb   %al
cmp    %r15,%r12
setb   %cl
and    %al,%cl
mov    %cl,0x18(%rsp)
xor    %r13d,%r13d
mov    0xd8(%rsp),%rdi
mov    0x28(%rsp),%rbp
jmp    1869 <jhae_encryption_authentication+0x719>
nopl   (%rax)
movups 0x20(%r12),%xmm0
movups (%r14),%xmm1
xorps  %xmm0,%xmm1
movups %xmm1,0x20(%rbx)
movups (%r12),%xmm0
movups 0x0(%rbp),%xmm1
xorps  %xmm0,%xmm1
movups %xmm1,(%rbx)
movups 0x30(%r12),%xmm0
movups 0x10(%r14),%xmm1
xorps  %xmm0,%xmm1
movups %xmm1,0x30(%rbx)
movups 0x10(%r12),%xmm0
movups 0x10(%rbp),%xmm1
xorps  %xmm0,%xmm1
movups %xmm1,0x10(%rbx)
lea    0x20(%r14),%rdi
add    $0x1,%r13
mov    %r14,%rbp
cmp    0x10(%rsp),%r13
je     122d <jhae_encryption_authentication+0xdd>
mov    %rdi,%r14
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <artemia_permutation@plt>
mov    %r13,%rax
shl    $0x5,%rax
mov    0xd8(%rsp),%rcx
add    %rcx,%rax
add    $0x20,%rax
lea    0x20(%rbp),%rcx
cmp    %rcx,%rbx
setb   %cl
cmp    %r15,%rbp
setb   %dl
and    %cl,%dl
or     0x18(%rsp),%dl
cmp    %rax,%rbx
setb   %al
cmp    %r15,%r14
setb   %cl
test   %dl,%dl
jne    18bd <jhae_encryption_authentication+0x76d>
and    %cl,%al
je     1810 <jhae_encryption_authentication+0x6c0>
xor    %eax,%eax
nop
movzbl (%r14,%rax,1),%ecx
xor    0x20(%r12,%rax,1),%cl
mov    %cl,0x20(%rbx,%rax,1)
movzbl 0x0(%rbp,%rax,1),%ecx
xor    (%r12,%rax,1),%cl
mov    %cl,(%rbx,%rax,1)
movzbl 0x1(%r14,%rax,1),%ecx
xor    0x21(%r12,%rax,1),%cl
mov    %cl,0x21(%rbx,%rax,1)
movzbl 0x1(%rbp,%rax,1),%ecx
xor    0x1(%r12,%rax,1),%cl
mov    %cl,0x1(%rbx,%rax,1)
add    $0x2,%rax
cmp    $0x20,%rax
jne    18c0 <jhae_encryption_authentication+0x770>
jmp    1853 <jhae_encryption_authentication+0x703>
movslq %eax,%rcx
lea    0x40(%rbx),%r13
lea    0x40(%r12),%rax
cmp    %rax,%rbx
setb   %al
cmp    %r13,%r12
setb   %dl
and    %al,%dl
mov    %dl,0x18(%rsp)
xor    %ebp,%ebp
mov    %rcx,%rax
mov    %rcx,0x10(%rsp)
jmp    199a <jhae_encryption_authentication+0x84a>
movups 0x20(%r12),%xmm0
movups (%r15),%xmm1
xorps  %xmm0,%xmm1
movups %xmm1,0x20(%rbx)
movups (%r12),%xmm0
movups (%r14),%xmm1
xorps  %xmm0,%xmm1
movups %xmm1,(%rbx)
movups 0x30(%r12),%xmm0
movups 0x10(%r15),%xmm1
xorps  %xmm0,%xmm1
movups %xmm1,0x30(%rbx)
movups 0x10(%r12),%xmm0
movups 0x10(%r14),%xmm1
xorps  %xmm0,%xmm1
movups %xmm1,0x10(%rbx)
add    $0x1,%rbp
mov    0xc(%rsp),%eax
lea    0x1f(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
lea    0x20(%r15),%rax
sar    $0x5,%ecx
movslq %ecx,%rcx
mov    %r15,%r14
cmp    %rcx,%rbp
jae    1257 <jhae_encryption_authentication+0x107>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <artemia_permutation@plt>
mov    %rbp,%rax
shl    $0x5,%rax
mov    0x10(%rsp),%rcx
add    %rcx,%rax
add    $0x20,%rax
lea    0x20(%r14),%rcx
cmp    %rcx,%rbx
setb   %cl
cmp    %r13,%r14
setb   %dl
and    %cl,%dl
or     0x18(%rsp),%dl
cmp    %rax,%rbx
setb   %al
cmp    %r13,%r15
setb   %cl
test   %dl,%dl
jne    19eb <jhae_encryption_authentication+0x89b>
and    %cl,%al
je     1930 <jhae_encryption_authentication+0x7e0>
xor    %eax,%eax
nopl   (%rax)
movzbl (%r15,%rax,1),%ecx
xor    0x20(%r12,%rax,1),%cl
mov    %cl,0x20(%rbx,%rax,1)
movzbl (%r14,%rax,1),%ecx
xor    (%r12,%rax,1),%cl
mov    %cl,(%rbx,%rax,1)
movzbl 0x1(%r15,%rax,1),%ecx
xor    0x21(%r12,%rax,1),%cl
mov    %cl,0x21(%rbx,%rax,1)
movzbl 0x1(%r14,%rax,1),%ecx
xor    0x1(%r12,%rax,1),%cl
mov    %cl,0x1(%rbx,%rax,1)
add    $0x2,%rax
cmp    $0x20,%rax
jne    19f0 <jhae_encryption_authentication+0x8a0>
jmp    1974 <jhae_encryption_authentication+0x824>

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

LLVM IR (-O2):
define i32 @jhae_encryption_authentication(i8* nocapture writeonly %0, i64* nocapture writeonly %1, i8* nocapture writeonly %2, i8* nocapture %3, i8* %4, i8* %5, i64 %6, i8* %7, i64 %8) {
%10 = alloca i32
%11 = bitcast i32* %10 to i8*
%12 = add i64 %6, 13
%13 = and i64 %12, 31
%14 = icmp eq i64 %13, 0
%15 = sub nuw nsw i64 32, %13
%16 = select i1 %14, i64 0, i64 %15
%17 = add i64 %16, %12
store i64 %17, i64* %1
%18 = tail call dereferenceable_or_null(64) i8* @malloc(i64 64)
%19 = getelementptr i8, i8* %18, i64 32
%20 = tail call dereferenceable_or_null(64) i8* @malloc(i64 64)
%21 = getelementptr i8, i8* %20, i64 32
%22 = icmp eq i8* %18, null
%23 = icmp eq i8* %20, null
%24 = or i1 %22, %23
br i1 %24, label %512, label %25
25: ; preds = %9
%26 = bitcast i8* %4 to <16 x i8>*
%27 = load <16 x i8>, <16 x i8>* %26
%28 = bitcast i8* %19 to <16 x i8>*
store <16 x i8> %27, <16 x i8>* %28
%29 = getelementptr inbounds i8, i8* %4, i64 16
%30 = getelementptr i8, i8* %18, i64 48
%31 = bitcast i8* %29 to <16 x i8>*
%32 = load <16 x i8>, <16 x i8>* %31
%33 = bitcast i8* %30 to <16 x i8>*
store <16 x i8> %32, <16 x i8>* %33
%34 = icmp eq i64 %8, 0
br i1 %34, label %225, label %35
35: ; preds = %25
%36 = icmp ult i64 %8, 32
br i1 %36, label %125, label %37
37: ; preds = %35
%38 = lshr i64 %8, 5
%39 = getelementptr i8, i8* %18, i64 64
%40 = getelementptr i8, i8* %20, i64 64
%41 = icmp ult i8* %18, %40
%42 = icmp ult i8* %20, %39
%43 = and i1 %41, %42
%44 = bitcast i8* %21 to <16 x i8>*
%45 = bitcast i8* %19 to <16 x i8>*
%46 = bitcast i8* %20 to <16 x i8>*
%47 = bitcast i8* %18 to <16 x i8>*
%48 = getelementptr i8, i8* %20, i64 48
%49 = bitcast i8* %48 to <16 x i8>*
%50 = getelementptr i8, i8* %18, i64 48
%51 = bitcast i8* %50 to <16 x i8>*
%52 = getelementptr inbounds i8, i8* %20, i64 16
%53 = bitcast i8* %52 to <16 x i8>*
%54 = getelementptr inbounds i8, i8* %18, i64 16
%55 = bitcast i8* %54 to <16 x i8>*
br label %56
56: ; preds = %37, %121
%57 = phi i64 [ %123, %121 ], [ 0, %37 ]
%58 = phi i8* [ %122, %121 ], [ %7, %37 ]
%59 = phi i8* [ %58, %121 ], [ %4, %37 ]
%60 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @artemia_permutation to i32 (i8*, i8*, ...)*)(i8* %18, i8* %20)
%61 = shl nuw i64 %57, 5
%62 = add i64 %61, 32
%63 = getelementptr i8, i8* %7, i64 %62
%64 = getelementptr i8, i8* %59, i64 32
%65 = icmp ult i8* %18, %64
%66 = icmp ult i8* %59, %39
%67 = and i1 %65, %66
%68 = or i1 %43, %67
%69 = icmp ult i8* %18, %63
%70 = icmp ult i8* %58, %39
%71 = and i1 %69, %70
%72 = or i1 %68, %71
br i1 %72, label %92, label %73
73: ; preds = %56
%74 = load <16 x i8>, <16 x i8>* %44
%75 = bitcast i8* %58 to <16 x i8>*
%76 = load <16 x i8>, <16 x i8>* %75
%77 = xor <16 x i8> %76, %74
store <16 x i8> %77, <16 x i8>* %45
%78 = load <16 x i8>, <16 x i8>* %46
%79 = bitcast i8* %59 to <16 x i8>*
%80 = load <16 x i8>, <16 x i8>* %79
%81 = xor <16 x i8> %80, %78
store <16 x i8> %81, <16 x i8>* %47
%82 = load <16 x i8>, <16 x i8>* %49
%83 = getelementptr inbounds i8, i8* %58, i64 16
%84 = bitcast i8* %83 to <16 x i8>*
%85 = load <16 x i8>, <16 x i8>* %84
%86 = xor <16 x i8> %85, %82
store <16 x i8> %86, <16 x i8>* %51
%87 = load <16 x i8>, <16 x i8>* %53
%88 = getelementptr inbounds i8, i8* %59, i64 16
%89 = bitcast i8* %88 to <16 x i8>*
%90 = load <16 x i8>, <16 x i8>* %89
%91 = xor <16 x i8> %90, %87
store <16 x i8> %91, <16 x i8>* %55
br label %121
92: ; preds = %56, %92
%93 = phi i64 [ %119, %92 ], [ 0, %56 ]
%94 = getelementptr inbounds i8, i8* %21, i64 %93
%95 = load i8, i8* %94
%96 = getelementptr inbounds i8, i8* %58, i64 %93
%97 = load i8, i8* %96
%98 = xor i8 %97, %95
%99 = getelementptr inbounds i8, i8* %19, i64 %93
store i8 %98, i8* %99
%100 = getelementptr inbounds i8, i8* %20, i64 %93
%101 = load i8, i8* %100
%102 = getelementptr inbounds i8, i8* %59, i64 %93
%103 = load i8, i8* %102
%104 = xor i8 %103, %101
%105 = getelementptr inbounds i8, i8* %18, i64 %93
store i8 %104, i8* %105
%106 = or i64 %93, 1
%107 = getelementptr inbounds i8, i8* %21, i64 %106
%108 = load i8, i8* %107
%109 = getelementptr inbounds i8, i8* %58, i64 %106
%110 = load i8, i8* %109
%111 = xor i8 %110, %108
%112 = getelementptr inbounds i8, i8* %19, i64 %106
store i8 %111, i8* %112
%113 = getelementptr inbounds i8, i8* %20, i64 %106
%114 = load i8, i8* %113
%115 = getelementptr inbounds i8, i8* %59, i64 %106
%116 = load i8, i8* %115
%117 = xor i8 %116, %114
%118 = getelementptr inbounds i8, i8* %18, i64 %106
store i8 %117, i8* %118
%119 = add nuw nsw i64 %93, 2
%120 = icmp eq i64 %119, 32
br i1 %120, label %121, label %92
121: ; preds = %92, %73
%122 = getelementptr inbounds i8, i8* %58, i64 32
%123 = add nuw nsw i64 %57, 1
%124 = icmp eq i64 %123, %38
br i1 %124, label %125, label %56
125: ; preds = %121, %35
%126 = phi i8* [ %4, %35 ], [ %58, %121 ]
%127 = phi i8* [ %7, %35 ], [ %122, %121 ]
%128 = and i64 %8, 31
%129 = call i32 (i8*, i64, i32*, ...) bitcast (i32 (...)* @padding_associated_data to i32 (i8*, i64, i32*, ...)*)(i8* %127, i64 %128, i32* %10)
%130 = load i32, i32* %10
%131 = add i32 %130, 31
%132 = icmp ult i32 %131, 63
br i1 %132, label %225, label %133
133: ; preds = %125
%134 = sext i32 %129 to i64
%135 = inttoptr i64 %134 to i8*
%136 = getelementptr i8, i8* %18, i64 64
%137 = getelementptr i8, i8* %20, i64 64
%138 = icmp ult i8* %18, %137
%139 = icmp ult i8* %20, %136
%140 = and i1 %138, %139
%141 = bitcast i8* %21 to <16 x i8>*
%142 = bitcast i8* %19 to <16 x i8>*
%143 = bitcast i8* %20 to <16 x i8>*
%144 = bitcast i8* %18 to <16 x i8>*
%145 = getelementptr i8, i8* %20, i64 48
%146 = bitcast i8* %145 to <16 x i8>*
%147 = getelementptr i8, i8* %18, i64 48
%148 = bitcast i8* %147 to <16 x i8>*
%149 = getelementptr inbounds i8, i8* %20, i64 16
%150 = bitcast i8* %149 to <16 x i8>*
%151 = getelementptr inbounds i8, i8* %18, i64 16
%152 = bitcast i8* %151 to <16 x i8>*
br label %153
153: ; preds = %133, %218
%154 = phi i64 [ %220, %218 ], [ 0, %133 ]
%155 = phi i8* [ %219, %218 ], [ %135, %133 ]
%156 = phi i8* [ %155, %218 ], [ %126, %133 ]
%157 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @artemia_permutation to i32 (i8*, i8*, ...)*)(i8* %18, i8* %20)
%158 = shl i64 %154, 5
%159 = add i64 %158, 32
%160 = getelementptr i8, i8* %135, i64 %159
%161 = getelementptr i8, i8* %156, i64 32
%162 = icmp ult i8* %18, %161
%163 = icmp ult i8* %156, %136
%164 = and i1 %162, %163
%165 = or i1 %140, %164
%166 = icmp ult i8* %18, %160
%167 = icmp ult i8* %155, %136
%168 = and i1 %166, %167
%169 = or i1 %165, %168
br i1 %169, label %189, label %170
170: ; preds = %153
%171 = load <16 x i8>, <16 x i8>* %141
%172 = bitcast i8* %155 to <16 x i8>*
%173 = load <16 x i8>, <16 x i8>* %172
%174 = xor <16 x i8> %173, %171
store <16 x i8> %174, <16 x i8>* %142
%175 = load <16 x i8>, <16 x i8>* %143
%176 = bitcast i8* %156 to <16 x i8>*
%177 = load <16 x i8>, <16 x i8>* %176
%178 = xor <16 x i8> %177, %175
store <16 x i8> %178, <16 x i8>* %144
%179 = load <16 x i8>, <16 x i8>* %146
%180 = getelementptr inbounds i8, i8* %155, i64 16
%181 = bitcast i8* %180 to <16 x i8>*
%182 = load <16 x i8>, <16 x i8>* %181
%183 = xor <16 x i8> %182, %179
store <16 x i8> %183, <16 x i8>* %148
%184 = load <16 x i8>, <16 x i8>* %150
%185 = getelementptr inbounds i8, i8* %156, i64 16
%186 = bitcast i8* %185 to <16 x i8>*
%187 = load <16 x i8>, <16 x i8>* %186
%188 = xor <16 x i8> %187, %184
store <16 x i8> %188, <16 x i8>* %152
br label %218
189: ; preds = %153, %189
%190 = phi i64 [ %216, %189 ], [ 0, %153 ]
%191 = getelementptr inbounds i8, i8* %21, i64 %190
%192 = load i8, i8* %191
%193 = getelementptr inbounds i8, i8* %155, i64 %190
%194 = load i8, i8* %193
%195 = xor i8 %194, %192
%196 = getelementptr inbounds i8, i8* %19, i64 %190
store i8 %195, i8* %196
%197 = getelementptr inbounds i8, i8* %20, i64 %190
%198 = load i8, i8* %197
%199 = getelementptr inbounds i8, i8* %156, i64 %190
%200 = load i8, i8* %199
%201 = xor i8 %200, %198
%202 = getelementptr inbounds i8, i8* %18, i64 %190
store i8 %201, i8* %202
%203 = or i64 %190, 1
%204 = getelementptr inbounds i8, i8* %21, i64 %203
%205 = load i8, i8* %204
%206 = getelementptr inbounds i8, i8* %155, i64 %203
%207 = load i8, i8* %206
%208 = xor i8 %207, %205
%209 = getelementptr inbounds i8, i8* %19, i64 %203
store i8 %208, i8* %209
%210 = getelementptr inbounds i8, i8* %20, i64 %203
%211 = load i8, i8* %210
%212 = getelementptr inbounds i8, i8* %156, i64 %203
%213 = load i8, i8* %212
%214 = xor i8 %213, %211
%215 = getelementptr inbounds i8, i8* %18, i64 %203
store i8 %214, i8* %215
%216 = add nuw nsw i64 %190, 2
%217 = icmp eq i64 %216, 32
br i1 %217, label %218, label %189
218: ; preds = %189, %170
%219 = getelementptr inbounds i8, i8* %155, i64 32
%220 = add nuw i64 %154, 1
%221 = load i32, i32* %10
%222 = sdiv i32 %221, 32
%223 = sext i32 %222 to i64
%224 = icmp ult i64 %220, %223
br i1 %224, label %153, label %225
225: ; preds = %218, %125, %25
%226 = phi i8* [ %4, %25 ], [ %126, %125 ], [ %155, %218 ]
%227 = lshr i64 %6, 5
%228 = icmp ult i64 %6, 32
br i1 %228, label %330, label %229
229: ; preds = %225
%230 = call i64 @llvm.umax.i64(i64 %227, i64 1)
%231 = getelementptr i8, i8* %18, i64 64
%232 = getelementptr i8, i8* %20, i64 64
%233 = icmp ult i8* %18, %232
%234 = icmp ult i8* %20, %231
%235 = and i1 %233, %234
%236 = bitcast i8* %21 to <16 x i8>*
%237 = bitcast i8* %19 to <16 x i8>*
%238 = bitcast i8* %20 to <16 x i8>*
%239 = bitcast i8* %18 to <16 x i8>*
%240 = getelementptr i8, i8* %20, i64 48
%241 = bitcast i8* %240 to <16 x i8>*
%242 = getelementptr i8, i8* %18, i64 48
%243 = bitcast i8* %242 to <16 x i8>*
%244 = getelementptr inbounds i8, i8* %20, i64 16
%245 = bitcast i8* %244 to <16 x i8>*
%246 = getelementptr inbounds i8, i8* %18, i64 16
%247 = bitcast i8* %246 to <16 x i8>*
br label %248
248: ; preds = %229, %326
%249 = phi i64 [ %328, %326 ], [ 0, %229 ]
%250 = phi i8* [ %327, %326 ], [ %5, %229 ]
%251 = phi i8* [ %250, %326 ], [ %226, %229 ]
%252 = shl nuw i64 %249, 5
%253 = getelementptr i8, i8* %0, i64 %252
%254 = add i64 %252, 32
%255 = getelementptr i8, i8* %0, i64 %254
%256 = getelementptr i8, i8* %5, i64 %254
%257 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @artemia_permutation to i32 (i8*, i8*, ...)*)(i8* %18, i8* %20)
%258 = shl i64 %249, 5
%259 = getelementptr i8, i8* %251, i64 32
%260 = icmp ult i8* %18, %255
%261 = icmp ult i8* %253, %231
%262 = and i1 %260, %261
%263 = icmp ult i8* %18, %259
%264 = icmp ult i8* %251, %231
%265 = and i1 %263, %264
%266 = or i1 %262, %265
%267 = icmp ult i8* %18, %256
%268 = icmp ult i8* %250, %231
%269 = and i1 %267, %268
%270 = or i1 %266, %269
%271 = or i1 %270, %235
%272 = icmp ult i8* %253, %259
%273 = icmp ult i8* %251, %255
%274 = and i1 %272, %273
%275 = or i1 %271, %274
%276 = icmp ult i8* %253, %256
%277 = icmp ult i8* %250, %255
%278 = and i1 %276, %277
%279 = or i1 %275, %278
%280 = icmp ult i8* %253, %232
%281 = icmp ult i8* %20, %255
%282 = and i1 %280, %281
%283 = or i1 %279, %282
br i1 %283, label %308, label %284
284: ; preds = %248
%285 = load <16 x i8>, <16 x i8>* %236
%286 = bitcast i8* %250 to <16 x i8>*
%287 = load <16 x i8>, <16 x i8>* %286
%288 = xor <16 x i8> %287, %285
store <16 x i8> %288, <16 x i8>* %237
%289 = load <16 x i8>, <16 x i8>* %238
%290 = bitcast i8* %251 to <16 x i8>*
%291 = load <16 x i8>, <16 x i8>* %290
%292 = xor <16 x i8> %291, %289
store <16 x i8> %292, <16 x i8>* %239
%293 = getelementptr inbounds i8, i8* %0, i64 %258
%294 = bitcast i8* %293 to <16 x i8>*
store <16 x i8> %288, <16 x i8>* %294
%295 = load <16 x i8>, <16 x i8>* %241
%296 = getelementptr inbounds i8, i8* %250, i64 16
%297 = bitcast i8* %296 to <16 x i8>*
%298 = load <16 x i8>, <16 x i8>* %297
%299 = xor <16 x i8> %298, %295
store <16 x i8> %299, <16 x i8>* %243
%300 = load <16 x i8>, <16 x i8>* %245
%301 = getelementptr inbounds i8, i8* %251, 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
store <16 x i8> %304, <16 x i8>* %247
%305 = or i64 %258, 16
%306 = getelementptr inbounds i8, i8* %0, i64 %305
%307 = bitcast i8* %306 to <16 x i8>*
store <16 x i8> %299, <16 x i8>* %307
br label %326
308: ; preds = %248, %308
%309 = phi i64 [ %324, %308 ], [ 0, %248 ]
%310 = getelementptr inbounds i8, i8* %21, i64 %309
%311 = load i8, i8* %310
%312 = getelementptr inbounds i8, i8* %250, i64 %309
%313 = load i8, i8* %312
%314 = xor i8 %313, %311
%315 = getelementptr inbounds i8, i8* %19, i64 %309
store i8 %314, i8* %315
%316 = getelementptr inbounds i8, i8* %20, i64 %309
%317 = load i8, i8* %316
%318 = getelementptr inbounds i8, i8* %251, i64 %309
%319 = load i8, i8* %318
%320 = xor i8 %319, %317
%321 = getelementptr inbounds i8, i8* %18, i64 %309
store i8 %320, i8* %321
%322 = add nuw nsw i64 %258, %309
%323 = getelementptr inbounds i8, i8* %0, i64 %322
store i8 %314, i8* %323
%324 = add nuw nsw i64 %309, 1
%325 = icmp eq i64 %324, 32
br i1 %325, label %326, label %308
326: ; preds = %308, %284
%327 = getelementptr inbounds i8, i8* %250, i64 32
%328 = add nuw nsw i64 %249, 1
%329 = icmp eq i64 %328, %230
br i1 %329, label %330, label %248
330: ; preds = %326, %225
%331 = phi i8* [ %226, %225 ], [ %250, %326 ]
%332 = phi i8* [ %5, %225 ], [ %327, %326 ]
%333 = and i64 %6, 31
%334 = call i32 (i8*, i64, i64, i8*, i8*, i64, i32*, ...) bitcast (i32 (...)* @padding_message to i32 (i8*, i64, i64, i8*, i8*, i64, i32*, ...)*)(i8* %332, i64 %333, i64 %6, i8* %4, i8* %7, i64 %8, i32* %10)
%335 = load i32, i32* %10
%336 = add i32 %335, 31
%337 = icmp ult i32 %336, 63
br i1 %337, label %448, label %338
338: ; preds = %330
%339 = sext i32 %334 to i64
%340 = inttoptr i64 %339 to i8*
%341 = getelementptr i8, i8* %18, i64 64
%342 = and i64 %6, -32
%343 = add i64 %342, 32
%344 = getelementptr i8, i8* %20, i64 64
%345 = icmp ult i8* %18, %344
%346 = icmp ult i8* %20, %341
%347 = and i1 %345, %346
%348 = bitcast i8* %21 to <16 x i8>*
%349 = bitcast i8* %19 to <16 x i8>*
%350 = bitcast i8* %20 to <16 x i8>*
%351 = bitcast i8* %18 to <16 x i8>*
%352 = getelementptr i8, i8* %20, i64 48
%353 = bitcast i8* %352 to <16 x i8>*
%354 = getelementptr i8, i8* %18, i64 48
%355 = bitcast i8* %354 to <16 x i8>*
%356 = getelementptr inbounds i8, i8* %20, i64 16
%357 = bitcast i8* %356 to <16 x i8>*
%358 = getelementptr inbounds i8, i8* %18, i64 16
%359 = bitcast i8* %358 to <16 x i8>*
br label %360
360: ; preds = %338, %441
%361 = phi i64 [ %443, %441 ], [ 0, %338 ]
%362 = phi i8* [ %442, %441 ], [ %340, %338 ]
%363 = phi i8* [ %362, %441 ], [ %331, %338 ]
%364 = shl i64 %361, 5
%365 = add i64 %342, %364
%366 = getelementptr i8, i8* %0, i64 %365
%367 = add i64 %343, %364
%368 = getelementptr i8, i8* %0, i64 %367
%369 = add i64 %364, 32
%370 = getelementptr i8, i8* %340, i64 %369
%371 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @artemia_permutation to i32 (i8*, i8*, ...)*)(i8* %18, i8* %20)
%372 = add i64 %361, %227
%373 = shl i64 %372, 5
%374 = getelementptr i8, i8* %363, i64 32
%375 = icmp ult i8* %18, %368
%376 = icmp ult i8* %366, %341
%377 = and i1 %375, %376
%378 = or i1 %377, %347
%379 = icmp ult i8* %18, %374
%380 = icmp ult i8* %363, %341
%381 = and i1 %379, %380
%382 = or i1 %378, %381
%383 = icmp ult i8* %18, %370
%384 = icmp ult i8* %362, %341
%385 = and i1 %383, %384
%386 = or i1 %382, %385
%387 = icmp ult i8* %366, %344
%388 = icmp ult i8* %20, %368
%389 = and i1 %387, %388
%390 = or i1 %386, %389
%391 = icmp ult i8* %366, %374
%392 = icmp ult i8* %363, %368
%393 = and i1 %391, %392
%394 = or i1 %390, %393
%395 = icmp ult i8* %366, %370
%396 = icmp ult i8* %362, %368
%397 = and i1 %395, %396
%398 = or i1 %394, %397
br i1 %398, label %423, label %399
399: ; preds = %360
%400 = load <16 x i8>, <16 x i8>* %348
%401 = bitcast i8* %362 to <16 x i8>*
%402 = load <16 x i8>, <16 x i8>* %401
%403 = xor <16 x i8> %402, %400
store <16 x i8> %403, <16 x i8>* %349
%404 = load <16 x i8>, <16 x i8>* %350
%405 = bitcast i8* %363 to <16 x i8>*
%406 = load <16 x i8>, <16 x i8>* %405
%407 = xor <16 x i8> %406, %404
store <16 x i8> %407, <16 x i8>* %351
%408 = getelementptr inbounds i8, i8* %0, i64 %373
%409 = bitcast i8* %408 to <16 x i8>*
store <16 x i8> %403, <16 x i8>* %409
%410 = load <16 x i8>, <16 x i8>* %353
%411 = getelementptr inbounds i8, i8* %362, i64 16
%412 = bitcast i8* %411 to <16 x i8>*
%413 = load <16 x i8>, <16 x i8>* %412
%414 = xor <16 x i8> %413, %410
store <16 x i8> %414, <16 x i8>* %355
%415 = load <16 x i8>, <16 x i8>* %357
%416 = getelementptr inbounds i8, i8* %363, i64 16
%417 = bitcast i8* %416 to <16 x i8>*
%418 = load <16 x i8>, <16 x i8>* %417
%419 = xor <16 x i8> %418, %415
store <16 x i8> %419, <16 x i8>* %359
%420 = or i64 %373, 16
%421 = getelementptr inbounds i8, i8* %0, i64 %420
%422 = bitcast i8* %421 to <16 x i8>*
store <16 x i8> %414, <16 x i8>* %422
br label %441
423: ; preds = %360, %423
%424 = phi i64 [ %439, %423 ], [ 0, %360 ]
%425 = getelementptr inbounds i8, i8* %21, i64 %424
%426 = load i8, i8* %425
%427 = getelementptr inbounds i8, i8* %362, i64 %424
%428 = load i8, i8* %427
%429 = xor i8 %428, %426
%430 = getelementptr inbounds i8, i8* %19, i64 %424
store i8 %429, i8* %430
%431 = getelementptr inbounds i8, i8* %20, i64 %424
%432 = load i8, i8* %431
%433 = getelementptr inbounds i8, i8* %363, i64 %424
%434 = load i8, i8* %433
%435 = xor i8 %434, %432
%436 = getelementptr inbounds i8, i8* %18, i64 %424
store i8 %435, i8* %436
%437 = add nuw i64 %373, %424
%438 = getelementptr inbounds i8, i8* %0, i64 %437
store i8 %429, i8* %438
%439 = add nuw nsw i64 %424, 1
%440 = icmp eq i64 %439, 32
br i1 %440, label %441, label %423
441: ; preds = %423, %399
%442 = getelementptr inbounds i8, i8* %362, i64 32
%443 = add nuw i64 %361, 1
%444 = load i32, i32* %10
%445 = sdiv i32 %444, 32
%446 = sext i32 %445 to i64
%447 = icmp ult i64 %443, %446
br i1 %447, label %360, label %448
448: ; preds = %441, %330
%449 = phi i8* [ %331, %330 ], [ %362, %441 ]
%450 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @artemia_permutation to i32 (i8*, i8*, ...)*)(i8* %18, i8* %20)
%451 = getelementptr i8, i8* %2, i64 32
%452 = getelementptr i8, i8* %449, i64 32
%453 = getelementptr i8, i8* %3, i64 32
%454 = icmp ugt i8* %21, %2
%455 = icmp ult i8* %20, %451
%456 = and i1 %454, %455
%457 = icmp ugt i8* %452, %2
%458 = icmp ult i8* %449, %451
%459 = and i1 %457, %458
%460 = or i1 %456, %459
%461 = icmp ugt i8* %453, %2
%462 = icmp ugt i8* %451, %3
%463 = and i1 %461, %462
%464 = or i1 %460, %463
br i1 %464, label %488, label %465
465: ; preds = %448
%466 = bitcast i8* %20 to <16 x i8>*
%467 = load <16 x i8>, <16 x i8>* %466
%468 = bitcast i8* %449 to <16 x i8>*
%469 = load <16 x i8>, <16 x i8>* %468
%470 = xor <16 x i8> %469, %467
%471 = bitcast i8* %3 to <16 x i8>*
%472 = load <16 x i8>, <16 x i8>* %471
%473 = xor <16 x i8> %470, %472
%474 = bitcast i8* %2 to <16 x i8>*
store <16 x i8> %473, <16 x i8>* %474
%475 = getelementptr inbounds i8, i8* %20, i64 16
%476 = bitcast i8* %475 to <16 x i8>*
%477 = load <16 x i8>, <16 x i8>* %476
%478 = getelementptr inbounds i8, i8* %449, i64 16
%479 = bitcast i8* %478 to <16 x i8>*
%480 = load <16 x i8>, <16 x i8>* %479
%481 = xor <16 x i8> %480, %477
%482 = getelementptr inbounds i8, i8* %3, i64 16
%483 = bitcast i8* %482 to <16 x i8>*
%484 = load <16 x i8>, <16 x i8>* %483
%485 = xor <16 x i8> %481, %484
%486 = getelementptr inbounds i8, i8* %2, i64 16
%487 = bitcast i8* %486 to <16 x i8>*
store <16 x i8> %485, <16 x i8>* %487
br label %511
488: ; preds = %448, %488
%489 = phi i64 [ %509, %488 ], [ 0, %448 ]
%490 = getelementptr inbounds i8, i8* %20, i64 %489
%491 = load i8, i8* %490
%492 = getelementptr inbounds i8, i8* %449, i64 %489
%493 = load i8, i8* %492
%494 = xor i8 %493, %491
%495 = getelementptr inbounds i8, i8* %3, i64 %489
%496 = load i8, i8* %495
%497 = xor i8 %494, %496
%498 = getelementptr inbounds i8, i8* %2, i64 %489
store i8 %497, i8* %498
%499 = or i64 %489, 1
%500 = getelementptr inbounds i8, i8* %20, i64 %499
%501 = load i8, i8* %500
%502 = getelementptr inbounds i8, i8* %449, i64 %499
%503 = load i8, i8* %502
%504 = xor i8 %503, %501
%505 = getelementptr inbounds i8, i8* %3, i64 %499
%506 = load i8, i8* %505
%507 = xor i8 %504, %506
%508 = getelementptr inbounds i8, i8* %2, i64 %499
store i8 %507, i8* %508
%509 = add nuw nsw i64 %489, 2
%510 = icmp eq i64 %509, 32
br i1 %510, label %511, label %488
511: ; preds = %488, %465
br label %512
512: ; preds = %9, %511
%513 = phi i32 [ 0, %511 ], [ -2, %9 ]
ret i32 %513
}