#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 */
typedef int uint8_t;
typedef int uint64_t;
typedef int /*<<< orphan*/ tweak;

/* Variables and functions */
int /*<<< orphan*/ aesTweakEncrypt(int, int const *, int *, int *);
int get_block_number_from_tag(int *);
int /*<<< orphan*/ memcpy(int *, int const *, int);
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ set_block_number_in_tweak(int *, int);
int /*<<< orphan*/ set_stage_in_tweak(int *, int);
int /*<<< orphan*/ set_tweak_in_tweakey(int *, int *);
int /*<<< orphan*/ xor_values(int *, int const *);
void deoxys_aead_encrypt(const uint8_t *ass_data, size_t ass_data_len,
                         const uint8_t *message, size_t m_len,
                         const uint8_t *key, const uint8_t *nonce,
                         uint8_t *ciphertext, size_t *c_len) {
  uint64_t i;
  uint64_t j;
  uint64_t hblock1, hblock2;
  uint8_t tweak[16];
  uint8_t tweakey[256 / 8];
  uint8_t Auth[16];
  uint8_t last_block[16];
  uint8_t Final[16];
  uint8_t zero_block[16];
  uint8_t Pad[16];
  uint8_t temp[16];
  uint8_t tag[16];
  memset(tweak, 0, sizeof(tweak));
  memcpy(tweakey, key, 16);
  memset(Auth, 0, 16);
  set_block_number_in_tweak(tweak + 0, 0);
  set_block_number_in_tweak(tweak + 8, 0);
  set_stage_in_tweak(tweak, (0x3 << 4));
  set_tweak_in_tweakey(tweakey, tweak);
  aesTweakEncrypt(256, nonce, tweakey, temp);
  xor_values(Auth, temp);
  set_stage_in_tweak(tweak, (0x7 << 4));
  set_tweak_in_tweakey(tweakey, tweak);
  aesTweakEncrypt(256, nonce, tweakey, temp);
  xor_values(Auth, temp);
  if (ass_data_len) {
    set_stage_in_tweak(tweak, (0x2 << 4));
    i = 0;
    while (16 * (i + 1) <= ass_data_len) {
      set_block_number_in_tweak(tweak + 8, i);
      set_tweak_in_tweakey(tweakey, tweak);
      aesTweakEncrypt(256, ass_data + 16 * i, tweakey, temp);
      xor_values(Auth, temp);
      i++;
    }
    if (ass_data_len > 16 * i) {
      memset(last_block, 0, 16);
      memcpy(last_block, ass_data + 16 * i, ass_data_len - 16 * i);
      last_block[ass_data_len - 16 * i] = 0x80;
      set_stage_in_tweak(tweak, (0x6 << 4));
      set_block_number_in_tweak(tweak + 8, i);
      set_tweak_in_tweakey(tweakey, tweak);
      aesTweakEncrypt(256, last_block, tweakey, temp);
      xor_values(Auth, temp);
    }
  }
  set_stage_in_tweak(tweak, (0x0 << 4));
  i = 0;
  while (16 * (i + 1) <= m_len) {
    set_block_number_in_tweak(tweak + 8, i);
    set_tweak_in_tweakey(tweakey, tweak);
    aesTweakEncrypt(256, message + 16 * i, tweakey, temp);
    xor_values(Auth, temp);
    i++;
  }
  if (m_len > 16 * i) {
    memset(last_block, 0, 16);
    memcpy(last_block, message + 16 * i, m_len - 16 * i);
    last_block[m_len - 16 * i] = 0x80;
    set_stage_in_tweak(tweak, (0x4 << 4));
    set_block_number_in_tweak(tweak + 8, i);
    set_tweak_in_tweakey(tweakey, tweak);
    aesTweakEncrypt(256, last_block, tweakey, temp);
    xor_values(Auth, temp);
  }
  set_stage_in_tweak(tweak, (0x1 << 4));
  set_block_number_in_tweak(tweak + 8, 0);
  set_tweak_in_tweakey(tweakey, tweak);
  aesTweakEncrypt(256, Auth, tweakey, tag);
  memcpy(tweak, tag, 16);
  tweak[0] = 0x80 ^ (tweak[0] & 0x7f);
  i = 0;
  hblock1 = get_block_number_from_tag(tag + 0);
  hblock2 = get_block_number_from_tag(tag + 8);
  while (16 * (i + 1) <= m_len) {
    set_block_number_in_tweak(tweak + 8, hblock2);
    set_tweak_in_tweakey(tweakey, tweak);
    aesTweakEncrypt(256, nonce, tweakey, ciphertext + 16 * i);
    xor_values(ciphertext + 16 * i, message + 16 * i);
    i++;
    hblock2++;
    if (hblock2 == 0) {
      hblock1++;
      set_block_number_in_tweak(tweak, hblock1);
      tweak[0] = 0x80 ^ (tweak[0] & 0x7f);
    }
  }
  if (m_len > 16 * i) {
    set_block_number_in_tweak(tweak + 8, hblock2);
    set_tweak_in_tweakey(tweakey, tweak);
    aesTweakEncrypt(256, nonce, tweakey, temp);
    for (j = 0; j < m_len - 16 * i; j++)
      ciphertext[16 * i + j] = message[16 * i + j] ^ temp[j];
  }
  memcpy(ciphertext + m_len, tag, 16);
  *c_len = m_len + 16;
}


