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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ XOR(char *, char *, char *, int);
char characterXOR(char, char);
int /*<<< orphan*/ expandKey_32to48(char *, char *);
int /*<<< orphan*/ feistel(char *, char *, char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ pPermute(char *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sBox(char *, char *);
int /*<<< orphan*/ sBox_converter(char *, int, int, int);
int sBox_helper(char const *);
void test() {
  char *block32 = "00000000000011100011110101100000";
  char *block48 = (char *)malloc(sizeof(char) * 48);
  char *block2 = (char *)malloc(sizeof(char) * 48);
  char *block3 = (char *)malloc(sizeof(char) * 32);
  expandKey_32to48(block32, block48);
  expandKey_32to48(block32, block2);
  int i;
  for (i = 0; i < 48; i++)
    printf("%c", block48[i]);
  printf("\n");
  printf("%c\n", block32[0]);
  printf("xxx\n");
  printf("%c\n", block48[0]);
  char c1 = '1';
  char c2 = 'D';
  char c3 = characterXOR(c1, c2);
  printf("%c\n", c3);
  XOR(block48, block2, block2, 48);
  for (i = 0; i < 48; i++)
    printf("%c", block2[i]);
  printf("\n");
  char *sboxtest = (char *)malloc(sizeof(char) * 5);
  for (i = 0; i < 16; i++) {
    sBox_converter(sboxtest, i, 8, 4);
    sboxtest[4] = '\0';
    printf("%s\n", sboxtest);
  }
  const char *tester = "101100";
  int val = sBox_helper(tester);
  printf("val: %d\n", val);
  printf("\n");
  printf("\n");
  printf("SBOX TEST\n");
  sBox(block48, block3);
  for (i = 0; i < 48; i++) {
    printf("%c", block48[i]);
  }
  printf("\n");
  for (i = 0; i < 32; i++) {
    printf("%c", block3[i]);
  }
  printf("\n\n");
  printf("FEISTEL TEST\n");
  char *subkey = (char *)malloc(sizeof(char) * 48);
  char *lmes = (char *)malloc(sizeof(char) * 32);
  char *rmes = (char *)malloc(sizeof(char) * 32);
  const char *lmes2 = "11111111111100000001100001010101";
  const char *rmes2 = "00000000000000001110000010010110";
  const char *subkey2 = "101110010000011001101110000111000100110100001011";
  for (i = 0; i < 48; i++) {
    if (i < 32) {
      lmes[i] = lmes2[i];
      rmes[i] = rmes2[i];
    }
    subkey[i] = subkey2[i];
  }
  feistel(lmes, rmes, subkey);
  for (i = 0; i < 32; i++) {
    printf("%c", lmes[i]);
  }
  printf("\n");
  for (i = 0; i < 32; i++) {
    printf("%c", rmes[i]);
  }
  printf("\n\n");
  printf("PBOX TEST\n");
  char *t1 = (char *)malloc(sizeof(char) * 32);
  char *t2 = (char *)malloc(sizeof(char) * 32);
  pPermute(t1, t2);
  for (i = 0; i < 32; i++) {
    printf("%c", t1[i]);
  }
  printf("\n");
  for (i = 0; i < 32; i++) {
    printf("%c", t2[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
lea    0xe4e(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    $0x30,%edi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x30,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x20,%edi
call   1060 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1080 <expandKey_32to48@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1080 <expandKey_32to48@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x30,-0x24(%rbp)
jge    1233 <test+0x93>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xe03(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1201 <test+0x61>
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%esi
lea    0xdd5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdcb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%esi
lea    0xdb2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movb   $0x31,-0x25(%rbp)
movb   $0x44,-0x26(%rbp)
mov    -0x25(%rbp),%al
movsbl %al,%edi
movsbl -0x26(%rbp),%esi
call   1090 <characterXOR@plt>
mov    %al,-0x27(%rbp)
movsbl -0x27(%rbp),%esi
lea    0xd86(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x30,%ecx
call   1050 <XOR@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x30,-0x24(%rbp)
jge    12f4 <test+0x154>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xd42(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12c2 <test+0x122>
lea    0xd52(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x5,%edi
call   1060 <malloc@plt>
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x10,-0x24(%rbp)
jge    135f <test+0x1bf>
mov    -0x30(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    $0x8,%edx
mov    $0x4,%ecx
call   1070 <sBox_converter@plt>
mov    -0x30(%rbp),%rax
movb   $0x0,0x4(%rax)
mov    -0x30(%rbp),%rsi
lea    0xce3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1317 <test+0x177>
lea    0xccb(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
call   10c0 <sBox_helper@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%esi
lea    0xcb8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xcbf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xcb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc97(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   10b0 <sBox@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x30,-0x24(%rbp)
jge    13f7 <test+0x257>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xc3f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    13c5 <test+0x225>
lea    0xc4f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x20,-0x24(%rbp)
jge    143e <test+0x29e>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xbf8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    140c <test+0x26c>
lea    0xc07(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xbfc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x30,%edi
call   1060 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    $0x20,%edi
call   1060 <malloc@plt>
mov    %rax,-0x50(%rbp)
mov    $0x20,%edi
call   1060 <malloc@plt>
mov    %rax,-0x58(%rbp)
lea    0xbd2(%rip),%rax
mov    %rax,-0x60(%rbp)
lea    0xbe8(%rip),%rax
mov    %rax,-0x68(%rbp)
lea    0xbfe(%rip),%rax
mov    %rax,-0x70(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x30,-0x24(%rbp)
jge    1510 <test+0x370>
cmpl   $0x20,-0x24(%rbp)
jge    14ec <test+0x34c>
mov    -0x60(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x50(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x68(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x58(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x70(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x48(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    14ac <test+0x30c>
mov    -0x50(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    -0x48(%rbp),%rdx
call   10a0 <feistel@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x20,-0x24(%rbp)
jge    155a <test+0x3ba>
mov    -0x50(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xadc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1528 <test+0x388>
lea    0xaec(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x20,-0x24(%rbp)
jge    15a1 <test+0x401>
mov    -0x58(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xa95(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    156f <test+0x3cf>
lea    0xaa4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xb1a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x20,%edi
call   1060 <malloc@plt>
mov    %rax,-0x78(%rbp)
mov    $0x20,%edi
call   1060 <malloc@plt>
mov    %rax,-0x80(%rbp)
mov    -0x78(%rbp),%rdi
mov    -0x80(%rbp),%rsi
call   1030 <pPermute@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x20,-0x24(%rbp)
jge    161f <test+0x47f>
mov    -0x78(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xa17(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    15ed <test+0x44d>
lea    0xa27(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x20,-0x24(%rbp)
jge    1666 <test+0x4c6>
mov    -0x80(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0x9d0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1634 <test+0x494>
lea    0x9e0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    $0x30,%edi
call   1080 <malloc@plt>
mov    %rax,%r15
mov    $0x30,%edi
call   1080 <malloc@plt>
mov    %rax,%r13
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,%r14
lea    0xe09(%rip),%r12
mov    %r12,%rdi
mov    %r15,%rsi
call   10a0 <expandKey_32to48@plt>
mov    %r12,%rdi
mov    %r13,%rsi
call   10a0 <expandKey_32to48@plt>
xor    %ebx,%ebx
nop
movsbl (%r15,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    $0x30,%rbx
jne    1210 <test+0x50>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xdec(%rip),%r12
xor    %ebx,%ebx
mov    %r12,%rdi
mov    $0x30,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe5b(%rip),%rdi
call   1040 <puts@plt>
movsbl (%r15),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x31,%edi
mov    $0x44,%esi
call   10b0 <characterXOR@plt>
movsbl %al,%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
mov    %r13,%rsi
mov    %r13,%rdx
mov    $0x30,%ecx
call   1070 <XOR@plt>
nop
movsbl 0x0(%r13,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    $0x30,%rbx
jne    1290 <test+0xd0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x5,%edi
call   1080 <malloc@plt>
mov    %rax,%r12
xor    %ebx,%ebx
mov    %rax,%rdi
xor    %esi,%esi
mov    $0x8,%edx
mov    $0x4,%ecx
call   1090 <sBox_converter@plt>
movb   $0x0,0x4(%r12)
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    $0x1,%esi
mov    $0x8,%edx
mov    $0x4,%ecx
call   1090 <sBox_converter@plt>
movb   $0x0,0x4(%r12)
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    $0x2,%esi
mov    $0x8,%edx
mov    $0x4,%ecx
call   1090 <sBox_converter@plt>
movb   $0x0,0x4(%r12)
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    $0x3,%esi
mov    $0x8,%edx
mov    $0x4,%ecx
call   1090 <sBox_converter@plt>
movb   $0x0,0x4(%r12)
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    $0x4,%esi
mov    $0x8,%edx
mov    $0x4,%ecx
call   1090 <sBox_converter@plt>
movb   $0x0,0x4(%r12)
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    $0x5,%esi
mov    $0x8,%edx
mov    $0x4,%ecx
call   1090 <sBox_converter@plt>
movb   $0x0,0x4(%r12)
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    $0x6,%esi
mov    $0x8,%edx
mov    $0x4,%ecx
call   1090 <sBox_converter@plt>
movb   $0x0,0x4(%r12)
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    $0x7,%esi
mov    $0x8,%edx
mov    $0x4,%ecx
call   1090 <sBox_converter@plt>
movb   $0x0,0x4(%r12)
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    $0x8,%esi
mov    $0x8,%edx
mov    $0x4,%ecx
call   1090 <sBox_converter@plt>
movb   $0x0,0x4(%r12)
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    $0x9,%esi
mov    $0x8,%edx
mov    $0x4,%ecx
call   1090 <sBox_converter@plt>
movb   $0x0,0x4(%r12)
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    $0xa,%esi
mov    $0x8,%edx
mov    $0x4,%ecx
call   1090 <sBox_converter@plt>
movb   $0x0,0x4(%r12)
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    $0xb,%esi
mov    $0x8,%edx
mov    $0x4,%ecx
call   1090 <sBox_converter@plt>
movb   $0x0,0x4(%r12)
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    $0xc,%esi
mov    $0x8,%edx
mov    $0x4,%ecx
call   1090 <sBox_converter@plt>
movb   $0x0,0x4(%r12)
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    $0xd,%esi
mov    $0x8,%edx
mov    $0x4,%ecx
call   1090 <sBox_converter@plt>
movb   $0x0,0x4(%r12)
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    $0xe,%esi
mov    $0x8,%edx
mov    $0x4,%ecx
call   1090 <sBox_converter@plt>
movb   $0x0,0x4(%r12)
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    $0xf,%esi
mov    $0x8,%edx
mov    $0x4,%ecx
call   1090 <sBox_converter@plt>
movb   $0x0,0x4(%r12)
mov    %r12,%rdi
call   1040 <puts@plt>
lea    0xb13(%rip),%rdi
call   10e0 <sBox_helper@plt>
lea    0xb0e(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xb6a(%rip),%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   10d0 <sBox@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r15,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    $0x30,%rbx
jne    1560 <test+0x3a0>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl (%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x2(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x3(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x4(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x5(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x6(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x7(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x8(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x9(%r14),%edi
call   1030 <putchar@plt>
movsbl 0xa(%r14),%edi
call   1030 <putchar@plt>
movsbl 0xb(%r14),%edi
call   1030 <putchar@plt>
movsbl 0xc(%r14),%edi
call   1030 <putchar@plt>
movsbl 0xd(%r14),%edi
call   1030 <putchar@plt>
movsbl 0xe(%r14),%edi
call   1030 <putchar@plt>
movsbl 0xf(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x10(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x11(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x12(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x13(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x14(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x15(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x16(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x17(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x18(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x19(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1a(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1b(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1c(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1d(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1e(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1f(%r14),%edi
call   1030 <putchar@plt>
lea    0x95f(%rip),%rdi
call   1040 <puts@plt>
lea    0x9e6(%rip),%rdi
call   1040 <puts@plt>
mov    $0x30,%edi
call   1080 <malloc@plt>
mov    %rax,%rbx
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,%r15
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,%r14
xor    %eax,%eax
lea    0x930(%rip),%rdi
lea    0x94a(%rip),%rdx
lea    0x964(%rip),%rsi
jmp    1733 <test+0x573>
cs nopw 0x0(%rax,%rax,1)
nop
movzbl 0x1(%rax,%rsi,1),%ecx
mov    %cl,0x1(%rbx,%rax,1)
add    $0x2,%rax
cmp    $0x30,%rax
je     176c <test+0x5ac>
cmp    $0x1f,%rax
ja     1749 <test+0x589>
movzbl (%rax,%rdi,1),%ecx
mov    %cl,(%r15,%rax,1)
movzbl (%rax,%rdx,1),%ecx
mov    %cl,(%r14,%rax,1)
movzbl (%rax,%rsi,1),%ecx
mov    %cl,(%rbx,%rax,1)
cmp    $0x1e,%rax
ja     1720 <test+0x560>
movzbl 0x1(%rax,%rdi,1),%ecx
mov    %cl,0x1(%r15,%rax,1)
movzbl 0x1(%rax,%rdx,1),%ecx
mov    %cl,0x1(%r14,%rax,1)
jmp    1720 <test+0x560>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   10c0 <feistel@plt>
movsbl (%r15),%edi
call   1030 <putchar@plt>
movsbl 0x1(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x2(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x3(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x4(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x5(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x6(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x7(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x8(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x9(%r15),%edi
call   1030 <putchar@plt>
movsbl 0xa(%r15),%edi
call   1030 <putchar@plt>
movsbl 0xb(%r15),%edi
call   1030 <putchar@plt>
movsbl 0xc(%r15),%edi
call   1030 <putchar@plt>
movsbl 0xd(%r15),%edi
call   1030 <putchar@plt>
movsbl 0xe(%r15),%edi
call   1030 <putchar@plt>
movsbl 0xf(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x10(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x11(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x12(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x13(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x14(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x15(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x16(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x17(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x18(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x19(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x1a(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x1b(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x1c(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x1d(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x1e(%r15),%edi
call   1030 <putchar@plt>
movsbl 0x1f(%r15),%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl (%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x2(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x3(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x4(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x5(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x6(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x7(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x8(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x9(%r14),%edi
call   1030 <putchar@plt>
movsbl 0xa(%r14),%edi
call   1030 <putchar@plt>
movsbl 0xb(%r14),%edi
call   1030 <putchar@plt>
movsbl 0xc(%r14),%edi
call   1030 <putchar@plt>
movsbl 0xd(%r14),%edi
call   1030 <putchar@plt>
movsbl 0xe(%r14),%edi
call   1030 <putchar@plt>
movsbl 0xf(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x10(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x11(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x12(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x13(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x14(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x15(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x16(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x17(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x18(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x19(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1a(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1b(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1c(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1d(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1e(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1f(%r14),%edi
call   1030 <putchar@plt>
lea    0x61a(%rip),%rdi
call   1040 <puts@plt>
lea    0x6ae(%rip),%rdi
call   1040 <puts@plt>
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,%rbx
mov    $0x20,%edi
call   1080 <malloc@plt>
mov    %rax,%r14
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <pPermute@plt>
movsbl (%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x1(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x2(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x3(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x4(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x5(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x6(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x7(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x8(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x9(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0xa(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0xb(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0xc(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0xd(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0xe(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0xf(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x10(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x11(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x12(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x13(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x14(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x15(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x16(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x17(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x18(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x19(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x1a(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x1b(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x1c(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x1d(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x1e(%rbx),%edi
call   1030 <putchar@plt>
movsbl 0x1f(%rbx),%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl (%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x2(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x3(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x4(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x5(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x6(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x7(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x8(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x9(%r14),%edi
call   1030 <putchar@plt>
movsbl 0xa(%r14),%edi
call   1030 <putchar@plt>
movsbl 0xb(%r14),%edi
call   1030 <putchar@plt>
movsbl 0xc(%r14),%edi
call   1030 <putchar@plt>
movsbl 0xd(%r14),%edi
call   1030 <putchar@plt>
movsbl 0xe(%r14),%edi
call   1030 <putchar@plt>
movsbl 0xf(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x10(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x11(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x12(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x13(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x14(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x15(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x16(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x17(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x18(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x19(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1a(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1b(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1c(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1d(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1e(%r14),%edi
call   1030 <putchar@plt>
movsbl 0x1f(%r14),%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"00000000000011100011110101100000\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [4 x i8] c"%c\0A\00"
@.str.4 = [5 x i8] c"xxx\0A\00"
@.str.5 = [4 x i8] c"%s\0A\00"
@.str.6 = [7 x i8] c"101100\00"
@.str.7 = [9 x i8] c"val: %d\0A\00"
@.str.8 = [11 x i8] c"SBOX TEST\0A\00"
@.str.9 = [3 x i8] c"\0A\0A\00"
@.str.10 = [14 x i8] c"FEISTEL TEST\0A\00"
@.str.11 = [33 x i8] c"11111111111100000001100001010101\00"
@.str.12 = [33 x i8] c"00000000000000001110000010010110\00"
@.str.13 = [49 x i8] c"101110010000011001101110000111000100110100001011\00"
@.str.14 = [11 x i8] c"PBOX TEST\0A\00"
define void @test() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca i8*
%19 = alloca i8*
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8** %1
%20 = call i64 @malloc(i32 48)
%21 = inttoptr i64 %20 to i8*
store i8* %21, i8** %2
%22 = call i64 @malloc(i32 48)
%23 = inttoptr i64 %22 to i8*
store i8* %23, i8** %3
%24 = call i64 @malloc(i32 32)
%25 = inttoptr i64 %24 to i8*
store i8* %25, i8** %4
%26 = load i8*, i8** %1
%27 = load i8*, i8** %2
%28 = call i32 @expandKey_32to48(i8* %26, i8* %27)
%29 = load i8*, i8** %1
%30 = load i8*, i8** %3
%31 = call i32 @expandKey_32to48(i8* %29, i8* %30)
store i32 0, i32* %5
br label %32
32: ; preds = %43, %0
%33 = load i32, i32* %5
%34 = icmp slt i32 %33, 48
br i1 %34, label %35, label %46
35: ; preds = %32
%36 = load i8*, i8** %2
%37 = load i32, i32* %5
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i8, i8* %36, i64 %38
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %41)
br label %43
43: ; preds = %35
%44 = load i32, i32* %5
%45 = add nsw i32 %44, 1
store i32 %45, i32* %5
br label %32
46: ; preds = %32
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%48 = load i8*, i8** %1
%49 = getelementptr inbounds i8, i8* %48, i64 0
%50 = load i8, i8* %49
%51 = sext i8 %50 to i32
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %51)
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%54 = load i8*, i8** %2
%55 = getelementptr inbounds i8, i8* %54, i64 0
%56 = load i8, i8* %55
%57 = sext i8 %56 to i32
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %57)
store i8 49, i8* %6
store i8 68, i8* %7
%59 = load i8, i8* %6
%60 = load i8, i8* %7
%61 = call signext i8 @characterXOR(i8 signext %59, i8 signext %60)
store i8 %61, i8* %8
%62 = load i8, i8* %8
%63 = sext i8 %62 to i32
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %63)
%65 = load i8*, i8** %2
%66 = load i8*, i8** %3
%67 = load i8*, i8** %3
%68 = call i32 @XOR(i8* %65, i8* %66, i8* %67, i32 48)
store i32 0, i32* %5
br label %69
69: ; preds = %80, %46
%70 = load i32, i32* %5
%71 = icmp slt i32 %70, 48
br i1 %71, label %72, label %83
72: ; preds = %69
%73 = load i8*, i8** %3
%74 = load i32, i32* %5
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i8, i8* %73, i64 %75
%77 = load i8, i8* %76
%78 = sext i8 %77 to i32
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %78)
br label %80
80: ; preds = %72
%81 = load i32, i32* %5
%82 = add nsw i32 %81, 1
store i32 %82, i32* %5
br label %69
83: ; preds = %69
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%85 = call i64 @malloc(i32 5)
%86 = inttoptr i64 %85 to i8*
store i8* %86, i8** %9
store i32 0, i32* %5
br label %87
87: ; preds = %98, %83
%88 = load i32, i32* %5
%89 = icmp slt i32 %88, 16
br i1 %89, label %90, label %101
90: ; preds = %87
%91 = load i8*, i8** %9
%92 = load i32, i32* %5
%93 = call i32 @sBox_converter(i8* %91, i32 %92, i32 8, i32 4)
%94 = load i8*, i8** %9
%95 = getelementptr inbounds i8, i8* %94, i64 4
store i8 0, i8* %95
%96 = load i8*, i8** %9
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %96)
br label %98
98: ; preds = %90
%99 = load i32, i32* %5
%100 = add nsw i32 %99, 1
store i32 %100, i32* %5
br label %87
101: ; preds = %87
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8** %10
%102 = load i8*, i8** %10
%103 = call i32 @sBox_helper(i8* %102)
store i32 %103, i32* %11
%104 = load i32, i32* %11
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %104)
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
%109 = load i8*, i8** %2
%110 = load i8*, i8** %4
%111 = call i32 @sBox(i8* %109, i8* %110)
store i32 0, i32* %5
br label %112
112: ; preds = %123, %101
%113 = load i32, i32* %5
%114 = icmp slt i32 %113, 48
br i1 %114, label %115, label %126
115: ; preds = %112
%116 = load i8*, i8** %2
%117 = load i32, i32* %5
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds i8, i8* %116, i64 %118
%120 = load i8, i8* %119
%121 = sext i8 %120 to i32
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %121)
br label %123
123: ; preds = %115
%124 = load i32, i32* %5
%125 = add nsw i32 %124, 1
store i32 %125, i32* %5
br label %112
126: ; preds = %112
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %5
br label %128
128: ; preds = %139, %126
%129 = load i32, i32* %5
%130 = icmp slt i32 %129, 32
br i1 %130, label %131, label %142
131: ; preds = %128
%132 = load i8*, i8** %4
%133 = load i32, i32* %5
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds i8, i8* %132, i64 %134
%136 = load i8, i8* %135
%137 = sext i8 %136 to i32
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %137)
br label %139
139: ; preds = %131
%140 = load i32, i32* %5
%141 = add nsw i32 %140, 1
store i32 %141, i32* %5
br label %128
142: ; preds = %128
%143 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%144 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
%145 = call i64 @malloc(i32 48)
%146 = inttoptr i64 %145 to i8*
store i8* %146, i8** %12
%147 = call i64 @malloc(i32 32)
%148 = inttoptr i64 %147 to i8*
store i8* %148, i8** %13
%149 = call i64 @malloc(i32 32)
%150 = inttoptr i64 %149 to i8*
store i8* %150, i8** %14
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.11, i64 0, i64 0), i8** %15
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.12, i64 0, i64 0), i8** %16
store i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.13, i64 0, i64 0), i8** %17
store i32 0, i32* %5
br label %151
151: ; preds = %186, %142
%152 = load i32, i32* %5
%153 = icmp slt i32 %152, 48
br i1 %153, label %154, label %189
154: ; preds = %151
%155 = load i32, i32* %5
%156 = icmp slt i32 %155, 32
br i1 %156, label %157, label %176
157: ; preds = %154
%158 = load i8*, i8** %15
%159 = load i32, i32* %5
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds i8, i8* %158, i64 %160
%162 = load i8, i8* %161
%163 = load i8*, i8** %13
%164 = load i32, i32* %5
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds i8, i8* %163, i64 %165
store i8 %162, i8* %166
%167 = load i8*, i8** %16
%168 = load i32, i32* %5
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds i8, i8* %167, i64 %169
%171 = load i8, i8* %170
%172 = load i8*, i8** %14
%173 = load i32, i32* %5
%174 = sext i32 %173 to i64
%175 = getelementptr inbounds i8, i8* %172, i64 %174
store i8 %171, i8* %175
br label %176
176: ; preds = %157, %154
%177 = load i8*, i8** %17
%178 = load i32, i32* %5
%179 = sext i32 %178 to i64
%180 = getelementptr inbounds i8, i8* %177, i64 %179
%181 = load i8, i8* %180
%182 = load i8*, i8** %12
%183 = load i32, i32* %5
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds i8, i8* %182, i64 %184
store i8 %181, i8* %185
br label %186
186: ; preds = %176
%187 = load i32, i32* %5
%188 = add nsw i32 %187, 1
store i32 %188, i32* %5
br label %151
189: ; preds = %151
%190 = load i8*, i8** %13
%191 = load i8*, i8** %14
%192 = load i8*, i8** %12
%193 = call i32 @feistel(i8* %190, i8* %191, i8* %192)
store i32 0, i32* %5
br label %194
194: ; preds = %205, %189
%195 = load i32, i32* %5
%196 = icmp slt i32 %195, 32
br i1 %196, label %197, label %208
197: ; preds = %194
%198 = load i8*, i8** %13
%199 = load i32, i32* %5
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds i8, i8* %198, i64 %200
%202 = load i8, i8* %201
%203 = sext i8 %202 to i32
%204 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %203)
br label %205
205: ; preds = %197
%206 = load i32, i32* %5
%207 = add nsw i32 %206, 1
store i32 %207, i32* %5
br label %194
208: ; preds = %194
%209 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %5
br label %210
210: ; preds = %221, %208
%211 = load i32, i32* %5
%212 = icmp slt i32 %211, 32
br i1 %212, label %213, label %224
213: ; preds = %210
%214 = load i8*, i8** %14
%215 = load i32, i32* %5
%216 = sext i32 %215 to i64
%217 = getelementptr inbounds i8, i8* %214, i64 %216
%218 = load i8, i8* %217
%219 = sext i8 %218 to i32
%220 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %219)
br label %221
221: ; preds = %213
%222 = load i32, i32* %5
%223 = add nsw i32 %222, 1
store i32 %223, i32* %5
br label %210
224: ; preds = %210
%225 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%226 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i64 0, i64 0))
%227 = call i64 @malloc(i32 32)
%228 = inttoptr i64 %227 to i8*
store i8* %228, i8** %18
%229 = call i64 @malloc(i32 32)
%230 = inttoptr i64 %229 to i8*
store i8* %230, i8** %19
%231 = load i8*, i8** %18
%232 = load i8*, i8** %19
%233 = call i32 @pPermute(i8* %231, i8* %232)
store i32 0, i32* %5
br label %234
234: ; preds = %245, %224
%235 = load i32, i32* %5
%236 = icmp slt i32 %235, 32
br i1 %236, label %237, label %248
237: ; preds = %234
%238 = load i8*, i8** %18
%239 = load i32, i32* %5
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds i8, i8* %238, i64 %240
%242 = load i8, i8* %241
%243 = sext i8 %242 to i32
%244 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %243)
br label %245
245: ; preds = %237
%246 = load i32, i32* %5
%247 = add nsw i32 %246, 1
store i32 %247, i32* %5
br label %234
248: ; preds = %234
%249 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %5
br label %250
250: ; preds = %261, %248
%251 = load i32, i32* %5
%252 = icmp slt i32 %251, 32
br i1 %252, label %253, label %264
253: ; preds = %250
%254 = load i8*, i8** %19
%255 = load i32, i32* %5
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds i8, i8* %254, i64 %256
%258 = load i8, i8* %257
%259 = sext i8 %258 to i32
%260 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %259)
br label %261
261: ; preds = %253
%262 = load i32, i32* %5
%263 = add nsw i32 %262, 1
store i32 %263, i32* %5
br label %250
264: ; preds = %250
%265 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"00000000000011100011110101100000\00"
@.str.3 = [4 x i8] c"%c\0A\00"
@.str.6 = [7 x i8] c"101100\00"
@.str.7 = [9 x i8] c"val: %d\0A\00"
@.str.11 = [33 x i8] c"11111111111100000001100001010101\00"
@.str.12 = [33 x i8] c"00000000000000001110000010010110\00"
@.str.13 = [49 x i8] c"101110010000011001101110000111000100110100001011\00"
@str = [4 x i8] c"xxx\00"
@str.15 = [10 x i8] c"SBOX TEST\00"
@str.17 = [13 x i8] c"FEISTEL TEST\00"
@str.18 = [2 x i8] c"\0A\00"
@str.19 = [10 x i8] c"PBOX TEST\00"
define void @test() {
%1 = tail call i64 @malloc(i32 48)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i64 @malloc(i32 48)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i64 @malloc(i32 32)
%6 = tail call i32 @expandKey_32to48(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %2)
%7 = tail call i32 @expandKey_32to48(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %4)
br label %8
8: ; preds = %0, %8
%9 = phi i64 [ 0, %0 ], [ %14, %8 ]
%10 = getelementptr inbounds i8, i8* %2, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = tail call i32 @putchar(i32 %12)
%14 = add nuw nsw i64 %9, 1
%15 = icmp eq i64 %14, 48
br i1 %15, label %16, label %8
16: ; preds = %8
%17 = tail call i32 @putchar(i32 10)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 48)
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%20 = load i8, i8* %2
%21 = sext i8 %20 to i32
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %21)
%23 = tail call signext i8 @characterXOR(i8 signext 49, i8 signext 68)
%24 = sext i8 %23 to i32
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %24)
%26 = tail call i32 @XOR(i8* %2, i8* %4, i8* %4, i32 48)
br label %27
27: ; preds = %16, %27
%28 = phi i64 [ 0, %16 ], [ %33, %27 ]
%29 = getelementptr inbounds i8, i8* %4, i64 %28
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = tail call i32 @putchar(i32 %31)
%33 = add nuw nsw i64 %28, 1
%34 = icmp eq i64 %33, 48
br i1 %34, label %35, label %27
35: ; preds = %27
%36 = tail call i32 @putchar(i32 10)
%37 = tail call i64 @malloc(i32 5)
%38 = inttoptr i64 %37 to i8*
%39 = getelementptr inbounds i8, i8* %38, i64 4
%40 = tail call i32 @sBox_converter(i8* %38, i32 0, i32 8, i32 4)
store i8 0, i8* %39
%41 = tail call i32 @puts(i8* dereferenceable(1) %38)
%42 = tail call i32 @sBox_converter(i8* %38, i32 1, i32 8, i32 4)
store i8 0, i8* %39
%43 = tail call i32 @puts(i8* dereferenceable(1) %38)
%44 = tail call i32 @sBox_converter(i8* %38, i32 2, i32 8, i32 4)
store i8 0, i8* %39
%45 = tail call i32 @puts(i8* dereferenceable(1) %38)
%46 = tail call i32 @sBox_converter(i8* %38, i32 3, i32 8, i32 4)
store i8 0, i8* %39
%47 = tail call i32 @puts(i8* dereferenceable(1) %38)
%48 = tail call i32 @sBox_converter(i8* %38, i32 4, i32 8, i32 4)
store i8 0, i8* %39
%49 = tail call i32 @puts(i8* dereferenceable(1) %38)
%50 = tail call i32 @sBox_converter(i8* %38, i32 5, i32 8, i32 4)
store i8 0, i8* %39
%51 = tail call i32 @puts(i8* dereferenceable(1) %38)
%52 = tail call i32 @sBox_converter(i8* %38, i32 6, i32 8, i32 4)
store i8 0, i8* %39
%53 = tail call i32 @puts(i8* dereferenceable(1) %38)
%54 = tail call i32 @sBox_converter(i8* %38, i32 7, i32 8, i32 4)
store i8 0, i8* %39
%55 = tail call i32 @puts(i8* dereferenceable(1) %38)
%56 = tail call i32 @sBox_converter(i8* %38, i32 8, i32 8, i32 4)
store i8 0, i8* %39
%57 = tail call i32 @puts(i8* dereferenceable(1) %38)
%58 = tail call i32 @sBox_converter(i8* %38, i32 9, i32 8, i32 4)
store i8 0, i8* %39
%59 = tail call i32 @puts(i8* dereferenceable(1) %38)
%60 = tail call i32 @sBox_converter(i8* %38, i32 10, i32 8, i32 4)
store i8 0, i8* %39
%61 = tail call i32 @puts(i8* dereferenceable(1) %38)
%62 = tail call i32 @sBox_converter(i8* %38, i32 11, i32 8, i32 4)
store i8 0, i8* %39
%63 = tail call i32 @puts(i8* dereferenceable(1) %38)
%64 = tail call i32 @sBox_converter(i8* %38, i32 12, i32 8, i32 4)
store i8 0, i8* %39
%65 = tail call i32 @puts(i8* dereferenceable(1) %38)
%66 = tail call i32 @sBox_converter(i8* %38, i32 13, i32 8, i32 4)
store i8 0, i8* %39
%67 = tail call i32 @puts(i8* dereferenceable(1) %38)
%68 = tail call i32 @sBox_converter(i8* %38, i32 14, i32 8, i32 4)
store i8 0, i8* %39
%69 = tail call i32 @puts(i8* dereferenceable(1) %38)
%70 = tail call i32 @sBox_converter(i8* %38, i32 15, i32 8, i32 4)
store i8 0, i8* %39
%71 = tail call i32 @puts(i8* dereferenceable(1) %38)
%72 = inttoptr i64 %5 to i8*
%73 = tail call i32 @sBox_helper(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %73)
%75 = tail call i32 @putchar(i32 10)
%76 = tail call i32 @putchar(i32 10)
%77 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.15, i64 0, i64 0))
%78 = tail call i32 @sBox(i8* %2, i8* %72)
br label %79
79: ; preds = %35, %79
%80 = phi i64 [ 0, %35 ], [ %85, %79 ]
%81 = getelementptr inbounds i8, i8* %2, i64 %80
%82 = load i8, i8* %81
%83 = sext i8 %82 to i32
%84 = tail call i32 @putchar(i32 %83)
%85 = add nuw nsw i64 %80, 1
%86 = icmp eq i64 %85, 48
br i1 %86, label %87, label %79
87: ; preds = %79
%88 = tail call i32 @putchar(i32 10)
%89 = load i8, i8* %72
%90 = sext i8 %89 to i32
%91 = tail call i32 @putchar(i32 %90)
%92 = getelementptr inbounds i8, i8* %72, i64 1
%93 = load i8, i8* %92
%94 = sext i8 %93 to i32
%95 = tail call i32 @putchar(i32 %94)
%96 = getelementptr inbounds i8, i8* %72, i64 2
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
%99 = tail call i32 @putchar(i32 %98)
%100 = getelementptr inbounds i8, i8* %72, i64 3
%101 = load i8, i8* %100
%102 = sext i8 %101 to i32
%103 = tail call i32 @putchar(i32 %102)
%104 = getelementptr inbounds i8, i8* %72, i64 4
%105 = load i8, i8* %104
%106 = sext i8 %105 to i32
%107 = tail call i32 @putchar(i32 %106)
%108 = getelementptr inbounds i8, i8* %72, i64 5
%109 = load i8, i8* %108
%110 = sext i8 %109 to i32
%111 = tail call i32 @putchar(i32 %110)
%112 = getelementptr inbounds i8, i8* %72, i64 6
%113 = load i8, i8* %112
%114 = sext i8 %113 to i32
%115 = tail call i32 @putchar(i32 %114)
%116 = getelementptr inbounds i8, i8* %72, i64 7
%117 = load i8, i8* %116
%118 = sext i8 %117 to i32
%119 = tail call i32 @putchar(i32 %118)
%120 = getelementptr inbounds i8, i8* %72, i64 8
%121 = load i8, i8* %120
%122 = sext i8 %121 to i32
%123 = tail call i32 @putchar(i32 %122)
%124 = getelementptr inbounds i8, i8* %72, i64 9
%125 = load i8, i8* %124
%126 = sext i8 %125 to i32
%127 = tail call i32 @putchar(i32 %126)
%128 = getelementptr inbounds i8, i8* %72, i64 10
%129 = load i8, i8* %128
%130 = sext i8 %129 to i32
%131 = tail call i32 @putchar(i32 %130)
%132 = getelementptr inbounds i8, i8* %72, i64 11
%133 = load i8, i8* %132
%134 = sext i8 %133 to i32
%135 = tail call i32 @putchar(i32 %134)
%136 = getelementptr inbounds i8, i8* %72, i64 12
%137 = load i8, i8* %136
%138 = sext i8 %137 to i32
%139 = tail call i32 @putchar(i32 %138)
%140 = getelementptr inbounds i8, i8* %72, i64 13
%141 = load i8, i8* %140
%142 = sext i8 %141 to i32
%143 = tail call i32 @putchar(i32 %142)
%144 = getelementptr inbounds i8, i8* %72, i64 14
%145 = load i8, i8* %144
%146 = sext i8 %145 to i32
%147 = tail call i32 @putchar(i32 %146)
%148 = getelementptr inbounds i8, i8* %72, i64 15
%149 = load i8, i8* %148
%150 = sext i8 %149 to i32
%151 = tail call i32 @putchar(i32 %150)
%152 = getelementptr inbounds i8, i8* %72, i64 16
%153 = load i8, i8* %152
%154 = sext i8 %153 to i32
%155 = tail call i32 @putchar(i32 %154)
%156 = getelementptr inbounds i8, i8* %72, i64 17
%157 = load i8, i8* %156
%158 = sext i8 %157 to i32
%159 = tail call i32 @putchar(i32 %158)
%160 = getelementptr inbounds i8, i8* %72, i64 18
%161 = load i8, i8* %160
%162 = sext i8 %161 to i32
%163 = tail call i32 @putchar(i32 %162)
%164 = getelementptr inbounds i8, i8* %72, i64 19
%165 = load i8, i8* %164
%166 = sext i8 %165 to i32
%167 = tail call i32 @putchar(i32 %166)
%168 = getelementptr inbounds i8, i8* %72, i64 20
%169 = load i8, i8* %168
%170 = sext i8 %169 to i32
%171 = tail call i32 @putchar(i32 %170)
%172 = getelementptr inbounds i8, i8* %72, i64 21
%173 = load i8, i8* %172
%174 = sext i8 %173 to i32
%175 = tail call i32 @putchar(i32 %174)
%176 = getelementptr inbounds i8, i8* %72, i64 22
%177 = load i8, i8* %176
%178 = sext i8 %177 to i32
%179 = tail call i32 @putchar(i32 %178)
%180 = getelementptr inbounds i8, i8* %72, i64 23
%181 = load i8, i8* %180
%182 = sext i8 %181 to i32
%183 = tail call i32 @putchar(i32 %182)
%184 = getelementptr inbounds i8, i8* %72, i64 24
%185 = load i8, i8* %184
%186 = sext i8 %185 to i32
%187 = tail call i32 @putchar(i32 %186)
%188 = getelementptr inbounds i8, i8* %72, i64 25
%189 = load i8, i8* %188
%190 = sext i8 %189 to i32
%191 = tail call i32 @putchar(i32 %190)
%192 = getelementptr inbounds i8, i8* %72, i64 26
%193 = load i8, i8* %192
%194 = sext i8 %193 to i32
%195 = tail call i32 @putchar(i32 %194)
%196 = getelementptr inbounds i8, i8* %72, i64 27
%197 = load i8, i8* %196
%198 = sext i8 %197 to i32
%199 = tail call i32 @putchar(i32 %198)
%200 = getelementptr inbounds i8, i8* %72, i64 28
%201 = load i8, i8* %200
%202 = sext i8 %201 to i32
%203 = tail call i32 @putchar(i32 %202)
%204 = getelementptr inbounds i8, i8* %72, i64 29
%205 = load i8, i8* %204
%206 = sext i8 %205 to i32
%207 = tail call i32 @putchar(i32 %206)
%208 = getelementptr inbounds i8, i8* %72, i64 30
%209 = load i8, i8* %208
%210 = sext i8 %209 to i32
%211 = tail call i32 @putchar(i32 %210)
%212 = getelementptr inbounds i8, i8* %72, i64 31
%213 = load i8, i8* %212
%214 = sext i8 %213 to i32
%215 = tail call i32 @putchar(i32 %214)
%216 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.18, i64 0, i64 0))
%217 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.17, i64 0, i64 0))
%218 = tail call i64 @malloc(i32 48)
%219 = inttoptr i64 %218 to i8*
%220 = tail call i64 @malloc(i32 32)
%221 = inttoptr i64 %220 to i8*
%222 = tail call i64 @malloc(i32 32)
%223 = inttoptr i64 %222 to i8*
br label %224
224: ; preds = %247, %87
%225 = phi i64 [ 0, %87 ], [ %251, %247 ]
%226 = icmp ult i64 %225, 32
br i1 %226, label %227, label %234
227: ; preds = %224
%228 = getelementptr inbounds [33 x i8], [33 x i8]* @.str.11, i64 0, i64 %225
%229 = load i8, i8* %228
%230 = getelementptr inbounds i8, i8* %221, i64 %225
store i8 %229, i8* %230
%231 = getelementptr inbounds [33 x i8], [33 x i8]* @.str.12, i64 0, i64 %225
%232 = load i8, i8* %231
%233 = getelementptr inbounds i8, i8* %223, i64 %225
store i8 %232, i8* %233
br label %234
234: ; preds = %227, %224
%235 = getelementptr inbounds [49 x i8], [49 x i8]* @.str.13, i64 0, i64 %225
%236 = load i8, i8* %235
%237 = getelementptr inbounds i8, i8* %219, i64 %225
store i8 %236, i8* %237
%238 = or i64 %225, 1
%239 = icmp ult i64 %225, 31
br i1 %239, label %240, label %247
240: ; preds = %234
%241 = getelementptr inbounds [33 x i8], [33 x i8]* @.str.11, i64 0, i64 %238
%242 = load i8, i8* %241
%243 = getelementptr inbounds i8, i8* %221, i64 %238
store i8 %242, i8* %243
%244 = getelementptr inbounds [33 x i8], [33 x i8]* @.str.12, i64 0, i64 %238
%245 = load i8, i8* %244
%246 = getelementptr inbounds i8, i8* %223, i64 %238
store i8 %245, i8* %246
br label %247
247: ; preds = %240, %234
%248 = getelementptr inbounds [49 x i8], [49 x i8]* @.str.13, i64 0, i64 %238
%249 = load i8, i8* %248
%250 = getelementptr inbounds i8, i8* %219, i64 %238
store i8 %249, i8* %250
%251 = add nuw nsw i64 %225, 2
%252 = icmp eq i64 %251, 48
br i1 %252, label %253, label %224
253: ; preds = %247
%254 = tail call i32 @feistel(i8* %221, i8* %223, i8* %219)
%255 = load i8, i8* %221
%256 = sext i8 %255 to i32
%257 = tail call i32 @putchar(i32 %256)
%258 = getelementptr inbounds i8, i8* %221, i64 1
%259 = load i8, i8* %258
%260 = sext i8 %259 to i32
%261 = tail call i32 @putchar(i32 %260)
%262 = getelementptr inbounds i8, i8* %221, i64 2
%263 = load i8, i8* %262
%264 = sext i8 %263 to i32
%265 = tail call i32 @putchar(i32 %264)
%266 = getelementptr inbounds i8, i8* %221, i64 3
%267 = load i8, i8* %266
%268 = sext i8 %267 to i32
%269 = tail call i32 @putchar(i32 %268)
%270 = getelementptr inbounds i8, i8* %221, i64 4
%271 = load i8, i8* %270
%272 = sext i8 %271 to i32
%273 = tail call i32 @putchar(i32 %272)
%274 = getelementptr inbounds i8, i8* %221, i64 5
%275 = load i8, i8* %274
%276 = sext i8 %275 to i32
%277 = tail call i32 @putchar(i32 %276)
%278 = getelementptr inbounds i8, i8* %221, i64 6
%279 = load i8, i8* %278
%280 = sext i8 %279 to i32
%281 = tail call i32 @putchar(i32 %280)
%282 = getelementptr inbounds i8, i8* %221, i64 7
%283 = load i8, i8* %282
%284 = sext i8 %283 to i32
%285 = tail call i32 @putchar(i32 %284)
%286 = getelementptr inbounds i8, i8* %221, i64 8
%287 = load i8, i8* %286
%288 = sext i8 %287 to i32
%289 = tail call i32 @putchar(i32 %288)
%290 = getelementptr inbounds i8, i8* %221, i64 9
%291 = load i8, i8* %290
%292 = sext i8 %291 to i32
%293 = tail call i32 @putchar(i32 %292)
%294 = getelementptr inbounds i8, i8* %221, i64 10
%295 = load i8, i8* %294
%296 = sext i8 %295 to i32
%297 = tail call i32 @putchar(i32 %296)
%298 = getelementptr inbounds i8, i8* %221, i64 11
%299 = load i8, i8* %298
%300 = sext i8 %299 to i32
%301 = tail call i32 @putchar(i32 %300)
%302 = getelementptr inbounds i8, i8* %221, i64 12
%303 = load i8, i8* %302
%304 = sext i8 %303 to i32
%305 = tail call i32 @putchar(i32 %304)
%306 = getelementptr inbounds i8, i8* %221, i64 13
%307 = load i8, i8* %306
%308 = sext i8 %307 to i32
%309 = tail call i32 @putchar(i32 %308)
%310 = getelementptr inbounds i8, i8* %221, i64 14
%311 = load i8, i8* %310
%312 = sext i8 %311 to i32
%313 = tail call i32 @putchar(i32 %312)
%314 = getelementptr inbounds i8, i8* %221, i64 15
%315 = load i8, i8* %314
%316 = sext i8 %315 to i32
%317 = tail call i32 @putchar(i32 %316)
%318 = getelementptr inbounds i8, i8* %221, i64 16
%319 = load i8, i8* %318
%320 = sext i8 %319 to i32
%321 = tail call i32 @putchar(i32 %320)
%322 = getelementptr inbounds i8, i8* %221, i64 17
%323 = load i8, i8* %322
%324 = sext i8 %323 to i32
%325 = tail call i32 @putchar(i32 %324)
%326 = getelementptr inbounds i8, i8* %221, i64 18
%327 = load i8, i8* %326
%328 = sext i8 %327 to i32
%329 = tail call i32 @putchar(i32 %328)
%330 = getelementptr inbounds i8, i8* %221, i64 19
%331 = load i8, i8* %330
%332 = sext i8 %331 to i32
%333 = tail call i32 @putchar(i32 %332)
%334 = getelementptr inbounds i8, i8* %221, i64 20
%335 = load i8, i8* %334
%336 = sext i8 %335 to i32
%337 = tail call i32 @putchar(i32 %336)
%338 = getelementptr inbounds i8, i8* %221, i64 21
%339 = load i8, i8* %338
%340 = sext i8 %339 to i32
%341 = tail call i32 @putchar(i32 %340)
%342 = getelementptr inbounds i8, i8* %221, i64 22
%343 = load i8, i8* %342
%344 = sext i8 %343 to i32
%345 = tail call i32 @putchar(i32 %344)
%346 = getelementptr inbounds i8, i8* %221, i64 23
%347 = load i8, i8* %346
%348 = sext i8 %347 to i32
%349 = tail call i32 @putchar(i32 %348)
%350 = getelementptr inbounds i8, i8* %221, i64 24
%351 = load i8, i8* %350
%352 = sext i8 %351 to i32
%353 = tail call i32 @putchar(i32 %352)
%354 = getelementptr inbounds i8, i8* %221, i64 25
%355 = load i8, i8* %354
%356 = sext i8 %355 to i32
%357 = tail call i32 @putchar(i32 %356)
%358 = getelementptr inbounds i8, i8* %221, i64 26
%359 = load i8, i8* %358
%360 = sext i8 %359 to i32
%361 = tail call i32 @putchar(i32 %360)
%362 = getelementptr inbounds i8, i8* %221, i64 27
%363 = load i8, i8* %362
%364 = sext i8 %363 to i32
%365 = tail call i32 @putchar(i32 %364)
%366 = getelementptr inbounds i8, i8* %221, i64 28
%367 = load i8, i8* %366
%368 = sext i8 %367 to i32
%369 = tail call i32 @putchar(i32 %368)
%370 = getelementptr inbounds i8, i8* %221, i64 29
%371 = load i8, i8* %370
%372 = sext i8 %371 to i32
%373 = tail call i32 @putchar(i32 %372)
%374 = getelementptr inbounds i8, i8* %221, i64 30
%375 = load i8, i8* %374
%376 = sext i8 %375 to i32
%377 = tail call i32 @putchar(i32 %376)
%378 = getelementptr inbounds i8, i8* %221, i64 31
%379 = load i8, i8* %378
%380 = sext i8 %379 to i32
%381 = tail call i32 @putchar(i32 %380)
%382 = tail call i32 @putchar(i32 10)
%383 = load i8, i8* %223
%384 = sext i8 %383 to i32
%385 = tail call i32 @putchar(i32 %384)
%386 = getelementptr inbounds i8, i8* %223, i64 1
%387 = load i8, i8* %386
%388 = sext i8 %387 to i32
%389 = tail call i32 @putchar(i32 %388)
%390 = getelementptr inbounds i8, i8* %223, i64 2
%391 = load i8, i8* %390
%392 = sext i8 %391 to i32
%393 = tail call i32 @putchar(i32 %392)
%394 = getelementptr inbounds i8, i8* %223, i64 3
%395 = load i8, i8* %394
%396 = sext i8 %395 to i32
%397 = tail call i32 @putchar(i32 %396)
%398 = getelementptr inbounds i8, i8* %223, i64 4
%399 = load i8, i8* %398
%400 = sext i8 %399 to i32
%401 = tail call i32 @putchar(i32 %400)
%402 = getelementptr inbounds i8, i8* %223, i64 5
%403 = load i8, i8* %402
%404 = sext i8 %403 to i32
%405 = tail call i32 @putchar(i32 %404)
%406 = getelementptr inbounds i8, i8* %223, i64 6
%407 = load i8, i8* %406
%408 = sext i8 %407 to i32
%409 = tail call i32 @putchar(i32 %408)
%410 = getelementptr inbounds i8, i8* %223, i64 7
%411 = load i8, i8* %410
%412 = sext i8 %411 to i32
%413 = tail call i32 @putchar(i32 %412)
%414 = getelementptr inbounds i8, i8* %223, i64 8
%415 = load i8, i8* %414
%416 = sext i8 %415 to i32
%417 = tail call i32 @putchar(i32 %416)
%418 = getelementptr inbounds i8, i8* %223, i64 9
%419 = load i8, i8* %418
%420 = sext i8 %419 to i32
%421 = tail call i32 @putchar(i32 %420)
%422 = getelementptr inbounds i8, i8* %223, i64 10
%423 = load i8, i8* %422
%424 = sext i8 %423 to i32
%425 = tail call i32 @putchar(i32 %424)
%426 = getelementptr inbounds i8, i8* %223, i64 11
%427 = load i8, i8* %426
%428 = sext i8 %427 to i32
%429 = tail call i32 @putchar(i32 %428)
%430 = getelementptr inbounds i8, i8* %223, i64 12
%431 = load i8, i8* %430
%432 = sext i8 %431 to i32
%433 = tail call i32 @putchar(i32 %432)
%434 = getelementptr inbounds i8, i8* %223, i64 13
%435 = load i8, i8* %434
%436 = sext i8 %435 to i32
%437 = tail call i32 @putchar(i32 %436)
%438 = getelementptr inbounds i8, i8* %223, i64 14
%439 = load i8, i8* %438
%440 = sext i8 %439 to i32
%441 = tail call i32 @putchar(i32 %440)
%442 = getelementptr inbounds i8, i8* %223, i64 15
%443 = load i8, i8* %442
%444 = sext i8 %443 to i32
%445 = tail call i32 @putchar(i32 %444)
%446 = getelementptr inbounds i8, i8* %223, i64 16
%447 = load i8, i8* %446
%448 = sext i8 %447 to i32
%449 = tail call i32 @putchar(i32 %448)
%450 = getelementptr inbounds i8, i8* %223, i64 17
%451 = load i8, i8* %450
%452 = sext i8 %451 to i32
%453 = tail call i32 @putchar(i32 %452)
%454 = getelementptr inbounds i8, i8* %223, i64 18
%455 = load i8, i8* %454
%456 = sext i8 %455 to i32
%457 = tail call i32 @putchar(i32 %456)
%458 = getelementptr inbounds i8, i8* %223, i64 19
%459 = load i8, i8* %458
%460 = sext i8 %459 to i32
%461 = tail call i32 @putchar(i32 %460)
%462 = getelementptr inbounds i8, i8* %223, i64 20
%463 = load i8, i8* %462
%464 = sext i8 %463 to i32
%465 = tail call i32 @putchar(i32 %464)
%466 = getelementptr inbounds i8, i8* %223, i64 21
%467 = load i8, i8* %466
%468 = sext i8 %467 to i32
%469 = tail call i32 @putchar(i32 %468)
%470 = getelementptr inbounds i8, i8* %223, i64 22
%471 = load i8, i8* %470
%472 = sext i8 %471 to i32
%473 = tail call i32 @putchar(i32 %472)
%474 = getelementptr inbounds i8, i8* %223, i64 23
%475 = load i8, i8* %474
%476 = sext i8 %475 to i32
%477 = tail call i32 @putchar(i32 %476)
%478 = getelementptr inbounds i8, i8* %223, i64 24
%479 = load i8, i8* %478
%480 = sext i8 %479 to i32
%481 = tail call i32 @putchar(i32 %480)
%482 = getelementptr inbounds i8, i8* %223, i64 25
%483 = load i8, i8* %482
%484 = sext i8 %483 to i32
%485 = tail call i32 @putchar(i32 %484)
%486 = getelementptr inbounds i8, i8* %223, i64 26
%487 = load i8, i8* %486
%488 = sext i8 %487 to i32
%489 = tail call i32 @putchar(i32 %488)
%490 = getelementptr inbounds i8, i8* %223, i64 27
%491 = load i8, i8* %490
%492 = sext i8 %491 to i32
%493 = tail call i32 @putchar(i32 %492)
%494 = getelementptr inbounds i8, i8* %223, i64 28
%495 = load i8, i8* %494
%496 = sext i8 %495 to i32
%497 = tail call i32 @putchar(i32 %496)
%498 = getelementptr inbounds i8, i8* %223, i64 29
%499 = load i8, i8* %498
%500 = sext i8 %499 to i32
%501 = tail call i32 @putchar(i32 %500)
%502 = getelementptr inbounds i8, i8* %223, i64 30
%503 = load i8, i8* %502
%504 = sext i8 %503 to i32
%505 = tail call i32 @putchar(i32 %504)
%506 = getelementptr inbounds i8, i8* %223, i64 31
%507 = load i8, i8* %506
%508 = sext i8 %507 to i32
%509 = tail call i32 @putchar(i32 %508)
%510 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.18, i64 0, i64 0))
%511 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.19, i64 0, i64 0))
%512 = tail call i64 @malloc(i32 32)
%513 = inttoptr i64 %512 to i8*
%514 = tail call i64 @malloc(i32 32)
%515 = inttoptr i64 %514 to i8*
%516 = tail call i32 @pPermute(i8* %513, i8* %515)
%517 = load i8, i8* %513
%518 = sext i8 %517 to i32
%519 = tail call i32 @putchar(i32 %518)
%520 = getelementptr inbounds i8, i8* %513, i64 1
%521 = load i8, i8* %520
%522 = sext i8 %521 to i32
%523 = tail call i32 @putchar(i32 %522)
%524 = getelementptr inbounds i8, i8* %513, i64 2
%525 = load i8, i8* %524
%526 = sext i8 %525 to i32
%527 = tail call i32 @putchar(i32 %526)
%528 = getelementptr inbounds i8, i8* %513, i64 3
%529 = load i8, i8* %528
%530 = sext i8 %529 to i32
%531 = tail call i32 @putchar(i32 %530)
%532 = getelementptr inbounds i8, i8* %513, i64 4
%533 = load i8, i8* %532
%534 = sext i8 %533 to i32
%535 = tail call i32 @putchar(i32 %534)
%536 = getelementptr inbounds i8, i8* %513, i64 5
%537 = load i8, i8* %536
%538 = sext i8 %537 to i32
%539 = tail call i32 @putchar(i32 %538)
%540 = getelementptr inbounds i8, i8* %513, i64 6
%541 = load i8, i8* %540
%542 = sext i8 %541 to i32
%543 = tail call i32 @putchar(i32 %542)
%544 = getelementptr inbounds i8, i8* %513, i64 7
%545 = load i8, i8* %544
%546 = sext i8 %545 to i32
%547 = tail call i32 @putchar(i32 %546)
%548 = getelementptr inbounds i8, i8* %513, i64 8
%549 = load i8, i8* %548
%550 = sext i8 %549 to i32
%551 = tail call i32 @putchar(i32 %550)
%552 = getelementptr inbounds i8, i8* %513, i64 9
%553 = load i8, i8* %552
%554 = sext i8 %553 to i32
%555 = tail call i32 @putchar(i32 %554)
%556 = getelementptr inbounds i8, i8* %513, i64 10
%557 = load i8, i8* %556
%558 = sext i8 %557 to i32
%559 = tail call i32 @putchar(i32 %558)
%560 = getelementptr inbounds i8, i8* %513, i64 11
%561 = load i8, i8* %560
%562 = sext i8 %561 to i32
%563 = tail call i32 @putchar(i32 %562)
%564 = getelementptr inbounds i8, i8* %513, i64 12
%565 = load i8, i8* %564
%566 = sext i8 %565 to i32
%567 = tail call i32 @putchar(i32 %566)
%568 = getelementptr inbounds i8, i8* %513, i64 13
%569 = load i8, i8* %568
%570 = sext i8 %569 to i32
%571 = tail call i32 @putchar(i32 %570)
%572 = getelementptr inbounds i8, i8* %513, i64 14
%573 = load i8, i8* %572
%574 = sext i8 %573 to i32
%575 = tail call i32 @putchar(i32 %574)
%576 = getelementptr inbounds i8, i8* %513, i64 15
%577 = load i8, i8* %576
%578 = sext i8 %577 to i32
%579 = tail call i32 @putchar(i32 %578)
%580 = getelementptr inbounds i8, i8* %513, i64 16
%581 = load i8, i8* %580
%582 = sext i8 %581 to i32
%583 = tail call i32 @putchar(i32 %582)
%584 = getelementptr inbounds i8, i8* %513, i64 17
%585 = load i8, i8* %584
%586 = sext i8 %585 to i32
%587 = tail call i32 @putchar(i32 %586)
%588 = getelementptr inbounds i8, i8* %513, i64 18
%589 = load i8, i8* %588
%590 = sext i8 %589 to i32
%591 = tail call i32 @putchar(i32 %590)
%592 = getelementptr inbounds i8, i8* %513, i64 19
%593 = load i8, i8* %592
%594 = sext i8 %593 to i32
%595 = tail call i32 @putchar(i32 %594)
%596 = getelementptr inbounds i8, i8* %513, i64 20
%597 = load i8, i8* %596
%598 = sext i8 %597 to i32
%599 = tail call i32 @putchar(i32 %598)
%600 = getelementptr inbounds i8, i8* %513, i64 21
%601 = load i8, i8* %600
%602 = sext i8 %601 to i32
%603 = tail call i32 @putchar(i32 %602)
%604 = getelementptr inbounds i8, i8* %513, i64 22
%605 = load i8, i8* %604
%606 = sext i8 %605 to i32
%607 = tail call i32 @putchar(i32 %606)
%608 = getelementptr inbounds i8, i8* %513, i64 23
%609 = load i8, i8* %608
%610 = sext i8 %609 to i32
%611 = tail call i32 @putchar(i32 %610)
%612 = getelementptr inbounds i8, i8* %513, i64 24
%613 = load i8, i8* %612
%614 = sext i8 %613 to i32
%615 = tail call i32 @putchar(i32 %614)
%616 = getelementptr inbounds i8, i8* %513, i64 25
%617 = load i8, i8* %616
%618 = sext i8 %617 to i32
%619 = tail call i32 @putchar(i32 %618)
%620 = getelementptr inbounds i8, i8* %513, i64 26
%621 = load i8, i8* %620
%622 = sext i8 %621 to i32
%623 = tail call i32 @putchar(i32 %622)
%624 = getelementptr inbounds i8, i8* %513, i64 27
%625 = load i8, i8* %624
%626 = sext i8 %625 to i32
%627 = tail call i32 @putchar(i32 %626)
%628 = getelementptr inbounds i8, i8* %513, i64 28
%629 = load i8, i8* %628
%630 = sext i8 %629 to i32
%631 = tail call i32 @putchar(i32 %630)
%632 = getelementptr inbounds i8, i8* %513, i64 29
%633 = load i8, i8* %632
%634 = sext i8 %633 to i32
%635 = tail call i32 @putchar(i32 %634)
%636 = getelementptr inbounds i8, i8* %513, i64 30
%637 = load i8, i8* %636
%638 = sext i8 %637 to i32
%639 = tail call i32 @putchar(i32 %638)
%640 = getelementptr inbounds i8, i8* %513, i64 31
%641 = load i8, i8* %640
%642 = sext i8 %641 to i32
%643 = tail call i32 @putchar(i32 %642)
%644 = tail call i32 @putchar(i32 10)
%645 = load i8, i8* %515
%646 = sext i8 %645 to i32
%647 = tail call i32 @putchar(i32 %646)
%648 = getelementptr inbounds i8, i8* %515, i64 1
%649 = load i8, i8* %648
%650 = sext i8 %649 to i32
%651 = tail call i32 @putchar(i32 %650)
%652 = getelementptr inbounds i8, i8* %515, i64 2
%653 = load i8, i8* %652
%654 = sext i8 %653 to i32
%655 = tail call i32 @putchar(i32 %654)
%656 = getelementptr inbounds i8, i8* %515, i64 3
%657 = load i8, i8* %656
%658 = sext i8 %657 to i32
%659 = tail call i32 @putchar(i32 %658)
%660 = getelementptr inbounds i8, i8* %515, i64 4
%661 = load i8, i8* %660
%662 = sext i8 %661 to i32
%663 = tail call i32 @putchar(i32 %662)
%664 = getelementptr inbounds i8, i8* %515, i64 5
%665 = load i8, i8* %664
%666 = sext i8 %665 to i32
%667 = tail call i32 @putchar(i32 %666)
%668 = getelementptr inbounds i8, i8* %515, i64 6
%669 = load i8, i8* %668
%670 = sext i8 %669 to i32
%671 = tail call i32 @putchar(i32 %670)
%672 = getelementptr inbounds i8, i8* %515, i64 7
%673 = load i8, i8* %672
%674 = sext i8 %673 to i32
%675 = tail call i32 @putchar(i32 %674)
%676 = getelementptr inbounds i8, i8* %515, i64 8
%677 = load i8, i8* %676
%678 = sext i8 %677 to i32
%679 = tail call i32 @putchar(i32 %678)
%680 = getelementptr inbounds i8, i8* %515, i64 9
%681 = load i8, i8* %680
%682 = sext i8 %681 to i32
%683 = tail call i32 @putchar(i32 %682)
%684 = getelementptr inbounds i8, i8* %515, i64 10
%685 = load i8, i8* %684
%686 = sext i8 %685 to i32
%687 = tail call i32 @putchar(i32 %686)
%688 = getelementptr inbounds i8, i8* %515, i64 11
%689 = load i8, i8* %688
%690 = sext i8 %689 to i32
%691 = tail call i32 @putchar(i32 %690)
%692 = getelementptr inbounds i8, i8* %515, i64 12
%693 = load i8, i8* %692
%694 = sext i8 %693 to i32
%695 = tail call i32 @putchar(i32 %694)
%696 = getelementptr inbounds i8, i8* %515, i64 13
%697 = load i8, i8* %696
%698 = sext i8 %697 to i32
%699 = tail call i32 @putchar(i32 %698)
%700 = getelementptr inbounds i8, i8* %515, i64 14
%701 = load i8, i8* %700
%702 = sext i8 %701 to i32
%703 = tail call i32 @putchar(i32 %702)
%704 = getelementptr inbounds i8, i8* %515, i64 15
%705 = load i8, i8* %704
%706 = sext i8 %705 to i32
%707 = tail call i32 @putchar(i32 %706)
%708 = getelementptr inbounds i8, i8* %515, i64 16
%709 = load i8, i8* %708
%710 = sext i8 %709 to i32
%711 = tail call i32 @putchar(i32 %710)
%712 = getelementptr inbounds i8, i8* %515, i64 17
%713 = load i8, i8* %712
%714 = sext i8 %713 to i32
%715 = tail call i32 @putchar(i32 %714)
%716 = getelementptr inbounds i8, i8* %515, i64 18
%717 = load i8, i8* %716
%718 = sext i8 %717 to i32
%719 = tail call i32 @putchar(i32 %718)
%720 = getelementptr inbounds i8, i8* %515, i64 19
%721 = load i8, i8* %720
%722 = sext i8 %721 to i32
%723 = tail call i32 @putchar(i32 %722)
%724 = getelementptr inbounds i8, i8* %515, i64 20
%725 = load i8, i8* %724
%726 = sext i8 %725 to i32
%727 = tail call i32 @putchar(i32 %726)
%728 = getelementptr inbounds i8, i8* %515, i64 21
%729 = load i8, i8* %728
%730 = sext i8 %729 to i32
%731 = tail call i32 @putchar(i32 %730)
%732 = getelementptr inbounds i8, i8* %515, i64 22
%733 = load i8, i8* %732
%734 = sext i8 %733 to i32
%735 = tail call i32 @putchar(i32 %734)
%736 = getelementptr inbounds i8, i8* %515, i64 23
%737 = load i8, i8* %736
%738 = sext i8 %737 to i32
%739 = tail call i32 @putchar(i32 %738)
%740 = getelementptr inbounds i8, i8* %515, i64 24
%741 = load i8, i8* %740
%742 = sext i8 %741 to i32
%743 = tail call i32 @putchar(i32 %742)
%744 = getelementptr inbounds i8, i8* %515, i64 25
%745 = load i8, i8* %744
%746 = sext i8 %745 to i32
%747 = tail call i32 @putchar(i32 %746)
%748 = getelementptr inbounds i8, i8* %515, i64 26
%749 = load i8, i8* %748
%750 = sext i8 %749 to i32
%751 = tail call i32 @putchar(i32 %750)
%752 = getelementptr inbounds i8, i8* %515, i64 27
%753 = load i8, i8* %752
%754 = sext i8 %753 to i32
%755 = tail call i32 @putchar(i32 %754)
%756 = getelementptr inbounds i8, i8* %515, i64 28
%757 = load i8, i8* %756
%758 = sext i8 %757 to i32
%759 = tail call i32 @putchar(i32 %758)
%760 = getelementptr inbounds i8, i8* %515, i64 29
%761 = load i8, i8* %760
%762 = sext i8 %761 to i32
%763 = tail call i32 @putchar(i32 %762)
%764 = getelementptr inbounds i8, i8* %515, i64 30
%765 = load i8, i8* %764
%766 = sext i8 %765 to i32
%767 = tail call i32 @putchar(i32 %766)
%768 = getelementptr inbounds i8, i8* %515, i64 31
%769 = load i8, i8* %768
%770 = sext i8 %769 to i32
%771 = tail call i32 @putchar(i32 %770)
%772 = tail call i32 @putchar(i32 10)
ret void
}