#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*/ plaintext_6;
typedef int /*<<< orphan*/ plaintext_5;
typedef int /*<<< orphan*/ plaintext_4;
typedef int /*<<< orphan*/ plaintext_3;
typedef int /*<<< orphan*/ plaintext_2;
typedef int /*<<< orphan*/ plaintext_1;
typedef int /*<<< orphan*/ key_6;
typedef int /*<<< orphan*/ key_5;
typedef int /*<<< orphan*/ key_4;
typedef int /*<<< orphan*/ key_3;
typedef int /*<<< orphan*/ key_2;
typedef int /*<<< orphan*/ key_1;
typedef int /*<<< orphan*/ ciphertext_6;
typedef int /*<<< orphan*/ ciphertext_5;
typedef int /*<<< orphan*/ ciphertext_4;
typedef int /*<<< orphan*/ ciphertext_3;
typedef int /*<<< orphan*/ ciphertext_2;
typedef int /*<<< orphan*/ ciphertext_1;

/* Variables and functions */
scalar_t__ aeskw_test(unsigned char *, int, unsigned char *, int,
                      unsigned char *, int);
int /*<<< orphan*/ printf(char *);
int rfc3394_test() {
  unsigned char key_1[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
                           0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F};
  unsigned char plaintext_1[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
                                 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB,
                                 0xCC, 0xDD, 0xEE, 0xFF};
  unsigned char ciphertext_1[] = {
      0x1F, 0xA6, 0x8B, 0x0A, 0x81, 0x12, 0xB4, 0x47, 0xAE, 0xF3, 0x4B, 0xD8,
      0xFB, 0x5A, 0x7B, 0x82, 0x9D, 0x3E, 0x86, 0x23, 0x71, 0xD2, 0xCF, 0xE5};
  unsigned char key_2[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
                           0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
                           0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17};
  unsigned char plaintext_2[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
                                 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB,
                                 0xCC, 0xDD, 0xEE, 0xFF};
  unsigned char ciphertext_2[] = {
      0x96, 0x77, 0x8B, 0x25, 0xAE, 0x6C, 0xA4, 0x35, 0xF9, 0x2B, 0x5B, 0x97,
      0xC0, 0x50, 0xAE, 0xD2, 0x46, 0x8A, 0xB8, 0xA1, 0x7A, 0xD8, 0x4E, 0x5D};
  unsigned char key_3[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
                           0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
                           0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
                           0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F};
  unsigned char plaintext_3[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55,
                                 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB,
                                 0xCC, 0xDD, 0xEE, 0xFF};
  unsigned char ciphertext_3[] = {
      0x64, 0xE8, 0xC3, 0xF9, 0xCE, 0x0F, 0x5B, 0xA2, 0x63, 0xE9, 0x77, 0x79,
      0x05, 0x81, 0x8A, 0x2A, 0x93, 0xC8, 0x19, 0x1E, 0x7D, 0x6E, 0x8A, 0xE7};
  unsigned char key_4[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
                           0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
                           0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17};
  unsigned char plaintext_4[] = {
      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB,
      0xCC, 0xDD, 0xEE, 0xFF, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};
  unsigned char ciphertext_4[] = {
      0x03, 0x1D, 0x33, 0x26, 0x4E, 0x15, 0xD3, 0x32, 0x68, 0xF2, 0x4E,
      0xC2, 0x60, 0x74, 0x3E, 0xDC, 0xE1, 0xC6, 0xC7, 0xDD, 0xEE, 0x72,
      0x5A, 0x93, 0x6B, 0xA8, 0x14, 0x91, 0x5C, 0x67, 0x62, 0xD2};
  unsigned char key_5[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
                           0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
                           0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
                           0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F};
  unsigned char plaintext_5[] = {
      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB,
      0xCC, 0xDD, 0xEE, 0xFF, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};
  unsigned char ciphertext_5[] = {
      0xA8, 0xF9, 0xBC, 0x16, 0x12, 0xC6, 0x8B, 0x3F, 0xF6, 0xE6, 0xF4,
      0xFB, 0xE3, 0x0E, 0x71, 0xE4, 0x76, 0x9C, 0x8B, 0x80, 0xA3, 0x2C,
      0xB8, 0x95, 0x8C, 0xD5, 0xD1, 0x7D, 0x6B, 0x25, 0x4D, 0xA1};
  unsigned char key_6[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
                           0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
                           0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
                           0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F};
  unsigned char plaintext_6[] = {
      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA,
      0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
      0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F};
  unsigned char ciphertext_6[] = {
      0x28, 0xC9, 0xF4, 0x04, 0xC4, 0xB8, 0x10, 0xF4, 0xCB, 0xCC,
      0xB3, 0x5C, 0xFB, 0x87, 0xF8, 0x26, 0x3F, 0x57, 0x86, 0xE2,
      0xD8, 0x0E, 0xD3, 0x26, 0xCB, 0xC7, 0xF0, 0xE7, 0x1A, 0x99,
      0xF4, 0x3B, 0xFB, 0x98, 0x8B, 0x9B, 0x7A, 0x02, 0xDD, 0x21};
  printf("Entering rfc3394_test()\n");
  if (aeskw_test(key_1, sizeof(key_1) * 8, plaintext_1, sizeof(plaintext_1),
                 ciphertext_1, sizeof(ciphertext_1))) {
    printf("Exiting rfc3394_test()\n");
    return (-1);
  }
  if (aeskw_test(key_2, sizeof(key_2) * 8, plaintext_2, sizeof(plaintext_2),
                 ciphertext_2, sizeof(ciphertext_2))) {
    printf("Exiting rfc3394_test()\n");
    return (-1);
  }
  if (aeskw_test(key_3, sizeof(key_3) * 8, plaintext_3, sizeof(plaintext_3),
                 ciphertext_3, sizeof(ciphertext_3))) {
    printf("Exiting rfc3394_test()\n");
    return (-1);
  }
  if (aeskw_test(key_4, sizeof(key_4) * 8, plaintext_4, sizeof(plaintext_4),
                 ciphertext_4, sizeof(ciphertext_4))) {
    printf("Exiting rfc3394_test()\n");
    return (-1);
  }
  if (aeskw_test(key_5, sizeof(key_5) * 8, plaintext_5, sizeof(plaintext_5),
                 ciphertext_5, sizeof(ciphertext_5))) {
    printf("Exiting rfc3394_test()\n");
    return (-1);
  }
  if (aeskw_test(key_6, sizeof(key_6) * 8, plaintext_6, sizeof(plaintext_6),
                 ciphertext_6, sizeof(ciphertext_6))) {
    printf("Exiting rfc3394_test()\n");
    return (-1);
  }
  printf("Exiting rfc3394_test()\n");
  return 0;
}


