#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 /*<<< orphan*/ saved_iv;
typedef int /*<<< orphan*/ rkey;
typedef int /*<<< orphan*/ plaintext;
typedef int /*<<< orphan*/ iv;
typedef int /*<<< orphan*/ AES_KEY;

/* Variables and functions */
int AES_BLOCK_SIZE;
int /*<<< orphan*/ AES_DECRYPT;
int /*<<< orphan*/ AES_ENCRYPT;
int /*<<< orphan*/ AES_ige_encrypt(unsigned char *, unsigned char *, int,
                                   int /*<<< orphan*/ *, unsigned char *,
                                   int /*<<< orphan*/);
int /*<<< orphan*/ AES_set_decrypt_key(unsigned char *, int,
                                       int /*<<< orphan*/ *);
int /*<<< orphan*/ AES_set_encrypt_key(unsigned char *, int,
                                       int /*<<< orphan*/ *);
int /*<<< orphan*/ arc4random_buf(unsigned char *, int);
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ hexdump(int /*<<< orphan*/, char *, unsigned char *, int);
scalar_t__ memcmp(unsigned char *, unsigned char *, int);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, int);
int /*<<< orphan*/ printf(char *);
scalar_t__ run_test_vectors();
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  unsigned char rkey[16];
  unsigned char rkey2[16];
  AES_KEY key;
  AES_KEY key2;
  unsigned char plaintext[10240];
  unsigned char ciphertext[10240];
  unsigned char checktext[10240];
  unsigned char iv[AES_BLOCK_SIZE * 4];
  unsigned char saved_iv[AES_BLOCK_SIZE * 4];
  int err = 0;
  unsigned int n;
  unsigned matches;
  assert(10240 >= 128);
  arc4random_buf(rkey, sizeof(rkey));
  arc4random_buf(plaintext, sizeof(plaintext));
  arc4random_buf(iv, sizeof(iv));
  memcpy(saved_iv, iv, sizeof(saved_iv));
  AES_set_encrypt_key(rkey, 8 * sizeof rkey, &key);
  AES_ige_encrypt(plaintext, ciphertext, 128, &key, iv, AES_ENCRYPT);
  AES_set_decrypt_key(rkey, 8 * sizeof rkey, &key);
  memcpy(iv, saved_iv, sizeof iv);
  AES_ige_encrypt(ciphertext, checktext, 128, &key, iv, AES_DECRYPT);
  if (memcmp(checktext, plaintext, 128)) {
    printf("Encrypt+decrypt doesn't match\n");
    hexdump(stdout, "Plaintext", plaintext, 128);
    hexdump(stdout, "Checktext", checktext, 128);
    ++err;
  }
  AES_set_encrypt_key(rkey, 8 * sizeof rkey, &key);
  memcpy(iv, saved_iv, sizeof iv);
  AES_ige_encrypt(plaintext, ciphertext, 128 / 2, &key, iv, AES_ENCRYPT);
  AES_ige_encrypt(plaintext + 128 / 2, ciphertext + 128 / 2, 128 / 2, &key, iv,
                  AES_ENCRYPT);
  AES_set_decrypt_key(rkey, 8 * sizeof rkey, &key);
  memcpy(iv, saved_iv, sizeof iv);
  AES_ige_encrypt(ciphertext, checktext, 128, &key, iv, AES_DECRYPT);
  if (memcmp(checktext, plaintext, 128)) {
    printf("Chained encrypt+decrypt doesn't match\n");
    hexdump(stdout, "Plaintext", plaintext, 128);
    hexdump(stdout, "Checktext", checktext, 128);
    ++err;
  }
  AES_set_encrypt_key(rkey, 8 * sizeof rkey, &key);
  memcpy(iv, saved_iv, sizeof iv);
  AES_ige_encrypt(plaintext, ciphertext, 128 / 2, &key, iv, AES_ENCRYPT);
  AES_ige_encrypt(plaintext + 128 / 2, ciphertext + 128 / 2, 128 / 2, &key, iv,
                  AES_ENCRYPT);
  AES_set_decrypt_key(rkey, 8 * sizeof rkey, &key);
  memcpy(iv, saved_iv, sizeof iv);
  AES_ige_encrypt(ciphertext, checktext, 128 / 2, &key, iv, AES_DECRYPT);
  AES_ige_encrypt(ciphertext + 128 / 2, checktext + 128 / 2, 128 / 2, &key, iv,
                  AES_DECRYPT);
  if (memcmp(checktext, plaintext, 128)) {
    printf("Chained encrypt+chained decrypt doesn't match\n");
    hexdump(stdout, "Plaintext", plaintext, 128);
    hexdump(stdout, "Checktext", checktext, 128);
    ++err;
  }
  AES_set_encrypt_key(rkey, 8 * sizeof rkey, &key);
  memcpy(iv, saved_iv, sizeof iv);
  AES_ige_encrypt(plaintext, ciphertext, sizeof plaintext, &key, iv,
                  AES_ENCRYPT);
  ++ciphertext[sizeof ciphertext / 2];
  AES_set_decrypt_key(rkey, 8 * sizeof rkey, &key);
  memcpy(iv, saved_iv, sizeof iv);
  AES_ige_encrypt(ciphertext, checktext, sizeof checktext, &key, iv,
                  AES_DECRYPT);
  matches = 0;
  for (n = 0; n < sizeof checktext; ++n)
    if (checktext[n] == plaintext[n])
      ++matches;
  if (matches > sizeof checktext / 2 + sizeof checktext / 100) {
    printf("More than 51%% matches after garbling\n");
    ++err;
  }
  if (matches < sizeof checktext / 2) {
    printf("Garble extends backwards!\n");
    ++err;
  }
  AES_set_encrypt_key(rkey, 8 * sizeof rkey, &key);
  AES_set_encrypt_key(rkey2, 8 * sizeof rkey2, &key2);
  AES_ige_encrypt(plaintext, ciphertext, sizeof plaintext, &key, iv,
                  AES_ENCRYPT);
  ++ciphertext[sizeof ciphertext / 2];
  AES_set_decrypt_key(rkey, 8 * sizeof rkey, &key);
  AES_set_decrypt_key(rkey2, 8 * sizeof rkey2, &key2);
  AES_ige_encrypt(ciphertext, checktext, sizeof checktext, &key, iv,
                  AES_DECRYPT);
  matches = 0;
  for (n = 0; n < sizeof checktext; ++n)
    if (checktext[n] == plaintext[n])
      ++matches;
  if (matches > sizeof checktext / 100) {
    printf("More than 1%% matches after bidirectional garbling\n");
    ++err;
  }
  AES_set_encrypt_key(rkey, 8 * sizeof rkey, &key);
  AES_set_encrypt_key(rkey2, 8 * sizeof rkey2, &key2);
  AES_ige_encrypt(plaintext, ciphertext, sizeof plaintext, &key, iv,
                  AES_ENCRYPT);
  ++ciphertext[sizeof ciphertext - 1];
  AES_set_decrypt_key(rkey, 8 * sizeof rkey, &key);
  AES_set_decrypt_key(rkey2, 8 * sizeof rkey2, &key2);
  AES_ige_encrypt(ciphertext, checktext, sizeof checktext, &key, iv,
                  AES_DECRYPT);
  matches = 0;
  for (n = 0; n < sizeof checktext; ++n)
    if (checktext[n] == plaintext[n])
      ++matches;
  if (matches > sizeof checktext / 100) {
    printf("More than 1%% matches after bidirectional garbling (2)\n");
    ++err;
  }
  AES_set_encrypt_key(rkey, 8 * sizeof rkey, &key);
  AES_set_encrypt_key(rkey2, 8 * sizeof rkey2, &key2);
  AES_ige_encrypt(plaintext, ciphertext, sizeof plaintext, &key, iv,
                  AES_ENCRYPT);
  ++ciphertext[0];
  AES_set_decrypt_key(rkey, 8 * sizeof rkey, &key);
  AES_set_decrypt_key(rkey2, 8 * sizeof rkey2, &key2);
  AES_ige_encrypt(ciphertext, checktext, sizeof checktext, &key, iv,
                  AES_DECRYPT);
  matches = 0;
  for (n = 0; n < sizeof checktext; ++n)
    if (checktext[n] == plaintext[n])
      ++matches;
  if (matches > sizeof checktext / 100) {
    printf("More than 1%% matches after bidirectional garbling (3)\n");
    ++err;
  }
  err += run_test_vectors();
  return err;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7890,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e28(%rip),%rax