x86 assembly (clang, -O0):
<deoxys_aead_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2c0,%rsp
mov    0x18(%rbp),%rax
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)
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
lea    -0x100(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    $0x10,%edx
call   1060 <memcpy@plt>
lea    -0x140(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
call   1080 <set_block_number_in_tweak@plt>
lea    -0x80(%rbp),%rdi
add    $0x20,%rdi
xor    %esi,%esi
call   1080 <set_block_number_in_tweak@plt>
lea    -0x80(%rbp),%rdi
mov    $0x30,%esi
call   1030 <set_stage_in_tweak@plt>
lea    -0x100(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1070 <set_tweak_in_tweakey@plt>
mov    -0x30(%rbp),%rsi
lea    -0x100(%rbp),%rdx
lea    -0x280(%rbp),%rcx
mov    $0x100,%edi
call   1050 <aesTweakEncrypt@plt>
lea    -0x140(%rbp),%rdi
lea    -0x280(%rbp),%rsi
call   1090 <xor_values@plt>
lea    -0x80(%rbp),%rdi
mov    $0x70,%esi
call   1030 <set_stage_in_tweak@plt>
lea    -0x100(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1070 <set_tweak_in_tweakey@plt>
mov    -0x30(%rbp),%rsi
lea    -0x100(%rbp),%rdx
lea    -0x280(%rbp),%rcx
mov    $0x100,%edi
call   1050 <aesTweakEncrypt@plt>
lea    -0x140(%rbp),%rdi
lea    -0x280(%rbp),%rsi
call   1090 <xor_values@plt>
cmpq   $0x0,-0x10(%rbp)
je     1412 <deoxys_aead_encrypt+0x292>
lea    -0x80(%rbp),%rdi
mov    $0x20,%esi
call   1030 <set_stage_in_tweak@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
shl    $0x4,%eax
cltq
cmp    -0x10(%rbp),%rax
ja     1338 <deoxys_aead_encrypt+0x1b8>
lea    -0x80(%rbp),%rdi
add    $0x20,%rdi
mov    -0x34(%rbp),%esi
call   1080 <set_block_number_in_tweak@plt>
lea    -0x100(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1070 <set_tweak_in_tweakey@plt>
mov    -0x8(%rbp),%rsi
mov    -0x34(%rbp),%eax
shl    $0x4,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
lea    -0x100(%rbp),%rdx
lea    -0x280(%rbp),%rcx
mov    $0x100,%edi
call   1050 <aesTweakEncrypt@plt>
lea    -0x140(%rbp),%rdi
lea    -0x280(%rbp),%rsi
call   1090 <xor_values@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12b7 <deoxys_aead_encrypt+0x137>
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x4,%ecx
movslq %ecx,%rcx
cmp    %rcx,%rax
jbe    140d <deoxys_aead_encrypt+0x28d>
lea    -0x180(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
lea    -0x180(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x34(%rbp),%eax
shl    $0x4,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x4,%ecx
movslq %ecx,%rcx
sub    %rcx,%rax
mov    %eax,%edx
call   1060 <memcpy@plt>
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x4,%ecx
movslq %ecx,%rcx
sub    %rcx,%rax
movl   $0x80,-0x180(%rbp,%rax,4)
lea    -0x80(%rbp),%rdi
mov    $0x60,%esi
call   1030 <set_stage_in_tweak@plt>
lea    -0x80(%rbp),%rdi
add    $0x20,%rdi
mov    -0x34(%rbp),%esi
call   1080 <set_block_number_in_tweak@plt>
lea    -0x100(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1070 <set_tweak_in_tweakey@plt>
lea    -0x180(%rbp),%rsi
lea    -0x100(%rbp),%rdx
lea    -0x280(%rbp),%rcx
mov    $0x100,%edi
call   1050 <aesTweakEncrypt@plt>
lea    -0x140(%rbp),%rdi
lea    -0x280(%rbp),%rsi
call   1090 <xor_values@plt>
jmp    1412 <deoxys_aead_encrypt+0x292>
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
call   1030 <set_stage_in_tweak@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
shl    $0x4,%eax
cltq
cmp    -0x20(%rbp),%rax
ja     14a5 <deoxys_aead_encrypt+0x325>
lea    -0x80(%rbp),%rdi
add    $0x20,%rdi
mov    -0x34(%rbp),%esi
call   1080 <set_block_number_in_tweak@plt>
lea    -0x100(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1070 <set_tweak_in_tweakey@plt>
mov    -0x18(%rbp),%rsi
mov    -0x34(%rbp),%eax
shl    $0x4,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
lea    -0x100(%rbp),%rdx
lea    -0x280(%rbp),%rcx
mov    $0x100,%edi
call   1050 <aesTweakEncrypt@plt>
lea    -0x140(%rbp),%rdi
lea    -0x280(%rbp),%rsi
call   1090 <xor_values@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1424 <deoxys_aead_encrypt+0x2a4>
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x4,%ecx
movslq %ecx,%rcx
cmp    %rcx,%rax
jbe    157a <deoxys_aead_encrypt+0x3fa>
lea    -0x180(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
lea    -0x180(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x34(%rbp),%eax
shl    $0x4,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x4,%ecx
movslq %ecx,%rcx
sub    %rcx,%rax
mov    %eax,%edx
call   1060 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x4,%ecx
movslq %ecx,%rcx
sub    %rcx,%rax
movl   $0x80,-0x180(%rbp,%rax,4)
lea    -0x80(%rbp),%rdi
mov    $0x40,%esi
call   1030 <set_stage_in_tweak@plt>
lea    -0x80(%rbp),%rdi
add    $0x20,%rdi
mov    -0x34(%rbp),%esi
call   1080 <set_block_number_in_tweak@plt>
lea    -0x100(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1070 <set_tweak_in_tweakey@plt>
lea    -0x180(%rbp),%rsi
lea    -0x100(%rbp),%rdx
lea    -0x280(%rbp),%rcx
mov    $0x100,%edi
call   1050 <aesTweakEncrypt@plt>
lea    -0x140(%rbp),%rdi
lea    -0x280(%rbp),%rsi
call   1090 <xor_values@plt>
lea    -0x80(%rbp),%rdi
mov    $0x10,%esi
call   1030 <set_stage_in_tweak@plt>
lea    -0x80(%rbp),%rdi
add    $0x20,%rdi
xor    %esi,%esi
call   1080 <set_block_number_in_tweak@plt>
lea    -0x100(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1070 <set_tweak_in_tweakey@plt>
lea    -0x140(%rbp),%rsi
lea    -0x100(%rbp),%rdx
lea    -0x2c0(%rbp),%rcx
mov    $0x100,%edi
call   1050 <aesTweakEncrypt@plt>
lea    -0x80(%rbp),%rdi
lea    -0x2c0(%rbp),%rsi
mov    $0x10,%edx
call   1060 <memcpy@plt>
mov    -0x80(%rbp),%eax
and    $0x7f,%eax
xor    $0x80,%eax
mov    %eax,-0x80(%rbp)
movl   $0x0,-0x34(%rbp)
lea    -0x2c0(%rbp),%rdi
call   10a0 <get_block_number_from_tag@plt>
mov    %eax,-0x3c(%rbp)
lea    -0x2c0(%rbp),%rdi
add    $0x20,%rdi
call   10a0 <get_block_number_from_tag@plt>
mov    %eax,-0x40(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
shl    $0x4,%eax
cltq
cmp    -0x20(%rbp),%rax
ja     16de <deoxys_aead_encrypt+0x55e>
lea    -0x80(%rbp),%rdi
add    $0x20,%rdi
mov    -0x40(%rbp),%esi
call   1080 <set_block_number_in_tweak@plt>
lea    -0x100(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1070 <set_tweak_in_tweakey@plt>
mov    -0x30(%rbp),%rsi
lea    -0x100(%rbp),%rdx
mov    0x10(%rbp),%rcx
mov    -0x34(%rbp),%eax
shl    $0x4,%eax
cltq
shl    $0x2,%rax
add    %rax,%rcx
mov    $0x100,%edi
call   1050 <aesTweakEncrypt@plt>
mov    0x10(%rbp),%rdi
mov    -0x34(%rbp),%eax
shl    $0x4,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
mov    -0x34(%rbp),%eax
shl    $0x4,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
call   1090 <xor_values@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
cmpl   $0x0,-0x40(%rbp)
jne    16d9 <deoxys_aead_encrypt+0x559>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x3c(%rbp),%esi
call   1080 <set_block_number_in_tweak@plt>
mov    -0x80(%rbp),%eax
and    $0x7f,%eax
xor    $0x80,%eax
mov    %eax,-0x80(%rbp)
jmp    1612 <deoxys_aead_encrypt+0x492>
mov    -0x20(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x4,%ecx
movslq %ecx,%rcx
cmp    %rcx,%rax
jbe    1798 <deoxys_aead_encrypt+0x618>
lea    -0x80(%rbp),%rdi
add    $0x20,%rdi
mov    -0x40(%rbp),%esi
call   1080 <set_block_number_in_tweak@plt>
lea    -0x100(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1070 <set_tweak_in_tweakey@plt>
mov    -0x30(%rbp),%rsi
lea    -0x100(%rbp),%rdx
lea    -0x280(%rbp),%rcx
mov    $0x100,%edi
call   1050 <aesTweakEncrypt@plt>
movl   $0x0,-0x38(%rbp)
movslq -0x38(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    -0x34(%rbp),%edx
shl    $0x4,%edx
movslq %edx,%rdx
sub    %rdx,%rcx
cmp    %rcx,%rax
jae    1793 <deoxys_aead_encrypt+0x613>
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x4,%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
movslq -0x38(%rbp),%rax
xor    -0x280(%rbp,%rax,4),%edx
mov    0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
shl    $0x4,%ecx
add    -0x38(%rbp),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1737 <deoxys_aead_encrypt+0x5b7>
jmp    1798 <deoxys_aead_encrypt+0x618>
mov    0x10(%rbp),%rdi
mov    -0x20(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
lea    -0x2c0(%rbp),%rsi
mov    $0x10,%edx
call   1060 <memcpy@plt>
mov    -0x20(%rbp),%rcx
add    $0x10,%rcx
mov    0x18(%rbp),%rax
mov    %rcx,(%rax)
add    $0x2c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deoxys_aead_encrypt>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1e8,%rsp
mov    %r9,%r13
mov    %r8,%rbp
mov    %rcx,(%rsp)
mov    %rdx,0x10(%rsp)
mov    %rsi,%r12
mov    %rdi,0x8(%rsp)
lea    0x20(%rsp),%r14
xor    %ebx,%ebx
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
lea    0x120(%rsp),%r15
mov    %r15,%rdi
mov    %rbp,%rsi
mov    $0x10,%edx
call   1060 <memcpy@plt>
lea    0xa0(%rsp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
mov    %r14,%rdi
xor    %esi,%esi
call   1080 <set_block_number_in_tweak@plt>
lea    0x40(%rsp),%rdi
xor    %esi,%esi
call   1080 <set_block_number_in_tweak@plt>
mov    %r14,%rdi
mov    $0x30,%esi
call   1030 <set_stage_in_tweak@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1070 <set_tweak_in_tweakey@plt>
lea    0x60(%rsp),%rbp
mov    $0x100,%edi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %rbp,%rcx
call   1050 <aesTweakEncrypt@plt>
lea    0xa0(%rsp),%rdi
mov    %rbp,%rsi
call   1090 <xor_values@plt>
mov    %r14,%rdi
mov    $0x70,%esi
call   1030 <set_stage_in_tweak@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1070 <set_tweak_in_tweakey@plt>
mov    $0x100,%edi
mov    %r13,0x18(%rsp)
mov    %r13,%rsi
mov    %r15,%rdx
mov    (%rsp),%r15
mov    %rbp,%rcx
call   1050 <aesTweakEncrypt@plt>
lea    0xa0(%rsp),%rdi
mov    %rbp,%rsi
call   1090 <xor_values@plt>
test   %r12,%r12
je     13be <deoxys_aead_encrypt+0x23e>
lea    0x20(%rsp),%rdi
mov    $0x20,%esi
call   1030 <set_stage_in_tweak@plt>
cmp    $0x10,%r12
lea    0x40(%rsp),%rax
mov    %r12,%r13
jb     1319 <deoxys_aead_encrypt+0x199>
mov    %rax,%r12
xor    %ebx,%ebx
lea    0x120(%rsp),%rbp
lea    0x60(%rsp),%r15
xor    %r14d,%r14d
nop
mov    %r12,%rdi
mov    %ebx,%esi
call   1080 <set_block_number_in_tweak@plt>
mov    %rbp,%rdi
lea    0x20(%rsp),%rsi
call   1070 <set_tweak_in_tweakey@plt>
mov    %r14d,%eax
and    $0xfffffff0,%eax
mov    0x8(%rsp),%rcx
lea    (%rcx,%rax,4),%rsi
mov    $0x100,%edi
mov    %rbp,%rdx
mov    %r15,%rcx
call   1050 <aesTweakEncrypt@plt>
lea    0xa0(%rsp),%rdi
mov    %r15,%rsi
call   1090 <xor_values@plt>
lea    0x20(%r14),%eax
and    $0xfffffff0,%eax
add    $0x10,%r14
add    $0x1,%ebx
cmp    %r13,%rax
jbe    12c0 <deoxys_aead_encrypt+0x140>
mov    %ebx,%ebp
shl    $0x4,%ebp
cmp    %r13,%rbp
mov    (%rsp),%r15
jae    13be <deoxys_aead_encrypt+0x23e>
lea    0xe0(%rsp),%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
mov    0x8(%rsp),%rax
lea    (%rax,%rbp,4),%rsi
sub    %rbp,%r13
mov    %r14,%rdi
mov    %r13d,%edx
call   1060 <memcpy@plt>
movl   $0x80,0xe0(%rsp,%r13,4)
lea    0x20(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x60,%esi
call   1030 <set_stage_in_tweak@plt>
lea    0x40(%rsp),%rdi
mov    %ebx,%esi
call   1080 <set_block_number_in_tweak@plt>
lea    0x120(%rsp),%rbx
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1070 <set_tweak_in_tweakey@plt>
lea    0x60(%rsp),%rbp
mov    $0x100,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %rbp,%rcx
call   1050 <aesTweakEncrypt@plt>
lea    0xa0(%rsp),%rdi
mov    %rbp,%rsi
call   1090 <xor_values@plt>
lea    0x20(%rsp),%rdi
xor    %ebx,%ebx
xor    %esi,%esi
call   1030 <set_stage_in_tweak@plt>
cmp    $0x10,%r15
lea    0x40(%rsp),%r12
jb     1447 <deoxys_aead_encrypt+0x2c7>
xor    %ebx,%ebx
lea    0x120(%rsp),%r14
lea    0x60(%rsp),%r13
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    %ebx,%esi
call   1080 <set_block_number_in_tweak@plt>
mov    %r14,%rdi
lea    0x20(%rsp),%rsi
call   1070 <set_tweak_in_tweakey@plt>
mov    %ebp,%eax
and    $0xfffffff0,%eax
mov    0x10(%rsp),%rcx
lea    (%rcx,%rax,4),%rsi
mov    $0x100,%edi
mov    %r14,%rdx
mov    %r13,%rcx
call   1050 <aesTweakEncrypt@plt>
lea    0xa0(%rsp),%rdi
mov    %r13,%rsi
call   1090 <xor_values@plt>
lea    0x20(%rbp),%eax
and    $0xfffffff0,%eax
add    $0x10,%rbp
add    $0x1,%ebx
cmp    %r15,%rax
jbe    13f0 <deoxys_aead_encrypt+0x270>
mov    %ebx,%ebp
shl    $0x4,%ebp
cmp    %r15,%rbp
mov    %r12,%r13
jae    14f1 <deoxys_aead_encrypt+0x371>
lea    0xe0(%rsp),%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
mov    0x10(%rsp),%rax
lea    (%rax,%rbp,4),%rsi
mov    (%rsp),%r15
sub    %rbp,%r15
mov    %r14,%rdi
mov    %r15d,%edx
call   1060 <memcpy@plt>
movl   $0x80,0xe0(%rsp,%r15,4)
mov    (%rsp),%r15
lea    0x20(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x40,%esi
call   1030 <set_stage_in_tweak@plt>
mov    %r13,%rdi
mov    %ebx,%esi
call   1080 <set_block_number_in_tweak@plt>
lea    0x120(%rsp),%rbx
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1070 <set_tweak_in_tweakey@plt>
lea    0x60(%rsp),%rbp
mov    $0x100,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %rbp,%rcx
call   1050 <aesTweakEncrypt@plt>
lea    0xa0(%rsp),%rdi
mov    %rbp,%rsi
call   1090 <xor_values@plt>
lea    0x20(%rsp),%r14
mov    %r14,%rdi
mov    $0x10,%esi
call   1030 <set_stage_in_tweak@plt>
xor    %r12d,%r12d
mov    %r13,%rdi
xor    %esi,%esi
call   1080 <set_block_number_in_tweak@plt>
lea    0x120(%rsp),%rbp
mov    %rbp,%rdi
mov    %r14,%rsi
call   1070 <set_tweak_in_tweakey@plt>
lea    0xa0(%rsp),%rsi
lea    0x1a0(%rsp),%rbx
mov    $0x100,%edi
mov    %rbp,%rdx
mov    %rbx,%rcx
call   1050 <aesTweakEncrypt@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1060 <memcpy@plt>
movzbl 0x20(%rsp),%eax
or     $0x80,%eax
mov    %eax,0x20(%rsp)
mov    %rbx,%rdi
call   10a0 <get_block_number_from_tag@plt>
mov    %eax,%ebx
lea    0x1c0(%rsp),%rdi
call   10a0 <get_block_number_from_tag@plt>
mov    %eax,%r13d
cmp    $0x10,%r15
jb     1649 <deoxys_aead_encrypt+0x4c9>
mov    %ebx,0x8(%rsp)
xor    %r12d,%r12d
lea    0x20(%rsp),%r15
jmp    15ba <deoxys_aead_encrypt+0x43a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0x20(%r12),%eax
and    $0xfffffff0,%eax
add    $0x10,%r12
add    $0x1,%r13d
cmp    (%rsp),%rax
ja     1641 <deoxys_aead_encrypt+0x4c1>
lea    0x40(%rsp),%rdi
mov    %r13d,%esi
call   1080 <set_block_number_in_tweak@plt>
lea    0x120(%rsp),%r14
mov    %r14,%rdi
mov    %r15,%rsi
call   1070 <set_tweak_in_tweakey@plt>
mov    %r12d,%ebp
and    $0xfffffff0,%ebp
shl    $0x2,%rbp
mov    0x220(%rsp),%rax
lea    (%rax,%rbp,1),%rbx
mov    $0x100,%edi
mov    0x18(%rsp),%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1050 <aesTweakEncrypt@plt>
add    0x10(%rsp),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1090 <xor_values@plt>
cmp    $0xffffffff,%r13d
jne    15a0 <deoxys_aead_encrypt+0x420>
mov    0x8(%rsp),%esi
add    $0x1,%esi
mov    %r15,%rdi
mov    %esi,0x8(%rsp)
call   1080 <set_block_number_in_tweak@plt>
movzbl 0x20(%rsp),%eax
or     $0x80,%eax
mov    %eax,0x20(%rsp)
jmp    15a0 <deoxys_aead_encrypt+0x420>
and    $0xfffffff0,%r12d
mov    (%rsp),%r15
mov    0x220(%rsp),%rbp
mov    0x228(%rsp),%r14
cmp    %r15,%r12
jae    1703 <deoxys_aead_encrypt+0x583>
lea    0x40(%rsp),%rdi
mov    %r13d,%esi
call   1080 <set_block_number_in_tweak@plt>
lea    0x120(%rsp),%rbx
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1070 <set_tweak_in_tweakey@plt>
lea    0x60(%rsp),%rcx
mov    $0x100,%edi
mov    0x18(%rsp),%rsi
mov    %rbx,%rdx
call   1050 <aesTweakEncrypt@plt>
mov    %r15,%rax
sub    %r12,%rax
je     1703 <deoxys_aead_encrypt+0x583>
cmp    $0x8,%rax
jb     16da <deoxys_aead_encrypt+0x55a>
lea    0x0(,%r12,4),%rcx
add    %rbp,%rcx
mov    0x10(%rsp),%r8
lea    (%r8,%r15,4),%rdx
cmp    %rdx,%rcx
jae    1739 <deoxys_aead_encrypt+0x5b9>
lea    0x0(,%r15,4),%rcx
add    %rbp,%rcx
lea    (%r8,%r12,4),%rdx
cmp    %rcx,%rdx
jae    1739 <deoxys_aead_encrypt+0x5b9>
xor    %ecx,%ecx
lea    0x0(,%r12,4),%rdx
add    %rbp,%rdx
mov    0x10(%rsp),%rsi
lea    (%rsi,%r12,4),%rsi
mov    0x60(%rsp,%rcx,4),%edi
xor    (%rsi,%rcx,4),%edi
mov    %edi,(%rdx,%rcx,4)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    16f0 <deoxys_aead_encrypt+0x570>
lea    0x0(,%r15,4),%rdi
add    %rbp,%rdi
lea    0x1a0(%rsp),%rsi
mov    $0x10,%edx
call   1060 <memcpy@plt>
add    $0x10,%r15
mov    %r15,(%r14)
add    $0x1e8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rax,%rcx
and    $0xfffffffffffffff8,%rcx
lea    -0x8(%rcx),%rsi
mov    %rsi,%rdx
shr    $0x3,%rdx
add    $0x1,%rdx
test   %rsi,%rsi
je     17bd <deoxys_aead_encrypt+0x63d>
mov    %rdx,%rdi
and    $0xfffffffffffffffe,%rdi
lea    0x30(,%r12,4),%rbx
add    %rbp,%rbx
lea    (%r8,%r12,4),%rbp
add    $0x30,%rbp
xor    %esi,%esi
movups -0x30(%rbp,%rsi,4),%xmm0
movups -0x20(%rbp,%rsi,4),%xmm1
xorps  0x60(%rsp,%rsi,4),%xmm0
xorps  0x70(%rsp,%rsi,4),%xmm1
movups %xmm0,-0x30(%rbx,%rsi,4)
movups %xmm1,-0x20(%rbx,%rsi,4)
movups -0x10(%rbp,%rsi,4),%xmm0
movups 0x0(%rbp,%rsi,4),%xmm1
xorps  0x80(%rsp,%rsi,4),%xmm0
xorps  0x90(%rsp,%rsi,4),%xmm1
movups %xmm0,-0x10(%rbx,%rsi,4)
movups %xmm1,(%rbx,%rsi,4)
add    $0x10,%rsi
add    $0xfffffffffffffffe,%rdi
jne    1770 <deoxys_aead_encrypt+0x5f0>
jmp    17bf <deoxys_aead_encrypt+0x63f>
xor    %esi,%esi
test   $0x1,%dl
mov    0x220(%rsp),%rbp
je     17ef <deoxys_aead_encrypt+0x66f>
lea    (%rsi,%r12,1),%rdx
movups (%r8,%rdx,4),%xmm0
movups 0x10(%r8,%rdx,4),%xmm1
xorps  0x60(%rsp,%rsi,4),%xmm0
xorps  0x70(%rsp,%rsi,4),%xmm1
movups %xmm0,0x0(%rbp,%rdx,4)
movups %xmm1,0x10(%rbp,%rdx,4)
cmp    %rcx,%rax
je     1703 <deoxys_aead_encrypt+0x583>
jmp    16dc <deoxys_aead_encrypt+0x55c>

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

LLVM IR (-O2):
define void @deoxys_aead_encrypt(i32* %0, i64 %1, i32* %2, i64 %3, i32* %4, i32* %5, i32* %6, i64* nocapture writeonly %7) {
%9 = alloca [16 x i32]
%10 = alloca [32 x i32]
%11 = alloca [16 x i32]
%12 = alloca [16 x i32]
%13 = alloca [16 x i32]
%14 = alloca [16 x i32]
%15 = bitcast [16 x i32]* %9 to i8*
%16 = bitcast [32 x i32]* %10 to i8*
%17 = bitcast [16 x i32]* %11 to i8*
%18 = bitcast [16 x i32]* %12 to i8*
%19 = bitcast [16 x i32]* %13 to i8*
%20 = bitcast [16 x i32]* %14 to i8*
%21 = getelementptr inbounds [16 x i32], [16 x i32]* %9, i64 0, i64 0
%22 = call i32 @memset(i32* %21, i32 0, i32 64)
%23 = getelementptr inbounds [32 x i32], [32 x i32]* %10, i64 0, i64 0
%24 = call i32 @memcpy(i32* %23, i32* %4, i32 16)
%25 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 0
%26 = call i32 @memset(i32* %25, i32 0, i32 16)
%27 = call i32 @set_block_number_in_tweak(i32* %21, i32 0)
%28 = getelementptr inbounds [16 x i32], [16 x i32]* %9, i64 0, i64 8
%29 = call i32 @set_block_number_in_tweak(i32* %28, i32 0)
%30 = call i32 @set_stage_in_tweak(i32* %21, i32 48)
%31 = call i32 @set_tweak_in_tweakey(i32* %23, i32* %21)
%32 = getelementptr inbounds [16 x i32], [16 x i32]* %13, i64 0, i64 0
%33 = call i32 @aesTweakEncrypt(i32 256, i32* %5, i32* %23, i32* %32)
%34 = call i32 @xor_values(i32* %25, i32* %32)
%35 = call i32 @set_stage_in_tweak(i32* %21, i32 112)
%36 = call i32 @set_tweak_in_tweakey(i32* %23, i32* %21)
%37 = call i32 @aesTweakEncrypt(i32 256, i32* %5, i32* %23, i32* %32)
%38 = call i32 @xor_values(i32* %25, i32* %32)
%39 = icmp eq i64 %1, 0
br i1 %39, label %79, label %40
40: ; preds = %8
%41 = call i32 @set_stage_in_tweak(i32* %21, i32 32)
%42 = icmp ult i64 %1, 16
br i1 %42, label %61, label %43
43: ; preds = %40, %43
%44 = phi i64 [ %46, %43 ], [ 0, %40 ]
%45 = phi i64 [ %55, %43 ], [ 1, %40 ]
%46 = add nuw nsw i64 %44, 1
%47 = trunc i64 %44 to i32
%48 = call i32 @set_block_number_in_tweak(i32* %28, i32 %47)
%49 = call i32 @set_tweak_in_tweakey(i32* %23, i32* %21)
%50 = shl i64 %44, 4
%51 = and i64 %50, 4294967280
%52 = getelementptr inbounds i32, i32* %0, i64 %51
%53 = call i32 @aesTweakEncrypt(i32 256, i32* %52, i32* %23, i32* %32)
%54 = call i32 @xor_values(i32* %25, i32* %32)
%55 = add nuw i64 %45, 1
%56 = shl i64 %55, 4
%57 = and i64 %56, 4294967280
%58 = icmp ugt i64 %57, %1
br i1 %58, label %59, label %43
59: ; preds = %43
%60 = trunc i64 %45 to i32
br label %61
61: ; preds = %59, %40
%62 = phi i32 [ 0, %40 ], [ %60, %59 ]
%63 = shl nsw i32 %62, 4
%64 = zext i32 %63 to i64
%65 = icmp ult i64 %64, %1
br i1 %65, label %66, label %79
66: ; preds = %61
%67 = getelementptr inbounds [16 x i32], [16 x i32]* %12, i64 0, i64 0
%68 = call i32 @memset(i32* %67, i32 0, i32 16)
%69 = getelementptr inbounds i32, i32* %0, i64 %64
%70 = sub i64 %1, %64
%71 = trunc i64 %70 to i32
%72 = call i32 @memcpy(i32* %67, i32* %69, i32 %71)
%73 = getelementptr inbounds [16 x i32], [16 x i32]* %12, i64 0, i64 %70
store i32 128, i32* %73
%74 = call i32 @set_stage_in_tweak(i32* %21, i32 96)
%75 = call i32 @set_block_number_in_tweak(i32* %28, i32 %62)
%76 = call i32 @set_tweak_in_tweakey(i32* %23, i32* %21)
%77 = call i32 @aesTweakEncrypt(i32 256, i32* %67, i32* %23, i32* %32)
%78 = call i32 @xor_values(i32* %25, i32* %32)
br label %79
79: ; preds = %61, %66, %8
%80 = call i32 @set_stage_in_tweak(i32* %21, i32 0)
%81 = icmp ult i64 %3, 16
br i1 %81, label %100, label %82
82: ; preds = %79, %82
%83 = phi i64 [ %85, %82 ], [ 0, %79 ]
%84 = phi i64 [ %94, %82 ], [ 1, %79 ]
%85 = add nuw nsw i64 %83, 1
%86 = trunc i64 %83 to i32
%87 = call i32 @set_block_number_in_tweak(i32* %28, i32 %86)
%88 = call i32 @set_tweak_in_tweakey(i32* %23, i32* %21)
%89 = shl i64 %83, 4
%90 = and i64 %89, 4294967280
%91 = getelementptr inbounds i32, i32* %2, i64 %90
%92 = call i32 @aesTweakEncrypt(i32 256, i32* %91, i32* %23, i32* %32)
%93 = call i32 @xor_values(i32* %25, i32* %32)
%94 = add nuw i64 %84, 1
%95 = shl i64 %94, 4
%96 = and i64 %95, 4294967280
%97 = icmp ugt i64 %96, %3
br i1 %97, label %98, label %82
98: ; preds = %82
%99 = trunc i64 %84 to i32
br label %100
100: ; preds = %98, %79
%101 = phi i32 [ 0, %79 ], [ %99, %98 ]
%102 = shl nsw i32 %101, 4
%103 = zext i32 %102 to i64
%104 = icmp ult i64 %103, %3
br i1 %104, label %105, label %118
105: ; preds = %100
%106 = getelementptr inbounds [16 x i32], [16 x i32]* %12, i64 0, i64 0
%107 = call i32 @memset(i32* %106, i32 0, i32 16)
%108 = getelementptr inbounds i32, i32* %2, i64 %103
%109 = sub i64 %3, %103
%110 = trunc i64 %109 to i32
%111 = call i32 @memcpy(i32* %106, i32* %108, i32 %110)
%112 = getelementptr inbounds [16 x i32], [16 x i32]* %12, i64 0, i64 %109
store i32 128, i32* %112
%113 = call i32 @set_stage_in_tweak(i32* %21, i32 64)
%114 = call i32 @set_block_number_in_tweak(i32* %28, i32 %101)
%115 = call i32 @set_tweak_in_tweakey(i32* %23, i32* %21)
%116 = call i32 @aesTweakEncrypt(i32 256, i32* %106, i32* %23, i32* %32)
%117 = call i32 @xor_values(i32* %25, i32* %32)
br label %118
118: ; preds = %105, %100
%119 = call i32 @set_stage_in_tweak(i32* %21, i32 16)
%120 = call i32 @set_block_number_in_tweak(i32* %28, i32 0)
%121 = call i32 @set_tweak_in_tweakey(i32* %23, i32* %21)
%122 = getelementptr inbounds [16 x i32], [16 x i32]* %14, i64 0, i64 0
%123 = call i32 @aesTweakEncrypt(i32 256, i32* %25, i32* %23, i32* %122)
%124 = call i32 @memcpy(i32* %21, i32* %122, i32 16)
%125 = load i32, i32* %21
%126 = and i32 %125, 127
%127 = or i32 %126, 128
store i32 %127, i32* %21
%128 = call i32 @get_block_number_from_tag(i32* %122)
%129 = getelementptr inbounds [16 x i32], [16 x i32]* %14, i64 0, i64 8
%130 = call i32 @get_block_number_from_tag(i32* %129)
br i1 %81, label %162, label %131
131: ; preds = %118, %153
%132 = phi i64 [ %136, %153 ], [ 0, %118 ]
%133 = phi i64 [ %155, %153 ], [ 1, %118 ]
%134 = phi i32 [ %154, %153 ], [ %128, %118 ]
%135 = phi i32 [ %145, %153 ], [ %130, %118 ]
%136 = add nuw nsw i64 %132, 1
%137 = call i32 @set_block_number_in_tweak(i32* %28, i32 %135)
%138 = call i32 @set_tweak_in_tweakey(i32* %23, i32* %21)
%139 = shl i64 %132, 4
%140 = and i64 %139, 4294967280
%141 = getelementptr inbounds i32, i32* %6, i64 %140
%142 = call i32 @aesTweakEncrypt(i32 256, i32* %5, i32* %23, i32* %141)
%143 = getelementptr inbounds i32, i32* %2, i64 %140
%144 = call i32 @xor_values(i32* %141, i32* %143)
%145 = add nsw i32 %135, 1
%146 = icmp eq i32 %145, 0
br i1 %146, label %147, label %153
147: ; preds = %131
%148 = add nsw i32 %134, 1
%149 = call i32 @set_block_number_in_tweak(i32* %21, i32 %148)
%150 = load i32, i32* %21
%151 = and i32 %150, 127
%152 = or i32 %151, 128
store i32 %152, i32* %21
br label %153
153: ; preds = %147, %131
%154 = phi i32 [ %148, %147 ], [ %134, %131 ]
%155 = add nuw i64 %133, 1
%156 = shl i64 %155, 4
%157 = and i64 %156, 4294967280
%158 = icmp ugt i64 %157, %3
br i1 %158, label %159, label %131
159: ; preds = %153
%160 = shl i64 %133, 4
%161 = and i64 %160, 4294967280
br label %162
162: ; preds = %159, %118
%163 = phi i32 [ %130, %118 ], [ %145, %159 ]
%164 = phi i64 [ 0, %118 ], [ %161, %159 ]
%165 = icmp ult i64 %164, %3
br i1 %165, label %166, label %274
166: ; preds = %162
%167 = call i32 @set_block_number_in_tweak(i32* %28, i32 %163)
%168 = call i32 @set_tweak_in_tweakey(i32* %23, i32* %21)
%169 = call i32 @aesTweakEncrypt(i32 256, i32* %5, i32* %23, i32* %32)
%170 = sub i64 %3, %164
%171 = icmp eq i64 %170, 0
br i1 %171, label %274, label %172
172: ; preds = %166
%173 = icmp ult i64 %170, 8
br i1 %173, label %261, label %174
174: ; preds = %172
%175 = getelementptr i32, i32* %6, i64 %164
%176 = getelementptr i32, i32* %6, i64 %3
%177 = getelementptr i32, i32* %2, i64 %164
%178 = getelementptr i32, i32* %2, i64 %3
%179 = icmp ult i32* %175, %178
%180 = icmp ult i32* %177, %176
%181 = and i1 %179, %180
br i1 %181, label %261, label %182
182: ; preds = %174
%183 = and i64 %170, -8
%184 = add i64 %183, -8
%185 = lshr exact i64 %184, 3
%186 = add nuw nsw i64 %185, 1
%187 = and i64 %186, 1
%188 = icmp eq i64 %184, 0
br i1 %188, label %236, label %189
189: ; preds = %182
%190 = and i64 %186, 4611686018427387902
br label %191
191: ; preds = %191, %189
%192 = phi i64 [ 0, %189 ], [ %233, %191 ]
%193 = phi i64 [ 0, %189 ], [ %234, %191 ]
%194 = add nuw nsw i64 %192, %164
%195 = getelementptr inbounds i32, i32* %2, i64 %194
%196 = bitcast i32* %195 to <4 x i32>*
%197 = load <4 x i32>, <4 x i32>* %196
%198 = getelementptr inbounds i32, i32* %195, i64 4
%199 = bitcast i32* %198 to <4 x i32>*
%200 = load <4 x i32>, <4 x i32>* %199
%201 = getelementptr inbounds [16 x i32], [16 x i32]* %13, i64 0, i64 %192
%202 = bitcast i32* %201 to <4 x i32>*
%203 = load <4 x i32>, <4 x i32>* %202
%204 = getelementptr inbounds i32, i32* %201, i64 4
%205 = bitcast i32* %204 to <4 x i32>*
%206 = load <4 x i32>, <4 x i32>* %205
%207 = xor <4 x i32> %203, %197
%208 = xor <4 x i32> %206, %200
%209 = getelementptr inbounds i32, i32* %6, i64 %194
%210 = bitcast i32* %209 to <4 x i32>*
store <4 x i32> %207, <4 x i32>* %210
%211 = getelementptr inbounds i32, i32* %209, i64 4
%212 = bitcast i32* %211 to <4 x i32>*
store <4 x i32> %208, <4 x i32>* %212
%213 = or i64 %192, 8
%214 = add nuw nsw i64 %213, %164
%215 = getelementptr inbounds i32, i32* %2, i64 %214
%216 = bitcast i32* %215 to <4 x i32>*
%217 = load <4 x i32>, <4 x i32>* %216
%218 = getelementptr inbounds i32, i32* %215, i64 4
%219 = bitcast i32* %218 to <4 x i32>*
%220 = load <4 x i32>, <4 x i32>* %219
%221 = getelementptr inbounds [16 x i32], [16 x i32]* %13, i64 0, i64 %213
%222 = bitcast i32* %221 to <4 x i32>*
%223 = load <4 x i32>, <4 x i32>* %222
%224 = getelementptr inbounds i32, i32* %221, i64 4
%225 = bitcast i32* %224 to <4 x i32>*
%226 = load <4 x i32>, <4 x i32>* %225
%227 = xor <4 x i32> %223, %217
%228 = xor <4 x i32> %226, %220
%229 = getelementptr inbounds i32, i32* %6, i64 %214
%230 = bitcast i32* %229 to <4 x i32>*
store <4 x i32> %227, <4 x i32>* %230
%231 = getelementptr inbounds i32, i32* %229, i64 4
%232 = bitcast i32* %231 to <4 x i32>*
store <4 x i32> %228, <4 x i32>* %232
%233 = add nuw i64 %192, 16
%234 = add i64 %193, 2
%235 = icmp eq i64 %234, %190
br i1 %235, label %236, label %191
236: ; preds = %191, %182
%237 = phi i64 [ 0, %182 ], [ %233, %191 ]
%238 = icmp eq i64 %187, 0
br i1 %238, label %259, label %239
239: ; preds = %236
%240 = add nuw nsw i64 %237, %164
%241 = getelementptr inbounds i32, i32* %2, i64 %240
%242 = bitcast i32* %241 to <4 x i32>*
%243 = load <4 x i32>, <4 x i32>* %242
%244 = getelementptr inbounds i32, i32* %241, i64 4
%245 = bitcast i32* %244 to <4 x i32>*
%246 = load <4 x i32>, <4 x i32>* %245
%247 = getelementptr inbounds [16 x i32], [16 x i32]* %13, i64 0, i64 %237
%248 = bitcast i32* %247 to <4 x i32>*
%249 = load <4 x i32>, <4 x i32>* %248
%250 = getelementptr inbounds i32, i32* %247, i64 4
%251 = bitcast i32* %250 to <4 x i32>*
%252 = load <4 x i32>, <4 x i32>* %251
%253 = xor <4 x i32> %249, %243
%254 = xor <4 x i32> %252, %246
%255 = getelementptr inbounds i32, i32* %6, i64 %240
%256 = bitcast i32* %255 to <4 x i32>*
store <4 x i32> %253, <4 x i32>* %256
%257 = getelementptr inbounds i32, i32* %255, i64 4
%258 = bitcast i32* %257 to <4 x i32>*
store <4 x i32> %254, <4 x i32>* %258
br label %259
259: ; preds = %236, %239
%260 = icmp eq i64 %170, %183
br i1 %260, label %274, label %261
261: ; preds = %174, %172, %259
%262 = phi i64 [ 0, %174 ], [ 0, %172 ], [ %183, %259 ]
br label %263
263: ; preds = %261, %263
%264 = phi i64 [ %272, %263 ], [ %262, %261 ]
%265 = add nuw nsw i64 %264, %164
%266 = getelementptr inbounds i32, i32* %2, i64 %265
%267 = load i32, i32* %266
%268 = getelementptr inbounds [16 x i32], [16 x i32]* %13, i64 0, i64 %264
%269 = load i32, i32* %268
%270 = xor i32 %269, %267
%271 = getelementptr inbounds i32, i32* %6, i64 %265
store i32 %270, i32* %271
%272 = add nuw nsw i64 %264, 1
%273 = icmp eq i64 %272, %170
br i1 %273, label %274, label %263
274: ; preds = %263, %259, %166, %162
%275 = getelementptr inbounds i32, i32* %6, i64 %3
%276 = call i32 @memcpy(i32* %275, i32* %122, i32 16)
%277 = add i64 %3, 16
store i64 %277, i64* %7
ret void
}