x86 assembly (clang, -O0):
<rfc3394_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
mov    0xebe(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb8(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb5(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xeb2(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xeaf(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xeac(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xeb1(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xeae(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xeab(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe60(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xe5d(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xe9a(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0xe94(%rip),%rax
mov    %rax,-0x98(%rbp)
mov    0xe8e(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xf40(%rip),%rax
mov    %rax,-0xc0(%rbp)
mov    0xf3a(%rip),%rax
mov    %rax,-0xb8(%rbp)
mov    0xf34(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0xf2e(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    0xde8(%rip),%rax
mov    %rax,-0xd0(%rbp)
mov    0xde2(%rip),%rax
mov    %rax,-0xc8(%rbp)
mov    0xe3c(%rip),%rax
mov    %rax,-0xf0(%rbp)
mov    0xe36(%rip),%rax
mov    %rax,-0xe8(%rbp)
mov    0xe30(%rip),%rax
mov    %rax,-0xe0(%rbp)
mov    0xe32(%rip),%rax
mov    %rax,-0x110(%rbp)
mov    0xe2c(%rip),%rax
mov    %rax,-0x108(%rbp)
mov    0xe26(%rip),%rax
mov    %rax,-0x100(%rbp)
mov    0xe28(%rip),%rax
mov    %rax,-0x130(%rbp)
mov    0xe22(%rip),%rax
mov    %rax,-0x128(%rbp)
mov    0xe1c(%rip),%rax
mov    %rax,-0x120(%rbp)
mov    0xe8e(%rip),%rax
mov    %rax,-0x150(%rbp)
mov    0xe88(%rip),%rax
mov    %rax,-0x148(%rbp)
mov    0xe82(%rip),%rax
mov    %rax,-0x140(%rbp)
mov    0xe7c(%rip),%rax
mov    %rax,-0x138(%rbp)
mov    0xe36(%rip),%rax
mov    %rax,-0x170(%rbp)
mov    0xe30(%rip),%rax
mov    %rax,-0x168(%rbp)
mov    0xe2a(%rip),%rax
mov    %rax,-0x160(%rbp)
mov    0xe24(%rip),%rax
mov    %rax,-0x158(%rbp)
mov    0xdae(%rip),%rax
mov    %rax,-0x190(%rbp)
mov    0xda8(%rip),%rax
mov    %rax,-0x188(%rbp)
mov    0xda2(%rip),%rax
mov    %rax,-0x180(%rbp)
mov    0xe14(%rip),%rax
mov    %rax,-0x1b0(%rbp)
mov    0xe0e(%rip),%rax
mov    %rax,-0x1a8(%rbp)
mov    0xe08(%rip),%rax
mov    %rax,-0x1a0(%rbp)
mov    0xe02(%rip),%rax
mov    %rax,-0x198(%rbp)
mov    0xd9c(%rip),%rax
mov    %rax,-0x1d0(%rbp)
mov    0xd96(%rip),%rax
mov    %rax,-0x1c8(%rbp)
mov    0xd90(%rip),%rax
mov    %rax,-0x1c0(%rbp)
mov    0xd8a(%rip),%rax
mov    %rax,-0x1b8(%rbp)
mov    0xdc4(%rip),%rax
mov    %rax,-0x1f0(%rbp)
mov    0xdbe(%rip),%rax
mov    %rax,-0x1e8(%rbp)
mov    0xdb8(%rip),%rax
mov    %rax,-0x1e0(%rbp)
mov    0xdb2(%rip),%rax
mov    %rax,-0x1d8(%rbp)
lea    -0x220(%rbp),%rdi
lea    0xcf5(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
lea    0xd94(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
lea    -0x30(%rbp),%rdx
lea    -0x50(%rbp),%r8
mov    $0x80,%esi
mov    $0x10,%ecx
mov    $0x18,%r9d
call   1040 <aeskw_test@plt>
cmp    $0x0,%rax
je     1464 <rfc3394_test+0x334>
lea    0xd76(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    15ed <rfc3394_test+0x4bd>
lea    -0x70(%rbp),%rdi
lea    -0x80(%rbp),%rdx
lea    -0xa0(%rbp),%r8
mov    $0xc0,%esi
mov    $0x10,%ecx
mov    $0x18,%r9d
call   1040 <aeskw_test@plt>
cmp    $0x0,%rax
je     14aa <rfc3394_test+0x37a>
lea    0xd30(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    15ed <rfc3394_test+0x4bd>
lea    -0xc0(%rbp),%rdi
lea    -0xd0(%rbp),%rdx
lea    -0xf0(%rbp),%r8
mov    $0x100,%esi
mov    $0x10,%ecx
mov    $0x18,%r9d
call   1040 <aeskw_test@plt>
cmp    $0x0,%rax
je     14f6 <rfc3394_test+0x3c6>
lea    0xce4(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    15ed <rfc3394_test+0x4bd>
lea    -0x110(%rbp),%rdi
lea    -0x130(%rbp),%rdx
lea    -0x150(%rbp),%r8
mov    $0xc0,%esi
mov    $0x18,%ecx
mov    $0x20,%r9d
call   1040 <aeskw_test@plt>
cmp    $0x0,%rax
je     1542 <rfc3394_test+0x412>
lea    0xc98(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    15ed <rfc3394_test+0x4bd>
lea    -0x170(%rbp),%rdi
lea    -0x190(%rbp),%rdx
lea    -0x1b0(%rbp),%r8
mov    $0x100,%esi
mov    $0x18,%ecx
mov    $0x20,%r9d
call   1040 <aeskw_test@plt>
cmp    $0x0,%rax
je     158e <rfc3394_test+0x45e>
lea    0xc4c(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    15ed <rfc3394_test+0x4bd>
lea    -0x1d0(%rbp),%rdi
lea    -0x1f0(%rbp),%rdx
lea    -0x220(%rbp),%r8
mov    $0x100,%esi
mov    $0x20,%ecx
mov    $0x28,%r9d
call   1040 <aeskw_test@plt>
cmp    $0x0,%rax
je     15da <rfc3394_test+0x4aa>
lea    0xc00(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    15ed <rfc3394_test+0x4bd>
lea    0xbe8(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rfc3394_test>:
push   %rbp
push   %rbx
sub    $0x218,%rsp
movaps 0xed0(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0xed1(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0xed2(%rip),%xmm1
movaps %xmm1,0xe0(%rsp)
movabs $0xe5cfd27123863e9d,%rax
d2 cf e5
mov    %rax,0xf0(%rsp)
movaps 0xf11(%rip),%xmm1
movaps %xmm1,0xc0(%rsp)
movabs $0x1716151413121110,%rax
15 16 17
mov    %rax,0xd0(%rsp)
movaps %xmm0,0xb0(%rsp)
movabs $0x5d4ed87aa1b88a46,%rcx
d8 4e 5d
mov    %rcx,0xa0(%rsp)
movaps 0xe96(%rip),%xmm2
movaps %xmm2,0x90(%rsp)
movaps 0xf87(%rip),%xmm2
movaps %xmm2,0x200(%rsp)
movaps 0xf68(%rip),%xmm3
movaps %xmm3,0x1f0(%rsp)
movaps %xmm0,0x80(%rsp)
movabs $0xe78a6e7d1e19c893,%rcx
6e 8a e7
mov    %rcx,0x70(%rsp)
movaps 0xe72(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
mov    %rax,0x50(%rsp)
movaps %xmm1,0x40(%rsp)
movabs $0x706050403020100,%rax
05 06 07
mov    %rax,0x30(%rsp)
movaps 0xe8d(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xee1(%rip),%xmm1
movaps %xmm1,0x1e0(%rsp)
movaps 0xec2(%rip),%xmm1
movaps %xmm1,0x1d0(%rsp)
movaps %xmm2,0x1c0(%rsp)
movaps %xmm3,0x1b0(%rsp)
mov    %rax,0x10(%rsp)
movaps %xmm0,(%rsp)
movaps 0xeca(%rip),%xmm0
movaps %xmm0,0x1a0(%rsp)
movaps 0xeab(%rip),%xmm0
movaps %xmm0,0x190(%rsp)
movaps %xmm2,0x180(%rsp)
movaps %xmm3,0x170(%rsp)
movaps 0xedc(%rip),%xmm0
movaps %xmm0,0x160(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,0x150(%rsp)
movabs $0x21dd027a9b8b98fb,%rax
02 dd 21
mov    %rax,0x140(%rsp)
movaps 0xe1c(%rip),%xmm0
movaps %xmm0,0x130(%rsp)
movaps 0xdfd(%rip),%xmm0
movaps %xmm0,0x120(%rsp)
lea    0xe9e(%rip),%rdi
call   1030 <puts@plt>
lea    0x110(%rsp),%rdi
lea    0x100(%rsp),%rdx
lea    0xe0(%rsp),%r8
mov    $0x80,%esi
mov    $0x10,%ecx
mov    $0x18,%r9d
call   1040 <aeskw_test@plt>
mov    $0xffffffff,%ebp
lea    0xe78(%rip),%rbx
test   %rax,%rax
jne    140d <rfc3394_test+0x2ed>
lea    0xc0(%rsp),%rdi
lea    0xb0(%rsp),%rdx
lea    0x90(%rsp),%r8
mov    $0xc0,%esi
mov    $0x10,%ecx
mov    $0x18,%r9d
call   1040 <aeskw_test@plt>
test   %rax,%rax
jne    140d <rfc3394_test+0x2ed>
lea    0x1f0(%rsp),%rdi
lea    0x80(%rsp),%rdx
lea    0x60(%rsp),%r8
mov    $0x100,%esi
mov    $0x10,%ecx
mov    $0x18,%r9d
call   1040 <aeskw_test@plt>
test   %rax,%rax
jne    140d <rfc3394_test+0x2ed>
lea    0x40(%rsp),%rdi
lea    0x20(%rsp),%rdx
lea    0x1d0(%rsp),%r8
mov    $0xc0,%esi
mov    $0x18,%ecx
mov    $0x20,%r9d
call   1040 <aeskw_test@plt>
test   %rax,%rax
jne    140d <rfc3394_test+0x2ed>
lea    0x1b0(%rsp),%rdi
mov    %rsp,%rdx
lea    0x190(%rsp),%r8
mov    $0x100,%esi
mov    $0x18,%ecx
mov    $0x20,%r9d
call   1040 <aeskw_test@plt>
test   %rax,%rax
jne    140d <rfc3394_test+0x2ed>
lea    0x170(%rsp),%rdi
lea    0x150(%rsp),%rdx
lea    0x120(%rsp),%r8
mov    $0x100,%esi
mov    $0x20,%ecx
mov    $0x28,%r9d
call   1040 <aeskw_test@plt>
neg    %rax
sbb    %ebp,%ebp
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %ebp,%eax
add    $0x218,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@__const.rfc3394_test.key_1 = [16 x i8] c"\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F"
@__const.rfc3394_test.plaintext_1 = [16 x i8] c"\00\11\223DUfw\88\99\AA\BB\CC\DD\EE\FF"
@__const.rfc3394_test.ciphertext_1 = [24 x i8] c"\1F\A6\8B\0A\81\12\B4G\AE\F3K\D8\FBZ{\82\9D>\86#q\D2\CF\E5"
@__const.rfc3394_test.key_2 = [24 x i8] c"\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17"
@__const.rfc3394_test.plaintext_2 = [16 x i8] c"\00\11\223DUfw\88\99\AA\BB\CC\DD\EE\FF"
@__const.rfc3394_test.ciphertext_2 = [24 x i8] c"\96w\8B%\AEl\A45\F9+[\97\C0P\AE\D2F\8A\B8\A1z\D8N]"
@__const.rfc3394_test.key_3 = [32 x i8] c"\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19\1A\1B\1C\1D\1E\1F"
@__const.rfc3394_test.plaintext_3 = [16 x i8] c"\00\11\223DUfw\88\99\AA\BB\CC\DD\EE\FF"
@__const.rfc3394_test.ciphertext_3 = [24 x i8] c"d\E8\C3\F9\CE\0F[\A2c\E9wy\05\81\8A*\93\C8\19\1E}n\8A\E7"
@__const.rfc3394_test.key_4 = [24 x i8] c"\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17"
@__const.rfc3394_test.plaintext_4 = [24 x i8] c"\00\11\223DUfw\88\99\AA\BB\CC\DD\EE\FF\00\01\02\03\04\05\06\07"
@__const.rfc3394_test.ciphertext_4 = [32 x i8] c"\03\1D3&N\15\D32h\F2N\C2`t>\DC\E1\C6\C7\DD\EErZ\93k\A8\14\91\\gb\D2"
@__const.rfc3394_test.key_5 = [32 x i8] c"\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19\1A\1B\1C\1D\1E\1F"
@__const.rfc3394_test.plaintext_5 = [24 x i8] c"\00\11\223DUfw\88\99\AA\BB\CC\DD\EE\FF\00\01\02\03\04\05\06\07"
@__const.rfc3394_test.ciphertext_5 = [32 x i8] c"\A8\F9\BC\16\12\C6\8B?\F6\E6\F4\FB\E3\0Eq\E4v\9C\8B\80\A3,\B8\95\8C\D5\D1}k%M\A1"
@__const.rfc3394_test.key_6 = [32 x i8] c"\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19\1A\1B\1C\1D\1E\1F"
@__const.rfc3394_test.plaintext_6 = [32 x i8] c"\00\11\223DUfw\88\99\AA\BB\CC\DD\EE\FF\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F"
@__const.rfc3394_test.ciphertext_6 = [40 x i8] c"(\C9\F4\04\C4\B8\10\F4\CB\CC\B3\\\FB\87\F8&?W\86\E2\D8\0E\D3&\CB\C7\F0\E7\1A\99\F4;\FB\98\8B\9Bz\02\DD!"
@.str = [25 x i8] c"Entering rfc3394_test()\0A\00"
@.str.1 = [24 x i8] c"Exiting rfc3394_test()\0A\00"
define i32 @rfc3394_test() {
%1 = alloca i32
%2 = alloca [16 x i8]
%3 = alloca [16 x i8]
%4 = alloca [24 x i8]
%5 = alloca [24 x i8]
%6 = alloca [16 x i8]
%7 = alloca [24 x i8]
%8 = alloca [32 x i8]
%9 = alloca [16 x i8]
%10 = alloca [24 x i8]
%11 = alloca [24 x i8]
%12 = alloca [24 x i8]
%13 = alloca [32 x i8]
%14 = alloca [32 x i8]
%15 = alloca [24 x i8]
%16 = alloca [32 x i8]
%17 = alloca [32 x i8]
%18 = alloca [32 x i8]
%19 = alloca [40 x i8]
%20 = bitcast [16 x i8]* %2 to i8*
%21 = bitcast [16 x i8]* %3 to i8*
%22 = bitcast [24 x i8]* %4 to i8*
%23 = bitcast [24 x i8]* %5 to i8*
%24 = bitcast [16 x i8]* %6 to i8*
%25 = bitcast [24 x i8]* %7 to i8*
%26 = bitcast [32 x i8]* %8 to i8*
%27 = bitcast [16 x i8]* %9 to i8*
%28 = bitcast [24 x i8]* %10 to i8*
%29 = bitcast [24 x i8]* %11 to i8*
%30 = bitcast [24 x i8]* %12 to i8*
%31 = bitcast [32 x i8]* %13 to i8*
%32 = bitcast [32 x i8]* %14 to i8*
%33 = bitcast [24 x i8]* %15 to i8*
%34 = bitcast [32 x i8]* %16 to i8*
%35 = bitcast [32 x i8]* %17 to i8*
%36 = bitcast [32 x i8]* %18 to i8*
%37 = bitcast [40 x i8]* %19 to i8*
%38 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%39 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%40 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%41 = getelementptr inbounds [24 x i8], [24 x i8]* %4, i64 0, i64 0
%42 = call i64 @aeskw_test(i8* %39, i32 128, i8* %40, i32 16, i8* %41, i32 24)
%43 = icmp ne i64 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %0
%45 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %1
br label %88
46: ; preds = %0
%47 = getelementptr inbounds [24 x i8], [24 x i8]* %5, i64 0, i64 0
%48 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%49 = getelementptr inbounds [24 x i8], [24 x i8]* %7, i64 0, i64 0
%50 = call i64 @aeskw_test(i8* %47, i32 192, i8* %48, i32 16, i8* %49, i32 24)
%51 = icmp ne i64 %50, 0
br i1 %51, label %52, label %54
52: ; preds = %46
%53 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %1
br label %88
54: ; preds = %46
%55 = getelementptr inbounds [32 x i8], [32 x i8]* %8, i64 0, i64 0
%56 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 0
%57 = getelementptr inbounds [24 x i8], [24 x i8]* %10, i64 0, i64 0
%58 = call i64 @aeskw_test(i8* %55, i32 256, i8* %56, i32 16, i8* %57, i32 24)
%59 = icmp ne i64 %58, 0
br i1 %59, label %60, label %62
60: ; preds = %54
%61 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %1
br label %88
62: ; preds = %54
%63 = getelementptr inbounds [24 x i8], [24 x i8]* %11, i64 0, i64 0
%64 = getelementptr inbounds [24 x i8], [24 x i8]* %12, i64 0, i64 0
%65 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%66 = call i64 @aeskw_test(i8* %63, i32 192, i8* %64, i32 24, i8* %65, i32 32)
%67 = icmp ne i64 %66, 0
br i1 %67, label %68, label %70
68: ; preds = %62
%69 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %1
br label %88
70: ; preds = %62
%71 = getelementptr inbounds [32 x i8], [32 x i8]* %14, i64 0, i64 0
%72 = getelementptr inbounds [24 x i8], [24 x i8]* %15, i64 0, i64 0
%73 = getelementptr inbounds [32 x i8], [32 x i8]* %16, i64 0, i64 0
%74 = call i64 @aeskw_test(i8* %71, i32 256, i8* %72, i32 24, i8* %73, i32 32)
%75 = icmp ne i64 %74, 0
br i1 %75, label %76, label %78
76: ; preds = %70
%77 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %1
br label %88
78: ; preds = %70
%79 = getelementptr inbounds [32 x i8], [32 x i8]* %17, i64 0, i64 0
%80 = getelementptr inbounds [32 x i8], [32 x i8]* %18, i64 0, i64 0
%81 = getelementptr inbounds [40 x i8], [40 x i8]* %19, i64 0, i64 0
%82 = call i64 @aeskw_test(i8* %79, i32 256, i8* %80, i32 32, i8* %81, i32 40)
%83 = icmp ne i64 %82, 0
br i1 %83, label %84, label %86
84: ; preds = %78
%85 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %1
br label %88
86: ; preds = %78
%87 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %88
88: ; preds = %86, %84, %76, %68, %60, %52, %44
%89 = load i32, i32* %1
ret i32 %89
}

LLVM IR (-O2):
@__const.rfc3394_test.key_1 = [16 x i8] c"\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F"
@__const.rfc3394_test.ciphertext_1 = [24 x i8] c"\1F\A6\8B\0A\81\12\B4G\AE\F3K\D8\FBZ{\82\9D>\86#q\D2\CF\E5"
@__const.rfc3394_test.ciphertext_2 = [24 x i8] c"\96w\8B%\AEl\A45\F9+[\97\C0P\AE\D2F\8A\B8\A1z\D8N]"
@__const.rfc3394_test.plaintext_3 = [16 x i8] c"\00\11\223DUfw\88\99\AA\BB\CC\DD\EE\FF"
@__const.rfc3394_test.ciphertext_3 = [24 x i8] c"d\E8\C3\F9\CE\0F[\A2c\E9wy\05\81\8A*\93\C8\19\1E}n\8A\E7"
@__const.rfc3394_test.key_4 = [24 x i8] c"\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17"
@__const.rfc3394_test.ciphertext_4 = [32 x i8] c"\03\1D3&N\15\D32h\F2N\C2`t>\DC\E1\C6\C7\DD\EErZ\93k\A8\14\91\\gb\D2"
@__const.rfc3394_test.plaintext_5 = [24 x i8] c"\00\11\223DUfw\88\99\AA\BB\CC\DD\EE\FF\00\01\02\03\04\05\06\07"
@__const.rfc3394_test.ciphertext_5 = [32 x i8] c"\A8\F9\BC\16\12\C6\8B?\F6\E6\F4\FB\E3\0Eq\E4v\9C\8B\80\A3,\B8\95\8C\D5\D1}k%M\A1"
@__const.rfc3394_test.key_6 = [32 x i8] c"\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19\1A\1B\1C\1D\1E\1F"
@__const.rfc3394_test.plaintext_6 = [32 x i8] c"\00\11\223DUfw\88\99\AA\BB\CC\DD\EE\FF\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F"
@__const.rfc3394_test.ciphertext_6 = [40 x i8] c"(\C9\F4\04\C4\B8\10\F4\CB\CC\B3\\\FB\87\F8&?W\86\E2\D8\0E\D3&\CB\C7\F0\E7\1A\99\F4;\FB\98\8B\9Bz\02\DD!"
@str = [24 x i8] c"Entering rfc3394_test()\00"
@str.8 = [23 x i8] c"Exiting rfc3394_test()\00"
define i32 @rfc3394_test() {
%1 = alloca [16 x i8]
%2 = alloca [16 x i8]
%3 = alloca [24 x i8]
%4 = alloca [24 x i8]
%5 = alloca [16 x i8]
%6 = alloca [24 x i8]
%7 = alloca [32 x i8]
%8 = alloca [16 x i8]
%9 = alloca [24 x i8]
%10 = alloca [24 x i8]
%11 = alloca [24 x i8]
%12 = alloca [32 x i8]
%13 = alloca [32 x i8]
%14 = alloca [24 x i8]
%15 = alloca [32 x i8]
%16 = alloca [32 x i8]
%17 = alloca [32 x i8]
%18 = alloca [40 x i8]
%19 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%20 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%21 = getelementptr inbounds [24 x i8], [24 x i8]* %3, i64 0, i64 0
%22 = getelementptr inbounds [24 x i8], [24 x i8]* %4, i64 0, i64 0
%23 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%24 = getelementptr inbounds [24 x i8], [24 x i8]* %6, i64 0, i64 0
%25 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%26 = getelementptr inbounds [16 x i8], [16 x i8]* %8, i64 0, i64 0
%27 = getelementptr inbounds [24 x i8], [24 x i8]* %9, i64 0, i64 0
%28 = getelementptr inbounds [24 x i8], [24 x i8]* %10, i64 0, i64 0
%29 = getelementptr inbounds [24 x i8], [24 x i8]* %11, i64 0, i64 0
%30 = getelementptr inbounds [32 x i8], [32 x i8]* %12, i64 0, i64 0
%31 = getelementptr inbounds [32 x i8], [32 x i8]* %13, i64 0, i64 0
%32 = getelementptr inbounds [24 x i8], [24 x i8]* %14, i64 0, i64 0
%33 = getelementptr inbounds [32 x i8], [32 x i8]* %15, i64 0, i64 0
%34 = getelementptr inbounds [32 x i8], [32 x i8]* %16, i64 0, i64 0
%35 = getelementptr inbounds [32 x i8], [32 x i8]* %17, i64 0, i64 0
%36 = getelementptr inbounds [40 x i8], [40 x i8]* %18, i64 0, i64 0
%37 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%38 = call i64 @aeskw_test(i8* %19, i32 128, i8* %20, i32 16, i8* %21, i32 24)
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %58
40: ; preds = %0
%41 = call i64 @aeskw_test(i8* %22, i32 192, i8* %23, i32 16, i8* %24, i32 24)
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %58
43: ; preds = %40
%44 = call i64 @aeskw_test(i8* %25, i32 256, i8* %26, i32 16, i8* %27, i32 24)
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %58
46: ; preds = %43
%47 = call i64 @aeskw_test(i8* %28, i32 192, i8* %29, i32 24, i8* %30, i32 32)
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %58
49: ; preds = %46
%50 = call i64 @aeskw_test(i8* %31, i32 256, i8* %32, i32 24, i8* %33, i32 32)
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %58
52: ; preds = %49
%53 = call i64 @aeskw_test(i8* %34, i32 256, i8* %35, i32 32, i8* %36, i32 40)
%54 = icmp eq i64 %53, 0
%55 = select i1 %54, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str.8, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str.8, i64 0, i64 0)
%56 = xor i1 %54, true
%57 = sext i1 %56 to i32
br label %58
58: ; preds = %52, %49, %46, %43, %40, %0
%59 = phi i8* [ getelementptr inbounds ([23 x i8], [23 x i8]* @str.8, i64 0, i64 0), %0 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @str.8, i64 0, i64 0), %40 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @str.8, i64 0, i64 0), %43 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @str.8, i64 0, i64 0), %46 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @str.8, i64 0, i64 0), %49 ], [ %55, %52 ]
%60 = phi i32 [ -1, %0 ], [ -1, %40 ], [ -1, %43 ], [ -1, %46 ], [ -1, %49 ], [ %57, %52 ]
%61 = call i32 @puts(i8* dereferenceable(1) %59)
ret i32 %60
}