mov    (%rax),%ecx
shl    $0x2,%ecx
mov    %rcx,-0x7878(%rbp)
mov    %rsp,%rdx
mov    %rdx,-0x7848(%rbp)
mov    %rcx,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x7870(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x7850(%rbp)
mov    (%rax),%eax
shl    $0x2,%eax
mov    %rax,-0x7888(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x7880(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x7858(%rbp)
movl   $0x0,-0x785c(%rbp)
mov    $0x1,%edi
call   1080 <assert@plt>
lea    -0x20(%rbp),%rdi
mov    $0x10,%esi
call   1050 <arc4random_buf@plt>
lea    -0x2840(%rbp),%rdi
mov    $0x2800,%esi
call   1050 <arc4random_buf@plt>
mov    -0x7870(%rbp),%rdi
mov    -0x7878(%rbp),%rax
mov    %eax,%esi
call   1050 <arc4random_buf@plt>
mov    -0x7880(%rbp),%rdi
mov    -0x7870(%rbp),%rsi
mov    -0x7888(%rbp),%rax
mov    %eax,%edx
call   10a0 <memcpy@plt>
lea    -0x20(%rbp),%rdi
mov    $0x80,%esi
lea    -0x34(%rbp),%rdx
call   1040 <AES_set_encrypt_key@plt>
mov    -0x7870(%rbp),%r8
lea    -0x2840(%rbp),%rdi
lea    -0x5040(%rbp),%rsi
mov    0x2d18(%rip),%rax
mov    (%rax),%r9d
mov    $0x80,%edx
lea    -0x34(%rbp),%rcx
call   1090 <AES_ige_encrypt@plt>
lea    -0x20(%rbp),%rdi
mov    $0x80,%esi
lea    -0x34(%rbp),%rdx
call   10c0 <AES_set_decrypt_key@plt>
mov    -0x7880(%rbp),%rsi
mov    -0x7870(%rbp),%rdi
mov    -0x7878(%rbp),%rax
mov    %eax,%edx
call   10a0 <memcpy@plt>
mov    -0x7870(%rbp),%r8
lea    -0x5040(%rbp),%rdi
lea    -0x7840(%rbp),%rsi
mov    0x2ccd(%rip),%rax
mov    (%rax),%r9d
mov    $0x80,%edx
lea    -0x34(%rbp),%rcx
call   1090 <AES_ige_encrypt@plt>
lea    -0x7840(%rbp),%rdi
lea    -0x2840(%rbp),%rsi
mov    $0x80,%edx
call   1070 <memcmp@plt>
cmp    $0x0,%rax
je     13a3 <main+0x203>
lea    0xcb3(%rip),%rdi
call   1060 <printf@plt>
mov    0x2c6f(%rip),%rax
mov    (%rax),%edi
lea    -0x2840(%rbp),%rdx
lea    0xcb6(%rip),%rsi
mov    $0x80,%ecx
call   10b0 <hexdump@plt>
mov    0x2c4e(%rip),%rax
mov    (%rax),%edi
lea    -0x7840(%rbp),%rdx
lea    0xc9f(%rip),%rsi
mov    $0x80,%ecx
call   10b0 <hexdump@plt>
mov    -0x785c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x785c(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x80,%esi
lea    -0x34(%rbp),%rdx
call   1040 <AES_set_encrypt_key@plt>
mov    -0x7880(%rbp),%rsi
mov    -0x7870(%rbp),%rdi
mov    -0x7878(%rbp),%rax
mov    %eax,%edx
call   10a0 <memcpy@plt>
mov    -0x7870(%rbp),%r8
lea    -0x2840(%rbp),%rdi
lea    -0x5040(%rbp),%rsi
mov    0x2be3(%rip),%rax
mov    (%rax),%r9d
mov    $0x40,%edx
lea    -0x34(%rbp),%rcx
call   1090 <AES_ige_encrypt@plt>
mov    -0x7870(%rbp),%r8
lea    -0x2840(%rbp),%rdi
add    $0x40,%rdi
lea    -0x5040(%rbp),%rsi
add    $0x40,%rsi
mov    0x2bae(%rip),%rax
mov    (%rax),%r9d
mov    $0x40,%edx
lea    -0x34(%rbp),%rcx
call   1090 <AES_ige_encrypt@plt>
lea    -0x20(%rbp),%rdi
mov    $0x80,%esi
lea    -0x34(%rbp),%rdx
call   10c0 <AES_set_decrypt_key@plt>
mov    -0x7880(%rbp),%rsi
mov    -0x7870(%rbp),%rdi
mov    -0x7878(%rbp),%rax
mov    %eax,%edx
call   10a0 <memcpy@plt>
mov    -0x7870(%rbp),%r8
lea    -0x5040(%rbp),%rdi
lea    -0x7840(%rbp),%rsi
mov    0x2b63(%rip),%rax
mov    (%rax),%r9d
mov    $0x80,%edx
lea    -0x34(%rbp),%rcx
call   1090 <AES_ige_encrypt@plt>
lea    -0x7840(%rbp),%rdi
lea    -0x2840(%rbp),%rsi
mov    $0x80,%edx
call   1070 <memcmp@plt>
cmp    $0x0,%rax
je     150d <main+0x36d>
lea    0xb7c(%rip),%rdi
call   1060 <printf@plt>
mov    0x2b05(%rip),%rax
mov    (%rax),%edi
lea    -0x2840(%rbp),%rdx
lea    0xb4c(%rip),%rsi
mov    $0x80,%ecx
call   10b0 <hexdump@plt>
mov    0x2ae4(%rip),%rax
mov    (%rax),%edi
lea    -0x7840(%rbp),%rdx
lea    0xb35(%rip),%rsi
mov    $0x80,%ecx
call   10b0 <hexdump@plt>
mov    -0x785c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x785c(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x80,%esi
lea    -0x34(%rbp),%rdx
call   1040 <AES_set_encrypt_key@plt>
mov    -0x7880(%rbp),%rsi
mov    -0x7870(%rbp),%rdi
mov    -0x7878(%rbp),%rax
mov    %eax,%edx
call   10a0 <memcpy@plt>
mov    -0x7870(%rbp),%r8
lea    -0x2840(%rbp),%rdi
lea    -0x5040(%rbp),%rsi
mov    0x2a79(%rip),%rax
mov    (%rax),%r9d
mov    $0x40,%edx
lea    -0x34(%rbp),%rcx
call   1090 <AES_ige_encrypt@plt>
mov    -0x7870(%rbp),%r8
lea    -0x2840(%rbp),%rdi
add    $0x40,%rdi
lea    -0x5040(%rbp),%rsi
add    $0x40,%rsi
mov    0x2a44(%rip),%rax
mov    (%rax),%r9d
mov    $0x40,%edx
lea    -0x34(%rbp),%rcx
call   1090 <AES_ige_encrypt@plt>
lea    -0x20(%rbp),%rdi
mov    $0x80,%esi
lea    -0x34(%rbp),%rdx
call   10c0 <AES_set_decrypt_key@plt>
mov    -0x7880(%rbp),%rsi
mov    -0x7870(%rbp),%rdi
mov    -0x7878(%rbp),%rax
mov    %eax,%edx
call   10a0 <memcpy@plt>
mov    -0x7870(%rbp),%r8
lea    -0x5040(%rbp),%rdi
lea    -0x7840(%rbp),%rsi
mov    0x29f9(%rip),%rax
mov    (%rax),%r9d
mov    $0x40,%edx
lea    -0x34(%rbp),%rcx
call   1090 <AES_ige_encrypt@plt>
mov    -0x7870(%rbp),%r8
lea    -0x5040(%rbp),%rdi
add    $0x40,%rdi
lea    -0x7840(%rbp),%rsi
add    $0x40,%rsi
mov    0x29c4(%rip),%rax
mov    (%rax),%r9d
mov    $0x40,%edx
lea    -0x34(%rbp),%rcx
call   1090 <AES_ige_encrypt@plt>
lea    -0x7840(%rbp),%rdi
lea    -0x2840(%rbp),%rsi
mov    $0x80,%edx
call   1070 <memcmp@plt>
cmp    $0x0,%rax
je     16ac <main+0x50c>
lea    0xa04(%rip),%rdi
call   1060 <printf@plt>
mov    0x2966(%rip),%rax
mov    (%rax),%edi
lea    -0x2840(%rbp),%rdx
lea    0x9ad(%rip),%rsi
mov    $0x80,%ecx
call   10b0 <hexdump@plt>
mov    0x2945(%rip),%rax
mov    (%rax),%edi
lea    -0x7840(%rbp),%rdx
lea    0x996(%rip),%rsi
mov    $0x80,%ecx
call   10b0 <hexdump@plt>
mov    -0x785c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x785c(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x80,%esi
lea    -0x34(%rbp),%rdx
call   1040 <AES_set_encrypt_key@plt>
mov    -0x7880(%rbp),%rsi
mov    -0x7870(%rbp),%rdi
mov    -0x7878(%rbp),%rax
mov    %eax,%edx
call   10a0 <memcpy@plt>
mov    -0x7870(%rbp),%r8
lea    -0x2840(%rbp),%rdi
lea    -0x5040(%rbp),%rsi
mov    0x28da(%rip),%rax
mov    (%rax),%r9d
mov    $0x2800,%edx
lea    -0x34(%rbp),%rcx
call   1090 <AES_ige_encrypt@plt>
mov    -0x3c40(%rbp),%al
add    $0x1,%al
mov    %al,-0x3c40(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x80,%esi
lea    -0x34(%rbp),%rdx
call   10c0 <AES_set_decrypt_key@plt>
mov    -0x7880(%rbp),%rsi
mov    -0x7870(%rbp),%rdi
mov    -0x7878(%rbp),%rax
mov    %eax,%edx
call   10a0 <memcpy@plt>
mov    -0x7870(%rbp),%r8
lea    -0x5040(%rbp),%rdi
lea    -0x7840(%rbp),%rsi
mov    0x2881(%rip),%rax
mov    (%rax),%r9d
mov    $0x2800,%edx
lea    -0x34(%rbp),%rcx
call   1090 <AES_ige_encrypt@plt>
movl   $0x0,-0x7864(%rbp)
movl   $0x0,-0x7860(%rbp)
mov    -0x7860(%rbp),%eax
cmp    $0x2800,%rax
jae    17e2 <main+0x642>
mov    -0x7860(%rbp),%eax
movzbl -0x7840(%rbp,%rax,1),%eax
ff
mov    -0x7860(%rbp),%ecx
movzbl -0x2840(%rbp,%rcx,1),%ecx
ff
cmp    %ecx,%eax
jne    17c9 <main+0x629>
mov    -0x7864(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7864(%rbp)
jmp    17ce <main+0x62e>
mov    -0x7860(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7860(%rbp)
jmp    1784 <main+0x5e4>
mov    -0x7864(%rbp),%eax
cmp    $0x1466,%rax
jbe    180f <main+0x66f>
lea    0x88e(%rip),%rdi
call   1060 <printf@plt>
mov    -0x785c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x785c(%rbp)
mov    -0x7864(%rbp),%eax
cmp    $0x1400,%rax
jae    183c <main+0x69c>
lea    0x888(%rip),%rdi
call   1060 <printf@plt>
mov    -0x785c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x785c(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x80,%esi
lea    -0x34(%rbp),%rdx
call   1040 <AES_set_encrypt_key@plt>
lea    -0x30(%rbp),%rdi
mov    $0x80,%esi
lea    -0x38(%rbp),%rdx
call   1040 <AES_set_encrypt_key@plt>
mov    -0x7870(%rbp),%r8
lea    -0x2840(%rbp),%rdi
lea    -0x5040(%rbp),%rsi
mov    0x2754(%rip),%rax
mov    (%rax),%r9d
mov    $0x2800,%edx
lea    -0x34(%rbp),%rcx
call   1090 <AES_ige_encrypt@plt>
mov    -0x3c40(%rbp),%al
add    $0x1,%al
mov    %al,-0x3c40(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x80,%esi
lea    -0x34(%rbp),%rdx
call   10c0 <AES_set_decrypt_key@plt>
lea    -0x30(%rbp),%rdi
mov    $0x80,%esi
lea    -0x38(%rbp),%rdx
call   10c0 <AES_set_decrypt_key@plt>
mov    -0x7870(%rbp),%r8
lea    -0x5040(%rbp),%rdi
lea    -0x7840(%rbp),%rsi
mov    0x2705(%rip),%rax
mov    (%rax),%r9d
mov    $0x2800,%edx
lea    -0x34(%rbp),%rcx
call   1090 <AES_ige_encrypt@plt>
movl   $0x0,-0x7864(%rbp)
movl   $0x0,-0x7860(%rbp)
mov    -0x7860(%rbp),%eax
cmp    $0x2800,%rax
jae    195e <main+0x7be>
mov    -0x7860(%rbp),%eax
movzbl -0x7840(%rbp,%rax,1),%eax
ff
mov    -0x7860(%rbp),%ecx
movzbl -0x2840(%rbp,%rcx,1),%ecx
ff
cmp    %ecx,%eax
jne    1945 <main+0x7a5>
mov    -0x7864(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7864(%rbp)
jmp    194a <main+0x7aa>
mov    -0x7860(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7860(%rbp)
jmp    1900 <main+0x760>
mov    -0x7864(%rbp),%eax
cmp    $0x66,%rax
jbe    1989 <main+0x7e9>
lea    0x756(%rip),%rdi
call   1060 <printf@plt>
mov    -0x785c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x785c(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x80,%esi
lea    -0x34(%rbp),%rdx
call   1040 <AES_set_encrypt_key@plt>
lea    -0x30(%rbp),%rdi
mov    $0x80,%esi
lea    -0x38(%rbp),%rdx
call   1040 <AES_set_encrypt_key@plt>
mov    -0x7870(%rbp),%r8
lea    -0x2840(%rbp),%rdi
lea    -0x5040(%rbp),%rsi
mov    0x2607(%rip),%rax
mov    (%rax),%r9d
mov    $0x2800,%edx
lea    -0x34(%rbp),%rcx
call   1090 <AES_ige_encrypt@plt>
mov    -0x2841(%rbp),%al
add    $0x1,%al
mov    %al,-0x2841(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x80,%esi
lea    -0x34(%rbp),%rdx
call   10c0 <AES_set_decrypt_key@plt>
lea    -0x30(%rbp),%rdi
mov    $0x80,%esi
lea    -0x38(%rbp),%rdx
call   10c0 <AES_set_decrypt_key@plt>
mov    -0x7870(%rbp),%r8
lea    -0x5040(%rbp),%rdi
lea    -0x7840(%rbp),%rsi
mov    0x25b8(%rip),%rax
mov    (%rax),%r9d
mov    $0x2800,%edx
lea    -0x34(%rbp),%rcx
call   1090 <AES_ige_encrypt@plt>
movl   $0x0,-0x7864(%rbp)
movl   $0x0,-0x7860(%rbp)
mov    -0x7860(%rbp),%eax
cmp    $0x2800,%rax
jae    1aab <main+0x90b>
mov    -0x7860(%rbp),%eax
movzbl -0x7840(%rbp,%rax,1),%eax
ff
mov    -0x7860(%rbp),%ecx
movzbl -0x2840(%rbp,%rcx,1),%ecx
ff
cmp    %ecx,%eax
jne    1a92 <main+0x8f2>
mov    -0x7864(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7864(%rbp)
jmp    1a97 <main+0x8f7>
mov    -0x7860(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7860(%rbp)
jmp    1a4d <main+0x8ad>
mov    -0x7864(%rbp),%eax
cmp    $0x66,%rax
jbe    1ad6 <main+0x936>
lea    0x63d(%rip),%rdi
call   1060 <printf@plt>
mov    -0x785c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x785c(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x80,%esi
lea    -0x34(%rbp),%rdx
call   1040 <AES_set_encrypt_key@plt>
lea    -0x30(%rbp),%rdi
mov    $0x80,%esi
lea    -0x38(%rbp),%rdx
call   1040 <AES_set_encrypt_key@plt>
mov    -0x7870(%rbp),%r8
lea    -0x2840(%rbp),%rdi
lea    -0x5040(%rbp),%rsi
mov    0x24ba(%rip),%rax
mov    (%rax),%r9d
mov    $0x2800,%edx
lea    -0x34(%rbp),%rcx
call   1090 <AES_ige_encrypt@plt>
mov    -0x5040(%rbp),%al
add    $0x1,%al
mov    %al,-0x5040(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x80,%esi
lea    -0x34(%rbp),%rdx
call   10c0 <AES_set_decrypt_key@plt>
lea    -0x30(%rbp),%rdi
mov    $0x80,%esi
lea    -0x38(%rbp),%rdx
call   10c0 <AES_set_decrypt_key@plt>
mov    -0x7870(%rbp),%r8
lea    -0x5040(%rbp),%rdi
lea    -0x7840(%rbp),%rsi
mov    0x246b(%rip),%rax
mov    (%rax),%r9d
mov    $0x2800,%edx
lea    -0x34(%rbp),%rcx
call   1090 <AES_ige_encrypt@plt>
movl   $0x0,-0x7864(%rbp)
movl   $0x0,-0x7860(%rbp)
mov    -0x7860(%rbp),%eax
cmp    $0x2800,%rax
jae    1bf8 <main+0xa58>
mov    -0x7860(%rbp),%eax
movzbl -0x7840(%rbp,%rax,1),%eax
ff
mov    -0x7860(%rbp),%ecx
movzbl -0x2840(%rbp,%rcx,1),%ecx
ff
cmp    %ecx,%eax
jne    1bdf <main+0xa3f>
mov    -0x7864(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7864(%rbp)
jmp    1be4 <main+0xa44>
mov    -0x7860(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7860(%rbp)
jmp    1b9a <main+0x9fa>
mov    -0x7864(%rbp),%eax
cmp    $0x66,%rax
jbe    1c23 <main+0xa83>
lea    0x528(%rip),%rdi
call   1060 <printf@plt>
mov    -0x785c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x785c(%rbp)
mov    $0x0,%al
call   1030 <run_test_vectors@plt>
mov    %rax,%rcx
movslq -0x785c(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x785c(%rbp)
mov    -0x785c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x7848(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x7848,%rsp
mov    %rsp,-0x58(%rbp)
mov    0x2e19(%rip),%rax
mov    (%rax),%ebx
shl    $0x2,%ebx
mov    %rsp,%r12
lea    0xf(%rbx),%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%r12
mov    %r12,%rsp
mov    (%rax),%r13d
shl    $0x2,%r13d
mov    %rsp,%r15
lea    0xf(%r13),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r15
mov    %r15,%rsp
movl   $0x1,-0x2c(%rbp)
mov    $0x1,%edi
call   1090 <assert@plt>
lea    -0x40(%rbp),%rdi
mov    $0x10,%esi
call   1060 <arc4random_buf@plt>
lea    -0x2870(%rbp),%rdi
mov    $0x2800,%esi
call   1060 <arc4random_buf@plt>
mov    %r12,%rdi
mov    %ebx,%esi
call   1060 <arc4random_buf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r13d,%edx
call   10b0 <memcpy@plt>
lea    -0x30(%rbp),%r14
lea    -0x40(%rbp),%r13
mov    %r13,%rdi
mov    $0x80,%esi
mov    %r14,%rdx
call   1050 <AES_set_encrypt_key@plt>
mov    0x2d6c(%rip),%rax
mov    (%rax),%r9d
lea    -0x7870(%rbp),%rsi
lea    -0x2870(%rbp),%rdi
mov    $0x80,%edx
mov    %r14,%rcx
mov    %r12,%r8
call   10a0 <AES_ige_encrypt@plt>
mov    %r13,%rdi
mov    $0x80,%esi
mov    %r14,%rdx
call   10d0 <AES_set_decrypt_key@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %rbx,-0x50(%rbp)
mov    %ebx,%edx
call   10b0 <memcpy@plt>
mov    0x2d33(%rip),%rax
mov    (%rax),%r9d
lea    -0x5070(%rbp),%rbx
lea    -0x7870(%rbp),%rdi
mov    %rbx,%rsi
mov    $0x80,%edx
mov    %r14,%rcx
mov    %r12,%r8
call   10a0 <AES_ige_encrypt@plt>
mov    %rbx,%rdi
lea    -0x2870(%rbp),%rsi
mov    $0x80,%edx
call   1080 <memcmp@plt>
test   %rax,%rax
je     1333 <main+0x183>
lea    0xe6c(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ccb(%rip),%rbx
mov    (%rbx),%edi
lea    0xd0a(%rip),%rsi
lea    -0x2870(%rbp),%rdx
mov    $0x80,%ecx
call   10c0 <hexdump@plt>
mov    (%rbx),%edi
lea    0xcfa(%rip),%rsi
lea    -0x5070(%rbp),%rdx
mov    $0x80,%ecx
call   10c0 <hexdump@plt>
jmp    133a <main+0x18a>
movl   $0x0,-0x2c(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x30(%rbp),%r13
mov    $0x80,%esi
mov    %r13,%rdx
call   1050 <AES_set_encrypt_key@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    -0x50(%rbp),%r14
mov    %r14d,%edx
call   10b0 <memcpy@plt>
mov    0x2c68(%rip),%rbx
mov    (%rbx),%r9d
lea    -0x2870(%rbp),%rdi
lea    -0x7870(%rbp),%rsi
mov    $0x40,%edx
mov    %r13,%rcx
mov    %r12,%r8
call   10a0 <AES_ige_encrypt@plt>
lea    -0x2830(%rbp),%rdi
lea    -0x7830(%rbp),%rsi
mov    (%rbx),%r9d
mov    $0x40,%edx
mov    %r13,%rcx
mov    %r12,%r8
call   10a0 <AES_ige_encrypt@plt>
lea    -0x40(%rbp),%rdi
mov    $0x80,%esi
mov    %r13,%rdx
call   10d0 <AES_set_decrypt_key@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14d,%edx
call   10b0 <memcpy@plt>
mov    0x2c10(%rip),%rax
mov    (%rax),%r9d
lea    -0x5070(%rbp),%rbx
lea    -0x7870(%rbp),%rdi
mov    %rbx,%rsi
mov    $0x80,%edx
mov    %r13,%rcx
mov    %r12,%r8
call   10a0 <AES_ige_encrypt@plt>
mov    %rbx,%rdi
lea    -0x2870(%rbp),%rsi
mov    $0x80,%edx
call   1080 <memcmp@plt>
test   %rax,%rax
je     1458 <main+0x2a8>
lea    0xd23(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ba8(%rip),%rbx
mov    (%rbx),%edi
lea    0xbe7(%rip),%rsi
lea    -0x2870(%rbp),%rdx
mov    $0x80,%ecx
call   10c0 <hexdump@plt>
mov    (%rbx),%edi
lea    0xbd7(%rip),%rsi
lea    -0x5070(%rbp),%rdx
mov    $0x80,%ecx
call   10c0 <hexdump@plt>
addl   $0x1,-0x2c(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x30(%rbp),%r13
mov    $0x80,%esi
mov    %r13,%rdx
call   1050 <AES_set_encrypt_key@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    -0x50(%rbp),%r14
mov    %r14d,%edx
call   10b0 <memcpy@plt>
mov    0x2b4a(%rip),%rbx
mov    (%rbx),%r9d
lea    -0x2870(%rbp),%rdi
lea    -0x7870(%rbp),%rsi
mov    $0x40,%edx
mov    %r13,%rcx
mov    %r12,%r8
call   10a0 <AES_ige_encrypt@plt>
mov    (%rbx),%r9d
lea    -0x2830(%rbp),%rdi
lea    -0x7830(%rbp),%rsi
mov    $0x40,%edx
mov    %r13,%rcx
mov    %r12,%r8
call   10a0 <AES_ige_encrypt@plt>
lea    -0x40(%rbp),%rdi
mov    $0x80,%esi
mov    %r13,%rdx
call   10d0 <AES_set_decrypt_key@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14d,%edx
call   10b0 <memcpy@plt>
mov    0x2af2(%rip),%r14
mov    (%r14),%r9d
lea    -0x5070(%rbp),%rbx
lea    -0x7870(%rbp),%rdi
mov    %rbx,%rsi
mov    $0x40,%edx
mov    %r13,%rcx
mov    %r12,%r8
call   10a0 <AES_ige_encrypt@plt>
lea    -0x5030(%rbp),%rsi
mov    (%r14),%r9d
lea    -0x7830(%rbp),%rdi
mov    $0x40,%edx
mov    %r13,%rcx
mov    %r12,%r8
call   10a0 <AES_ige_encrypt@plt>
mov    %rbx,%rdi
lea    -0x2870(%rbp),%rsi
mov    $0x80,%edx
call   1080 <memcmp@plt>
test   %rax,%rax
je     1597 <main+0x3e7>
lea    0xbb6(%rip),%rdi
call   1030 <puts@plt>
mov    0x2a69(%rip),%rbx
mov    (%rbx),%edi
lea    0xaa8(%rip),%rsi
lea    -0x2870(%rbp),%rdx
mov    $0x80,%ecx
call   10c0 <hexdump@plt>
mov    (%rbx),%edi
lea    0xa98(%rip),%rsi
lea    -0x5070(%rbp),%rdx
mov    $0x80,%ecx
call   10c0 <hexdump@plt>
addl   $0x1,-0x2c(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x30(%rbp),%rbx
mov    $0x80,%esi
mov    %rbx,%rdx
call   1050 <AES_set_encrypt_key@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    -0x50(%rbp),%r14
mov    %r14d,%edx
call   10b0 <memcpy@plt>
mov    0x2a0b(%rip),%rax
mov    (%rax),%r9d
lea    -0x2870(%rbp),%rdi
lea    -0x7870(%rbp),%r13
mov    %r13,%rsi
mov    $0x2800,%edx
mov    %rbx,%rcx
mov    %r12,%r8
call   10a0 <AES_ige_encrypt@plt>
addb   $0x1,-0x6470(%rbp)
lea    -0x40(%rbp),%rdi
mov    $0x80,%esi
mov    %rbx,%rdx
call   10d0 <AES_set_decrypt_key@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14d,%edx
call   10b0 <memcpy@plt>
mov    0x29ca(%rip),%rax
mov    (%rax),%r9d
lea    -0x5070(%rbp),%rsi
mov    %r13,%rdi
mov    $0x2800,%edx
mov    %rbx,%rcx
mov    %r12,%r8
call   10a0 <AES_ige_encrypt@plt>
pxor   %xmm0,%xmm0
mov    $0xc,%eax
movdqa 0x9bc(%rip),%xmm5
pxor   %xmm1,%xmm1
nopl   0x0(%rax,%rax,1)
movdqa -0x507c(%rbp,%rax,1),%xmm3
ff ff
movd   -0x5078(%rbp,%rax,1),%xmm4
ff ff
movd   -0x2878(%rbp,%rax,1),%xmm2
ff ff
pcmpeqb %xmm4,%xmm2
punpcklbw %xmm2,%xmm2
punpcklwd %xmm2,%xmm2
pcmpeqb -0x287c(%rbp,%rax,1),%xmm3
ff ff
punpcklbw %xmm3,%xmm3
punpcklwd %xmm3,%xmm3
pand   %xmm5,%xmm3
paddd  %xmm0,%xmm3
pand   %xmm5,%xmm2
paddd  %xmm1,%xmm2
movq   -0x5074(%rbp,%rax,1),%xmm1
ff ff
movd   -0x5070(%rbp,%rax,1),%xmm4
ff ff
movq   -0x2874(%rbp,%rax,1),%xmm0
ff ff
pcmpeqb %xmm1,%xmm0
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm0
movd   -0x2870(%rbp,%rax,1),%xmm1
ff ff
pcmpeqb %xmm4,%xmm1
punpcklbw %xmm1,%xmm1
punpcklwd %xmm1,%xmm1
pand   %xmm5,%xmm0
paddd  %xmm3,%xmm0
pand   %xmm5,%xmm1
paddd  %xmm2,%xmm1
add    $0x10,%rax
cmp    $0x280c,%rax
jne    1650 <main+0x4a0>
paddd  %xmm0,%xmm1
pshufd $0xee,%xmm1,%xmm0
paddd  %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%eax
cmp    $0x1467,%eax
jb     1723 <main+0x573>
lea    0x908(%rip),%rdi
call   1070 <printf@plt>
jmp    1736 <main+0x586>
cmp    $0x13ff,%eax
ja     173a <main+0x58a>
lea    0x9be(%rip),%rdi
call   1030 <puts@plt>
addl   $0x1,-0x2c(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x30(%rbp),%rbx
mov    $0x80,%esi
mov    %rbx,%rdx
call   1050 <AES_set_encrypt_key@plt>
lea    -0x70(%rbp),%r13
lea    -0x44(%rbp),%r15
mov    %r13,%rdi
mov    $0x80,%esi
mov    %r15,%rdx
call   1050 <AES_set_encrypt_key@plt>
mov    0x2862(%rip),%rax
mov    (%rax),%r9d
lea    -0x2870(%rbp),%rdi
lea    -0x7870(%rbp),%r14
mov    %r14,%rsi
mov    $0x2800,%edx
mov    %rbx,%rcx
mov    %r12,%r8
call   10a0 <AES_ige_encrypt@plt>
addb   $0x1,-0x6470(%rbp)
lea    -0x40(%rbp),%rdi
mov    $0x80,%esi
mov    %rbx,%rdx
call   10d0 <AES_set_decrypt_key@plt>
mov    %r13,%rdi
mov    $0x80,%esi
mov    %r15,%rdx
call   10d0 <AES_set_decrypt_key@plt>
mov    0x281f(%rip),%rax
mov    (%rax),%r9d
lea    -0x5070(%rbp),%rsi
mov    %r14,%rdi
mov    $0x2800,%edx
mov    %rbx,%rcx
mov    %r12,%r8
call   10a0 <AES_ige_encrypt@plt>
pxor   %xmm0,%xmm0
mov    $0xc,%eax
pxor   %xmm1,%xmm1
movdqa 0x80d(%rip),%xmm5
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movdqa -0x507c(%rbp,%rax,1),%xmm3
ff ff
movd   -0x5078(%rbp,%rax,1),%xmm4
ff ff
movd   -0x2878(%rbp,%rax,1),%xmm2
ff ff
pcmpeqb %xmm4,%xmm2
punpcklbw %xmm2,%xmm2
punpcklwd %xmm2,%xmm2
pcmpeqb -0x287c(%rbp,%rax,1),%xmm3
ff ff
punpcklbw %xmm3,%xmm3
punpcklwd %xmm3,%xmm3
pand   %xmm5,%xmm3
paddd  %xmm0,%xmm3
pand   %xmm5,%xmm2
paddd  %xmm1,%xmm2
movq   -0x5074(%rbp,%rax,1),%xmm1
ff ff
movd   -0x5070(%rbp,%rax,1),%xmm4
ff ff
movq   -0x2874(%rbp,%rax,1),%xmm0
ff ff
pcmpeqb %xmm1,%xmm0
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm0
movd   -0x2870(%rbp,%rax,1),%xmm1
ff ff
pcmpeqb %xmm4,%xmm1
punpcklbw %xmm1,%xmm1
punpcklwd %xmm1,%xmm1
pand   %xmm5,%xmm0
paddd  %xmm3,%xmm0
pand   %xmm5,%xmm1
paddd  %xmm2,%xmm1
add    $0x10,%rax
cmp    $0x280c,%rax
jne    1800 <main+0x650>
paddd  %xmm0,%xmm1
pshufd $0xee,%xmm1,%xmm0
paddd  %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%eax
cmp    $0x67,%eax
jb     18d3 <main+0x723>
lea    0x781(%rip),%rdi
call   1070 <printf@plt>
addl   $0x1,-0x2c(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x30(%rbp),%rbx
mov    $0x80,%esi
mov    %rbx,%rdx
call   1050 <AES_set_encrypt_key@plt>
lea    -0x70(%rbp),%r13
lea    -0x44(%rbp),%r15
mov    %r13,%rdi
mov    $0x80,%esi
mov    %r15,%rdx
call   1050 <AES_set_encrypt_key@plt>
mov    0x26c9(%rip),%rax
mov    (%rax),%r9d
lea    -0x2870(%rbp),%rdi
lea    -0x7870(%rbp),%r14
mov    %r14,%rsi
mov    $0x2800,%edx
mov    %rbx,%rcx
mov    %r12,%r8
call   10a0 <AES_ige_encrypt@plt>
addb   $0x1,-0x5071(%rbp)
lea    -0x40(%rbp),%rdi
mov    $0x80,%esi
mov    %rbx,%rdx
call   10d0 <AES_set_decrypt_key@plt>
mov    %r13,%rdi
mov    $0x80,%esi
mov    %r15,%rdx
call   10d0 <AES_set_decrypt_key@plt>
mov    0x2686(%rip),%rax
mov    (%rax),%r9d
lea    -0x5070(%rbp),%rsi
mov    %r14,%rdi
mov    $0x2800,%edx
mov    %rbx,%rcx
mov    %r12,%r8
call   10a0 <AES_ige_encrypt@plt>
pxor   %xmm0,%xmm0
mov    $0xc,%eax
pxor   %xmm1,%xmm1
movdqa 0x674(%rip),%xmm5
nopl   0x0(%rax)
movdqa -0x507c(%rbp,%rax,1),%xmm3
ff ff
movd   -0x5078(%rbp,%rax,1),%xmm4
ff ff
movd   -0x2878(%rbp,%rax,1),%xmm2
ff ff
pcmpeqb %xmm4,%xmm2
punpcklbw %xmm2,%xmm2
punpcklwd %xmm2,%xmm2
pcmpeqb -0x287c(%rbp,%rax,1),%xmm3
ff ff
punpcklbw %xmm3,%xmm3
punpcklwd %xmm3,%xmm3
pand   %xmm5,%xmm3
paddd  %xmm0,%xmm3
pand   %xmm5,%xmm2
paddd  %xmm1,%xmm2
movq   -0x5074(%rbp,%rax,1),%xmm1
ff ff
movd   -0x5070(%rbp,%rax,1),%xmm4
ff ff
movq   -0x2874(%rbp,%rax,1),%xmm0
ff ff
pcmpeqb %xmm1,%xmm0
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm0
movd   -0x2870(%rbp,%rax,1),%xmm1
ff ff
pcmpeqb %xmm4,%xmm1
punpcklbw %xmm1,%xmm1
punpcklwd %xmm1,%xmm1
pand   %xmm5,%xmm0
paddd  %xmm3,%xmm0
pand   %xmm5,%xmm1
paddd  %xmm2,%xmm1
add    $0x10,%rax
cmp    $0x280c,%rax
jne    1990 <main+0x7e0>
paddd  %xmm0,%xmm1
pshufd $0xee,%xmm1,%xmm0
paddd  %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%eax
cmp    $0x67,%eax
jb     1a63 <main+0x8b3>
lea    0x625(%rip),%rdi
call   1070 <printf@plt>
addl   $0x1,-0x2c(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x30(%rbp),%rbx
mov    $0x80,%esi
mov    %rbx,%rdx
call   1050 <AES_set_encrypt_key@plt>
lea    -0x70(%rbp),%r13
lea    -0x44(%rbp),%r15
mov    %r13,%rdi
mov    $0x80,%esi
mov    %r15,%rdx
call   1050 <AES_set_encrypt_key@plt>
mov    0x2539(%rip),%rax
mov    (%rax),%r9d
lea    -0x2870(%rbp),%rdi
lea    -0x7870(%rbp),%r14
mov    %r14,%rsi
mov    $0x2800,%edx
mov    %rbx,%rcx
mov    %r12,%r8
call   10a0 <AES_ige_encrypt@plt>
addb   $0x1,-0x7870(%rbp)
lea    -0x40(%rbp),%rdi
mov    $0x80,%esi
mov    %rbx,%rdx
call   10d0 <AES_set_decrypt_key@plt>
mov    %r13,%rdi
mov    $0x80,%esi
mov    %r15,%rdx
call   10d0 <AES_set_decrypt_key@plt>
mov    0x24f6(%rip),%rax
mov    (%rax),%r9d
lea    -0x5070(%rbp),%rsi
mov    %r14,%rdi
mov    $0x2800,%edx
mov    %rbx,%rcx
mov    %r12,%r8
call   10a0 <AES_ige_encrypt@plt>
pxor   %xmm0,%xmm0
mov    $0xc,%eax
pxor   %xmm1,%xmm1
movdqa 0x4e4(%rip),%xmm5
nopl   0x0(%rax)
movdqa -0x507c(%rbp,%rax,1),%xmm3
ff ff
movd   -0x5078(%rbp,%rax,1),%xmm4
ff ff
movd   -0x2878(%rbp,%rax,1),%xmm2
ff ff
pcmpeqb %xmm4,%xmm2
punpcklbw %xmm2,%xmm2
punpcklwd %xmm2,%xmm2
pcmpeqb -0x287c(%rbp,%rax,1),%xmm3
ff ff
punpcklbw %xmm3,%xmm3
punpcklwd %xmm3,%xmm3
pand   %xmm5,%xmm3
paddd  %xmm0,%xmm3
pand   %xmm5,%xmm2
paddd  %xmm1,%xmm2
movq   -0x5074(%rbp,%rax,1),%xmm1
ff ff
movd   -0x5070(%rbp,%rax,1),%xmm4
ff ff
movq   -0x2874(%rbp,%rax,1),%xmm0
ff ff
pcmpeqb %xmm1,%xmm0
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm0
movd   -0x2870(%rbp,%rax,1),%xmm1
ff ff
pcmpeqb %xmm4,%xmm1
punpcklbw %xmm1,%xmm1
punpcklwd %xmm1,%xmm1
pand   %xmm5,%xmm0
paddd  %xmm3,%xmm0
pand   %xmm5,%xmm1
paddd  %xmm2,%xmm1
add    $0x10,%rax
cmp    $0x280c,%rax
jne    1b20 <main+0x970>
paddd  %xmm0,%xmm1
pshufd $0xee,%xmm1,%xmm0
paddd  %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%eax
cmp    $0x67,%eax
mov    -0x2c(%rbp),%ebx
jb     1bf5 <main+0xa45>
lea    0x4ca(%rip),%rdi
call   1070 <printf@plt>
add    $0x1,%ebx
xor    %eax,%eax
call   1040 <run_test_vectors@plt>
add    %ebx,%eax
mov    -0x58(%rbp),%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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