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

/* Forward declarations */

/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;
typedef int /*<<< orphan*/ rsp;
typedef scalar_t__ int8_t;

/* Variables and functions */
scalar_t__ memcmp(int *, char *, int);
int /*<<< orphan*/ memcpy(int *, char *, int);
scalar_t__ pCT_data(int, int *, int *, int, int *, int *, int *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sleep(int);
int test_geldkarte(uint16_t ctn) {
  uint8_t cmd[5 + 255 + 1], rsp[256 + 2];
  uint8_t sad, dad;
  uint16_t lenc, lenr = 256 + 2;
  int8_t ret;
  memcpy(cmd, "\x20\x11\x01\x01\x00", 5);
  lenc = 5;
  lenr = sizeof(rsp);
  sad = 2;
  dad = 1;
  ret = pCT_data(ctn, &dad, &sad, lenc, cmd, &lenr, rsp);
  if (ret != 0)
    goto err_return;
  ;
  if ((ret != 0) || (sad != 1)) {
    printf("  Error sending command to reader. (Return code:%d)\n", ret);
    memcpy(cmd, "\x20\x15\x01\x00", 5);
    lenc = 5;
    lenr = sizeof(rsp);
    sad = 2;
    dad = 1;
    ret = pCT_data(ctn, &dad, &sad, lenc, cmd, &lenr, rsp);
    if (ret != 0)
      goto err_return;
    ;
    sleep(2);
    return 3;
  }
  if (lenr == 24 + 2) {
    if (memcmp(rsp + 7, "\x45\x65\x63", 3)) {
      printf("  Unknown card.\n");
      goto err_icccmd;
    }
    memcpy(cmd, "\x00\xA4\x04\x0C\x09\xD2\x76\x00\x00\x25\x45\x50\x01\x00", 14);
    lenc = 14;
    lenr = sizeof(rsp);
    sad = 2;
    dad = 0;
    ret = pCT_data(ctn, &dad, &sad, lenc, cmd, &lenr, rsp);
    if (ret != 0)
      goto err_return;
    ;
    if (sad != 0)
      goto err_sad;
    if ((lenr != 2) || (rsp[0] != 0x90) || (rsp[1] != 0x00)) {
      printf("  Error selecting GeldKarte application.\n");
      goto err_icccmd;
    }
    memcpy(cmd, "\x00\xB2\x01\xC4\x09", 5);
    lenc = 5;
    lenr = sizeof(rsp);
    sad = 2;
    dad = 0;
    ret = pCT_data(ctn, &dad, &sad, lenc, cmd, &lenr, rsp);
    if (ret != 0)
      goto err_return;
    ;
    if (sad != 0)
      goto err_sad;
    if ((lenr < 5) || (rsp[lenr - 2] != 0x90) || (rsp[lenr - 1] != 0x00)) {
      printf("  Error reading account balance.\n");
      goto err_icccmd;
    }
  } else if (lenr == 25 + 2) {
    if (memcmp(rsp + 8, "\x45\x65\x63", 3)) {
      printf("  Unknown card.\n");
      goto err_icccmd;
    }
    memcpy(cmd, "\x00\xA4\x04\x0C\x09\xD2\x76\x00\x00\x25\x45\x50\x02\x00", 14);
    lenc = 14;
    lenr = sizeof(rsp);
    sad = 2;
    dad = 0;
    ret = pCT_data(ctn, &dad, &sad, lenc, cmd, &lenr, rsp);
    if (ret != 0)
      goto err_return;
    ;
    if (sad != 0)
      goto err_sad;
    if ((lenr != 2) || (rsp[0] != 0x90) || (rsp[1] != 0x00)) {
      printf("  Error selecting GeldKarte application.\n");
      goto err_icccmd;
    }
    memcpy(cmd, "\x00\xB2\x01\xC4\x00", 5);
    lenc = 5;
    lenr = sizeof(rsp);
    sad = 2;
    dad = 0;
    ret = pCT_data(ctn, &dad, &sad, lenc, cmd, &lenr, rsp);
    if (ret != 0)
      goto err_return;
    ;
    if (sad != 0)
      goto err_sad;
    if ((lenr < 5) || (rsp[lenr - 2] != 0x90) || (rsp[lenr - 1] != 0x00)) {
      printf("  Error reading account balance.\n");
      goto err_icccmd;
    }
  } else if ((lenr > 2) && (rsp[lenr - 2] == 0x90)) {
    printf("  Unknown card.\n");
    goto err_icccmd;
  } else {
    printf("  No card.\n");
    sleep(2);
    return 0;
  }
err_icccmd:
  memcpy(cmd, "\x20\x15\x01\x00", 5);
  lenc = 5;
  lenr = sizeof(rsp);
  sad = 2;
  dad = 1;
  ret = pCT_data(ctn, &dad, &sad, lenc, cmd, &lenr, rsp);
  if (ret != 0)
    goto err_return;
  ;
  sleep(2);
  return 0;
err_return:
  printf("Error sending command to card. (Return code:%d)\n", ret);
  sleep(2);
  return 3;
err_sad:
  printf("Error sending command to card. (sad:%d)\n", sad);
  sleep(2);
  return 3;
}


x86 assembly (clang, -O0):
<test_geldkarte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x850,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x102,-0x840(%rbp)
lea    -0x420(%rbp),%rdi
lea    0xe8a(%rip),%rsi
mov    $0x5,%edx
call   1060 <memcpy@plt>
movl   $0x5,-0x83c(%rbp)
movl   $0x408,-0x840(%rbp)
movl   $0x2,-0x834(%rbp)
movl   $0x1,-0x838(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x83c(%rbp),%ecx
lea    -0x420(%rbp),%r8
lea    -0x830(%rbp),%rax
lea    -0x838(%rbp),%rsi
lea    -0x834(%rbp),%rdx
lea    -0x840(%rbp),%r9
mov    %rax,(%rsp)
call   1030 <pCT_data@plt>
mov    %rax,-0x848(%rbp)
cmpq   $0x0,-0x848(%rbp)
je     11f7 <test_geldkarte+0xa7>
jmp    1819 <test_geldkarte+0x6c9>
cmpq   $0x0,-0x848(%rbp)
jne    1212 <test_geldkarte+0xc2>
cmpl   $0x1,-0x834(%rbp)
je     12cc <test_geldkarte+0x17c>
mov    -0x848(%rbp),%rsi
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x420(%rbp),%rdi
lea    0xdd1(%rip),%rsi
mov    $0x5,%edx
call   1060 <memcpy@plt>
movl   $0x5,-0x83c(%rbp)
movl   $0x408,-0x840(%rbp)
movl   $0x2,-0x834(%rbp)
movl   $0x1,-0x838(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x83c(%rbp),%ecx
lea    -0x420(%rbp),%r8
lea    -0x830(%rbp),%rax
lea    -0x838(%rbp),%rsi
lea    -0x834(%rbp),%rdx
lea    -0x840(%rbp),%r9
mov    %rax,(%rsp)
call   1030 <pCT_data@plt>
mov    %rax,-0x848(%rbp)
cmpq   $0x0,-0x848(%rbp)
je     12b6 <test_geldkarte+0x166>
jmp    1819 <test_geldkarte+0x6c9>
mov    $0x2,%edi
call   1070 <sleep@plt>
movl   $0x3,-0x4(%rbp)
jmp    1869 <test_geldkarte+0x719>
cmpl   $0x1a,-0x840(%rbp)
jne    14eb <test_geldkarte+0x39b>
lea    -0x830(%rbp),%rdi
add    $0x1c,%rdi
lea    0xd7f(%rip),%rsi
mov    $0x3,%edx
call   1050 <memcmp@plt>
cmp    $0x0,%rax
je     1312 <test_geldkarte+0x1c2>
lea    0xd68(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1774 <test_geldkarte+0x624>
lea    -0x420(%rbp),%rdi
lea    0xceb(%rip),%rsi
mov    $0xe,%edx
call   1060 <memcpy@plt>
movl   $0xe,-0x83c(%rbp)
movl   $0x408,-0x840(%rbp)
movl   $0x2,-0x834(%rbp)
movl   $0x0,-0x838(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x83c(%rbp),%ecx
lea    -0x420(%rbp),%r8
lea    -0x830(%rbp),%rax
lea    -0x838(%rbp),%rsi
lea    -0x834(%rbp),%rdx
lea    -0x840(%rbp),%r9
mov    %rax,(%rsp)
call   1030 <pCT_data@plt>
mov    %rax,-0x848(%rbp)
cmpq   $0x0,-0x848(%rbp)
je     13a1 <test_geldkarte+0x251>
jmp    1819 <test_geldkarte+0x6c9>
cmpl   $0x0,-0x834(%rbp)
je     13b3 <test_geldkarte+0x263>
jmp    1844 <test_geldkarte+0x6f4>
cmpl   $0x2,-0x840(%rbp)
jne    13dd <test_geldkarte+0x28d>
cmpl   $0x90,-0x830(%rbp)
jne    13dd <test_geldkarte+0x28d>
cmpl   $0x0,-0x82c(%rbp)
je     13f0 <test_geldkarte+0x2a0>
lea    0xc9b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1774 <test_geldkarte+0x624>
lea    -0x420(%rbp),%rdi
lea    0xc1c(%rip),%rsi
mov    $0x5,%edx
call   1060 <memcpy@plt>
movl   $0x5,-0x83c(%rbp)
movl   $0x408,-0x840(%rbp)
movl   $0x2,-0x834(%rbp)
movl   $0x0,-0x838(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x83c(%rbp),%ecx
lea    -0x420(%rbp),%r8
lea    -0x830(%rbp),%rax
lea    -0x838(%rbp),%rsi
lea    -0x834(%rbp),%rdx
lea    -0x840(%rbp),%r9
mov    %rax,(%rsp)
call   1030 <pCT_data@plt>
mov    %rax,-0x848(%rbp)
cmpq   $0x0,-0x848(%rbp)
je     147f <test_geldkarte+0x32f>
jmp    1819 <test_geldkarte+0x6c9>
cmpl   $0x0,-0x834(%rbp)
je     1491 <test_geldkarte+0x341>
jmp    1844 <test_geldkarte+0x6f4>
cmpl   $0x5,-0x840(%rbp)
jl     14d3 <test_geldkarte+0x383>
mov    -0x840(%rbp),%eax
sub    $0x2,%eax
cltq
cmpl   $0x90,-0x830(%rbp,%rax,4)
jne    14d3 <test_geldkarte+0x383>
mov    -0x840(%rbp),%eax
sub    $0x1,%eax
cltq
cmpl   $0x0,-0x830(%rbp,%rax,4)
je     14e6 <test_geldkarte+0x396>
lea    0xbcf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1774 <test_geldkarte+0x624>
jmp    176f <test_geldkarte+0x61f>
cmpl   $0x1b,-0x840(%rbp)
jne    170a <test_geldkarte+0x5ba>
lea    -0x830(%rbp),%rdi
add    $0x20,%rdi
lea    0xb60(%rip),%rsi
mov    $0x3,%edx
call   1050 <memcmp@plt>
cmp    $0x0,%rax
je     1531 <test_geldkarte+0x3e1>
lea    0xb49(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1774 <test_geldkarte+0x624>
lea    -0x420(%rbp),%rdi
lea    0xae1(%rip),%rsi
mov    $0xe,%edx
call   1060 <memcpy@plt>
movl   $0xe,-0x83c(%rbp)
movl   $0x408,-0x840(%rbp)
movl   $0x2,-0x834(%rbp)
movl   $0x0,-0x838(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x83c(%rbp),%ecx
lea    -0x420(%rbp),%r8
lea    -0x830(%rbp),%rax
lea    -0x838(%rbp),%rsi
lea    -0x834(%rbp),%rdx
lea    -0x840(%rbp),%r9
mov    %rax,(%rsp)
call   1030 <pCT_data@plt>
mov    %rax,-0x848(%rbp)
cmpq   $0x0,-0x848(%rbp)
je     15c0 <test_geldkarte+0x470>
jmp    1819 <test_geldkarte+0x6c9>
cmpl   $0x0,-0x834(%rbp)
je     15d2 <test_geldkarte+0x482>
jmp    1844 <test_geldkarte+0x6f4>
cmpl   $0x2,-0x840(%rbp)
jne    15fc <test_geldkarte+0x4ac>
cmpl   $0x90,-0x830(%rbp)
jne    15fc <test_geldkarte+0x4ac>
cmpl   $0x0,-0x82c(%rbp)
je     160f <test_geldkarte+0x4bf>
lea    0xa7c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1774 <test_geldkarte+0x624>
lea    -0x420(%rbp),%rdi
lea    0xa12(%rip),%rsi
mov    $0x5,%edx
call   1060 <memcpy@plt>
movl   $0x5,-0x83c(%rbp)
movl   $0x408,-0x840(%rbp)
movl   $0x2,-0x834(%rbp)
movl   $0x0,-0x838(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x83c(%rbp),%ecx
lea    -0x420(%rbp),%r8
lea    -0x830(%rbp),%rax
lea    -0x838(%rbp),%rsi
lea    -0x834(%rbp),%rdx
lea    -0x840(%rbp),%r9
mov    %rax,(%rsp)
call   1030 <pCT_data@plt>
mov    %rax,-0x848(%rbp)
cmpq   $0x0,-0x848(%rbp)
je     169e <test_geldkarte+0x54e>
jmp    1819 <test_geldkarte+0x6c9>
cmpl   $0x0,-0x834(%rbp)
je     16b0 <test_geldkarte+0x560>
jmp    1844 <test_geldkarte+0x6f4>
cmpl   $0x5,-0x840(%rbp)
jl     16f2 <test_geldkarte+0x5a2>
mov    -0x840(%rbp),%eax
sub    $0x2,%eax
cltq
cmpl   $0x90,-0x830(%rbp,%rax,4)
jne    16f2 <test_geldkarte+0x5a2>
mov    -0x840(%rbp),%eax
sub    $0x1,%eax
cltq
cmpl   $0x0,-0x830(%rbp,%rax,4)
je     1705 <test_geldkarte+0x5b5>
lea    0x9b0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1774 <test_geldkarte+0x624>
jmp    176a <test_geldkarte+0x61a>
cmpl   $0x2,-0x840(%rbp)
jle    1746 <test_geldkarte+0x5f6>
mov    -0x840(%rbp),%eax
sub    $0x2,%eax
cltq
cmpl   $0x90,-0x830(%rbp,%rax,4)
jne    1746 <test_geldkarte+0x5f6>
lea    0x934(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1774 <test_geldkarte+0x624>
lea    0x97e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x2,%edi
call   1070 <sleep@plt>
movl   $0x0,-0x4(%rbp)
jmp    1869 <test_geldkarte+0x719>
jmp    176f <test_geldkarte+0x61f>
jmp    1774 <test_geldkarte+0x624>
lea    -0x420(%rbp),%rdi
lea    0x884(%rip),%rsi
mov    $0x5,%edx
call   1060 <memcpy@plt>
movl   $0x5,-0x83c(%rbp)
movl   $0x408,-0x840(%rbp)
movl   $0x2,-0x834(%rbp)
movl   $0x1,-0x838(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x83c(%rbp),%ecx
lea    -0x420(%rbp),%r8
lea    -0x830(%rbp),%rax
lea    -0x838(%rbp),%rsi
lea    -0x834(%rbp),%rdx
lea    -0x840(%rbp),%r9
mov    %rax,(%rsp)
call   1030 <pCT_data@plt>
mov    %rax,-0x848(%rbp)
cmpq   $0x0,-0x848(%rbp)
je     1803 <test_geldkarte+0x6b3>
jmp    1819 <test_geldkarte+0x6c9>
mov    $0x2,%edi
call   1070 <sleep@plt>
movl   $0x0,-0x4(%rbp)
jmp    1869 <test_geldkarte+0x719>
mov    -0x848(%rbp),%rsi
lea    0x8b0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x2,%edi
call   1070 <sleep@plt>
movl   $0x3,-0x4(%rbp)
jmp    1869 <test_geldkarte+0x719>
mov    -0x834(%rbp),%esi
lea    0x8b7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x2,%edi
call   1070 <sleep@plt>
movl   $0x3,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x850,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_geldkarte>:
push   %rbp
push   %r14
push   %rbx
sub    $0x850,%rsp
mov    %edi,%ebp
movl   $0x102,0x14(%rsp)
lea    0xe84(%rip),%rsi
lea    0x430(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x5,%edx
call   1070 <memcpy@plt>
movl   $0x408,0x14(%rsp)
movl   $0x2,0x18(%rsp)
movl   $0x1,0x1c(%rsp)
lea    0x20(%rsp),%r14
mov    %r14,(%rsp)
lea    0x1c(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%r9
mov    %ebp,%edi
mov    $0x5,%ecx
mov    %rbx,%r8
call   1030 <pCT_data@plt>
test   %rax,%rax
je     1203 <test_geldkarte+0xa3>
lea    0xe92(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x3,%ebx
mov    $0x2,%edi
call   1080 <sleep@plt>
mov    %ebx,%eax
add    $0x850,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
cmpl   $0x1,0x18(%rsp)
jne    12e5 <test_geldkarte+0x185>
mov    0x14(%rsp),%eax
cmp    $0x1b,%eax
je     1359 <test_geldkarte+0x1f9>
cmp    $0x1a,%eax
jne    13f6 <test_geldkarte+0x296>
lea    0x3c(%rsp),%rdi
lea    0xe3a(%rip),%rsi
mov    $0x3,%edx
call   1060 <memcmp@plt>
test   %rax,%rax
jne    1408 <test_geldkarte+0x2a8>
lea    0xdc1(%rip),%rsi
lea    0x430(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xe,%edx
call   1070 <memcpy@plt>
movl   $0x408,0x14(%rsp)
movl   $0x2,0x18(%rsp)
movl   $0x0,0x1c(%rsp)
mov    %r14,(%rsp)
lea    0x1c(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%r9
mov    %ebp,%edi
mov    $0xe,%ecx
mov    %rbx,%r8
call   1030 <pCT_data@plt>
test   %rax,%rax
jne    11d5 <test_geldkarte+0x75>
mov    0x18(%rsp),%esi
test   %esi,%esi
jne    13e3 <test_geldkarte+0x283>
cmpl   $0x2,0x14(%rsp)
lea    0xe3a(%rip),%rdi
jne    140f <test_geldkarte+0x2af>
cmpl   $0x90,0x20(%rsp)
jne    140f <test_geldkarte+0x2af>
cmpl   $0x0,0x24(%rsp)
jne    140f <test_geldkarte+0x2af>
lea    0xd3a(%rip),%rsi
jmp    14ba <test_geldkarte+0x35a>
lea    0xd49(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd0a(%rip),%rsi
lea    0x430(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x5,%edx
call   1070 <memcpy@plt>
movl   $0x408,0x14(%rsp)
movl   $0x2,0x18(%rsp)
movl   $0x1,0x1c(%rsp)
mov    %r14,(%rsp)
lea    0x1c(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%r9
mov    %ebp,%edi
mov    $0x5,%ecx
mov    %rbx,%r8
call   1030 <pCT_data@plt>
test   %rax,%rax
jne    11d5 <test_geldkarte+0x75>
jmp    11e6 <test_geldkarte+0x86>
lea    0x40(%rsp),%rdi
lea    0xd05(%rip),%rsi
mov    $0x3,%edx
call   1060 <memcmp@plt>
test   %rax,%rax
jne    1408 <test_geldkarte+0x2a8>
lea    0xca1(%rip),%rsi
lea    0x430(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xe,%edx
call   1070 <memcpy@plt>
movl   $0x408,0x14(%rsp)
movl   $0x2,0x18(%rsp)
movl   $0x0,0x1c(%rsp)
mov    %r14,(%rsp)
lea    0x1c(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%r9
mov    %ebp,%edi
mov    $0xe,%ecx
mov    %rbx,%r8
call   1030 <pCT_data@plt>
test   %rax,%rax
jne    11d5 <test_geldkarte+0x75>
mov    0x18(%rsp),%esi
test   %esi,%esi
je     1488 <test_geldkarte+0x328>
lea    0xcb5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    11e6 <test_geldkarte+0x86>
cmp    $0x3,%eax
jl     1475 <test_geldkarte+0x315>
add    $0xfffffffe,%eax
cmpl   $0x90,0x20(%rsp,%rax,4)
jne    1475 <test_geldkarte+0x315>
lea    0xd0e(%rip),%rdi
call   1040 <puts@plt>
lea    0xbeb(%rip),%rsi
lea    0x430(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x5,%edx
call   1070 <memcpy@plt>
movl   $0x408,0x14(%rsp)
movl   $0x2,0x18(%rsp)
movl   $0x1,0x1c(%rsp)
mov    %r14,(%rsp)
lea    0x1c(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%r9
mov    %ebp,%edi
mov    $0x5,%ecx
mov    %rbx,%r8
call   1030 <pCT_data@plt>
test   %rax,%rax
jne    11d5 <test_geldkarte+0x75>
jmp    1481 <test_geldkarte+0x321>
lea    0xc4c(%rip),%rdi
call   1040 <puts@plt>
xor    %ebx,%ebx
jmp    11eb <test_geldkarte+0x8b>
cmpl   $0x2,0x14(%rsp)
lea    0xc60(%rip),%rdi
jne    140f <test_geldkarte+0x2af>
cmpl   $0x90,0x20(%rsp)
jne    140f <test_geldkarte+0x2af>
cmpl   $0x0,0x24(%rsp)
jne    140f <test_geldkarte+0x2af>
lea    0xb75(%rip),%rsi
lea    0x430(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x5,%edx
call   1070 <memcpy@plt>
movl   $0x408,0x14(%rsp)
movl   $0x2,0x18(%rsp)
movl   $0x0,0x1c(%rsp)
mov    %r14,(%rsp)
lea    0x1c(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x14(%rsp),%r9
mov    %ebp,%edi
mov    $0x5,%ecx
mov    %rbx,%r8
call   1030 <pCT_data@plt>
test   %rax,%rax
jne    11d5 <test_geldkarte+0x75>
mov    0x18(%rsp),%esi
test   %esi,%esi
jne    13e3 <test_geldkarte+0x283>
mov    0x14(%rsp),%eax
lea    0xbaa(%rip),%rdi
cmp    $0x5,%eax
jl     140f <test_geldkarte+0x2af>
lea    -0x2(%rax),%ecx
cmpl   $0x90,0x20(%rsp,%rcx,4)
jne    140f <test_geldkarte+0x2af>
add    $0xffffffff,%eax
cmpl   $0x0,0x20(%rsp,%rax,4)
jne    140f <test_geldkarte+0x2af>
jmp    1414 <test_geldkarte+0x2b4>

LLVM IR (-O0):
@.str = [6 x i8] c" \11\01\01\00\00"
@.str.1 = [53 x i8] c" Error sending command to reader. (Return code:%d)\0A\00"
@.str.2 = [5 x i8] c" \15\01\00\00"
@.str.3 = [4 x i8] c"Eec\00"
@.str.4 = [17 x i8] c" Unknown card.\0A\00"
@.str.5 = [15 x i8] c"\00\A4\04\0C\09\D2v\00\00%EP\01\00\00"
@.str.6 = [42 x i8] c" Error selecting GeldKarte application.\0A\00"
@.str.7 = [6 x i8] c"\00\B2\01\C4\09\00"
@.str.8 = [34 x i8] c" Error reading account balance.\0A\00"
@.str.9 = [15 x i8] c"\00\A4\04\0C\09\D2v\00\00%EP\02\00\00"
@.str.10 = [6 x i8] c"\00\B2\01\C4\00\00"
@.str.11 = [12 x i8] c" No card.\0A\00"
@.str.12 = [49 x i8] c"Error sending command to card. (Return code:%d)\0A\00"
@.str.13 = [41 x i8] c"Error sending command to card. (sad:%d)\0A\00"
define i32 @test_geldkarte(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [261 x i32]
%5 = alloca [258 x i32]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i64
store i32 %0, i32* %3
store i32 258, i32* %9
%11 = getelementptr inbounds [261 x i32], [261 x i32]* %4, i64 0, i64 0
%12 = call i32 @memcpy(i32* %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
store i32 5, i32* %8
store i32 1032, i32* %9
store i32 2, i32* %6
store i32 1, i32* %7
%13 = load i32, i32* %3
%14 = load i32, i32* %8
%15 = getelementptr inbounds [261 x i32], [261 x i32]* %4, i64 0, i64 0
%16 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 0
%17 = call i64 @pCT_data(i32 %13, i32* %7, i32* %6, i32 %14, i32* %15, i32* %9, i32* %16)
store i64 %17, i64* %10
%18 = load i64, i64* %10
%19 = icmp ne i64 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %1
br label %218
21: ; preds = %1
%22 = load i64, i64* %10
%23 = icmp ne i64 %22, 0
br i1 %23, label %27, label %24
24: ; preds = %21
%25 = load i32, i32* %6
%26 = icmp ne i32 %25, 1
br i1 %26, label %27, label %42
27: ; preds = %24, %21
%28 = load i64, i64* %10
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0), i64 %28)
%30 = getelementptr inbounds [261 x i32], [261 x i32]* %4, i64 0, i64 0
%31 = call i32 @memcpy(i32* %30, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 5)
store i32 5, i32* %8
store i32 1032, i32* %9
store i32 2, i32* %6
store i32 1, i32* %7
%32 = load i32, i32* %3
%33 = load i32, i32* %8
%34 = getelementptr inbounds [261 x i32], [261 x i32]* %4, i64 0, i64 0
%35 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 0
%36 = call i64 @pCT_data(i32 %32, i32* %7, i32* %6, i32 %33, i32* %34, i32* %9, i32* %35)
store i64 %36, i64* %10
%37 = load i64, i64* %10
%38 = icmp ne i64 %37, 0
br i1 %38, label %39, label %40
39: ; preds = %27
br label %218
40: ; preds = %27
%41 = call i32 @sleep(i32 2)
store i32 3, i32* %2
br label %226
42: ; preds = %24
%43 = load i32, i32* %9
%44 = icmp eq i32 %43, 26
br i1 %44, label %45, label %115
45: ; preds = %42
%46 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 0
%47 = getelementptr inbounds i32, i32* %46, i64 7
%48 = call i64 @memcmp(i32* %47, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%49 = icmp ne i64 %48, 0
br i1 %49, label %50, label %52
50: ; preds = %45
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
br label %205
52: ; preds = %45
%53 = getelementptr inbounds [261 x i32], [261 x i32]* %4, i64 0, i64 0
%54 = call i32 @memcpy(i32* %53, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 14)
store i32 14, i32* %8
store i32 1032, i32* %9
store i32 2, i32* %6
store i32 0, i32* %7
%55 = load i32, i32* %3
%56 = load i32, i32* %8
%57 = getelementptr inbounds [261 x i32], [261 x i32]* %4, i64 0, i64 0
%58 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 0
%59 = call i64 @pCT_data(i32 %55, i32* %7, i32* %6, i32 %56, i32* %57, i32* %9, i32* %58)
store i64 %59, i64* %10
%60 = load i64, i64* %10
%61 = icmp ne i64 %60, 0
br i1 %61, label %62, label %63
62: ; preds = %52
br label %218
63: ; preds = %52
%64 = load i32, i32* %6
%65 = icmp ne i32 %64, 0
br i1 %65, label %66, label %67
66: ; preds = %63
br label %222
67: ; preds = %63
%68 = load i32, i32* %9
%69 = icmp ne i32 %68, 2
br i1 %69, label %78, label %70
70: ; preds = %67
%71 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 0
%72 = load i32, i32* %71
%73 = icmp ne i32 %72, 144
br i1 %73, label %78, label %74
74: ; preds = %70
%75 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 1
%76 = load i32, i32* %75
%77 = icmp ne i32 %76, 0
br i1 %77, label %78, label %80
78: ; preds = %74, %70, %67
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0))
br label %205
80: ; preds = %74
%81 = getelementptr inbounds [261 x i32], [261 x i32]* %4, i64 0, i64 0
%82 = call i32 @memcpy(i32* %81, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 5)
store i32 5, i32* %8
store i32 1032, i32* %9
store i32 2, i32* %6
store i32 0, i32* %7
%83 = load i32, i32* %3
%84 = load i32, i32* %8
%85 = getelementptr inbounds [261 x i32], [261 x i32]* %4, i64 0, i64 0
%86 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 0
%87 = call i64 @pCT_data(i32 %83, i32* %7, i32* %6, i32 %84, i32* %85, i32* %9, i32* %86)
store i64 %87, i64* %10
%88 = load i64, i64* %10
%89 = icmp ne i64 %88, 0
br i1 %89, label %90, label %91
90: ; preds = %80
br label %218
91: ; preds = %80
%92 = load i32, i32* %6
%93 = icmp ne i32 %92, 0
br i1 %93, label %94, label %95
94: ; preds = %91
br label %222
95: ; preds = %91
%96 = load i32, i32* %9
%97 = icmp slt i32 %96, 5
br i1 %97, label %112, label %98
98: ; preds = %95
%99 = load i32, i32* %9
%100 = sub nsw i32 %99, 2
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 %101
%103 = load i32, i32* %102
%104 = icmp ne i32 %103, 144
br i1 %104, label %112, label %105
105: ; preds = %98
%106 = load i32, i32* %9
%107 = sub nsw i32 %106, 1
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 %108
%110 = load i32, i32* %109
%111 = icmp ne i32 %110, 0
br i1 %111, label %112, label %114
112: ; preds = %105, %98, %95
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0))
br label %205
114: ; preds = %105
br label %204
115: ; preds = %42
%116 = load i32, i32* %9
%117 = icmp eq i32 %116, 27
br i1 %117, label %118, label %188
118: ; preds = %115
%119 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 0
%120 = getelementptr inbounds i32, i32* %119, i64 8
%121 = call i64 @memcmp(i32* %120, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%122 = icmp ne i64 %121, 0
br i1 %122, label %123, label %125
123: ; preds = %118
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
br label %205
125: ; preds = %118
%126 = getelementptr inbounds [261 x i32], [261 x i32]* %4, i64 0, i64 0
%127 = call i32 @memcpy(i32* %126, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i32 14)
store i32 14, i32* %8
store i32 1032, i32* %9
store i32 2, i32* %6
store i32 0, i32* %7
%128 = load i32, i32* %3
%129 = load i32, i32* %8
%130 = getelementptr inbounds [261 x i32], [261 x i32]* %4, i64 0, i64 0
%131 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 0
%132 = call i64 @pCT_data(i32 %128, i32* %7, i32* %6, i32 %129, i32* %130, i32* %9, i32* %131)
store i64 %132, i64* %10
%133 = load i64, i64* %10
%134 = icmp ne i64 %133, 0
br i1 %134, label %135, label %136
135: ; preds = %125
br label %218
136: ; preds = %125
%137 = load i32, i32* %6
%138 = icmp ne i32 %137, 0
br i1 %138, label %139, label %140
139: ; preds = %136
br label %222
140: ; preds = %136
%141 = load i32, i32* %9
%142 = icmp ne i32 %141, 2
br i1 %142, label %151, label %143
143: ; preds = %140
%144 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 0
%145 = load i32, i32* %144
%146 = icmp ne i32 %145, 144
br i1 %146, label %151, label %147
147: ; preds = %143
%148 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 1
%149 = load i32, i32* %148
%150 = icmp ne i32 %149, 0
br i1 %150, label %151, label %153
151: ; preds = %147, %143, %140
%152 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0))
br label %205
153: ; preds = %147
%154 = getelementptr inbounds [261 x i32], [261 x i32]* %4, i64 0, i64 0
%155 = call i32 @memcpy(i32* %154, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i32 5)
store i32 5, i32* %8
store i32 1032, i32* %9
store i32 2, i32* %6
store i32 0, i32* %7
%156 = load i32, i32* %3
%157 = load i32, i32* %8
%158 = getelementptr inbounds [261 x i32], [261 x i32]* %4, i64 0, i64 0
%159 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 0
%160 = call i64 @pCT_data(i32 %156, i32* %7, i32* %6, i32 %157, i32* %158, i32* %9, i32* %159)
store i64 %160, i64* %10
%161 = load i64, i64* %10
%162 = icmp ne i64 %161, 0
br i1 %162, label %163, label %164
163: ; preds = %153
br label %218
164: ; preds = %153
%165 = load i32, i32* %6
%166 = icmp ne i32 %165, 0
br i1 %166, label %167, label %168
167: ; preds = %164
br label %222
168: ; preds = %164
%169 = load i32, i32* %9
%170 = icmp slt i32 %169, 5
br i1 %170, label %185, label %171
171: ; preds = %168
%172 = load i32, i32* %9
%173 = sub nsw i32 %172, 2
%174 = sext i32 %173 to i64
%175 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 %174
%176 = load i32, i32* %175
%177 = icmp ne i32 %176, 144
br i1 %177, label %185, label %178
178: ; preds = %171
%179 = load i32, i32* %9
%180 = sub nsw i32 %179, 1
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 %181
%183 = load i32, i32* %182
%184 = icmp ne i32 %183, 0
br i1 %184, label %185, label %187
185: ; preds = %178, %171, %168
%186 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.8, i64 0, i64 0))
br label %205
187: ; preds = %178
br label %203
188: ; preds = %115
%189 = load i32, i32* %9
%190 = icmp sgt i32 %189, 2
br i1 %190, label %191, label %200
191: ; preds = %188
%192 = load i32, i32* %9
%193 = sub nsw i32 %192, 2
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 %194
%196 = load i32, i32* %195
%197 = icmp eq i32 %196, 144
br i1 %197, label %198, label %200
198: ; preds = %191
%199 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
br label %205
200: ; preds = %191, %188
%201 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
%202 = call i32 @sleep(i32 2)
store i32 0, i32* %2
br label %226
203: ; preds = %187
br label %204
204: ; preds = %203, %114
br label %205
205: ; preds = %204, %198, %185, %151, %123, %112, %78, %50
%206 = getelementptr inbounds [261 x i32], [261 x i32]* %4, i64 0, i64 0
%207 = call i32 @memcpy(i32* %206, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 5)
store i32 5, i32* %8
store i32 1032, i32* %9
store i32 2, i32* %6
store i32 1, i32* %7
%208 = load i32, i32* %3
%209 = load i32, i32* %8
%210 = getelementptr inbounds [261 x i32], [261 x i32]* %4, i64 0, i64 0
%211 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 0
%212 = call i64 @pCT_data(i32 %208, i32* %7, i32* %6, i32 %209, i32* %210, i32* %9, i32* %211)
store i64 %212, i64* %10
%213 = load i64, i64* %10
%214 = icmp ne i64 %213, 0
br i1 %214, label %215, label %216
215: ; preds = %205
br label %218
216: ; preds = %205
%217 = call i32 @sleep(i32 2)
store i32 0, i32* %2
br label %226
218: ; preds = %215, %163, %135, %90, %62, %39, %20
%219 = load i64, i64* %10
%220 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.12, i64 0, i64 0), i64 %219)
%221 = call i32 @sleep(i32 2)
store i32 3, i32* %2
br label %226
222: ; preds = %167, %139, %94, %66
%223 = load i32, i32* %6
%224 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.13, i64 0, i64 0), i32 %223)
%225 = call i32 @sleep(i32 2)
store i32 3, i32* %2
br label %226
226: ; preds = %222, %218, %216, %200, %40
%227 = load i32, i32* %2
ret i32 %227
}

LLVM IR (-O2):
@.str = [6 x i8] c" \11\01\01\00\00"
@.str.1 = [53 x i8] c" Error sending command to reader. (Return code:%d)\0A\00"
@.str.2 = [5 x i8] c" \15\01\00\00"
@.str.3 = [4 x i8] c"Eec\00"
@.str.5 = [15 x i8] c"\00\A4\04\0C\09\D2v\00\00%EP\01\00\00"
@.str.7 = [6 x i8] c"\00\B2\01\C4\09\00"
@.str.9 = [15 x i8] c"\00\A4\04\0C\09\D2v\00\00%EP\02\00\00"
@.str.10 = [6 x i8] c"\00\B2\01\C4\00\00"
@.str.12 = [49 x i8] c"Error sending command to card. (Return code:%d)\0A\00"
@.str.13 = [41 x i8] c"Error sending command to card. (sad:%d)\0A\00"
@str = [11 x i8] c" No card.\00"
@str.18 = [33 x i8] c" Error reading account balance.\00"
@str.19 = [41 x i8] c" Error selecting GeldKarte application.\00"
@str.20 = [16 x i8] c" Unknown card.\00"
define i32 @test_geldkarte(i32 %0) {
%2 = alloca [261 x i32]
%3 = alloca [258 x i32]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = bitcast [261 x i32]* %2 to i8*
%8 = bitcast [258 x i32]* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = bitcast i32* %6 to i8*
store i32 258, i32* %6
%12 = getelementptr inbounds [261 x i32], [261 x i32]* %2, i64 0, i64 0
%13 = call i32 @memcpy(i32* %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
store i32 1032, i32* %6
store i32 2, i32* %4
store i32 1, i32* %5
%14 = getelementptr inbounds [258 x i32], [258 x i32]* %3, i64 0, i64 0
%15 = call i64 @pCT_data(i32 %0, i32* %5, i32* %4, i32 5, i32* %12, i32* %6, i32* %14)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %130
17: ; preds = %1
%18 = load i32, i32* %4
%19 = icmp eq i32 %18, 1
br i1 %19, label %25, label %20
20: ; preds = %17
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0), i64 0)
%22 = call i32 @memcpy(i32* %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 5)
store i32 1032, i32* %6
store i32 2, i32* %4
store i32 1, i32* %5
%23 = call i64 @pCT_data(i32 %0, i32* %5, i32* %4, i32 5, i32* %12, i32* %6, i32* %14)
%24 = icmp eq i64 %23, 0
br i1 %24, label %136, label %130
25: ; preds = %17
%26 = load i32, i32* %6
switch i32 %26, label %113 [
i32 26, label %27
i32 27, label %70
]
27: ; preds = %25
%28 = getelementptr inbounds [258 x i32], [258 x i32]* %3, i64 0, i64 7
%29 = call i64 @memcmp(i32* %28, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %123
31: ; preds = %27
%32 = call i32 @memcpy(i32* %12, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i32 14)
store i32 1032, i32* %6
store i32 2, i32* %4
store i32 0, i32* %5
%33 = call i64 @pCT_data(i32 %0, i32* %5, i32* %4, i32 14, i32* %12, i32* %6, i32* %14)
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %130
35: ; preds = %31
%36 = load i32, i32* %4
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %133
38: ; preds = %35
%39 = load i32, i32* %6
%40 = icmp ne i32 %39, 2
%41 = load i32, i32* %14
%42 = icmp ne i32 %41, 144
%43 = select i1 %40, i1 true, i1 %42
%44 = getelementptr inbounds [258 x i32], [258 x i32]* %3, i64 0, i64 1
%45 = load i32, i32* %44
%46 = icmp ne i32 %45, 0
%47 = select i1 %43, i1 true, i1 %46
br i1 %47, label %123, label %48
48: ; preds = %38
%49 = call i32 @memcpy(i32* %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 5)
store i32 1032, i32* %6
store i32 2, i32* %4
store i32 0, i32* %5
%50 = call i64 @pCT_data(i32 %0, i32* %5, i32* %4, i32 5, i32* %12, i32* %6, i32* %14)
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %130
52: ; preds = %48
%53 = load i32, i32* %4
%54 = icmp eq i32 %53, 0
br i1 %54, label %55, label %133
55: ; preds = %52
%56 = load i32, i32* %6
%57 = icmp slt i32 %56, 5
br i1 %57, label %123, label %58
58: ; preds = %55
%59 = add nsw i32 %56, -2
%60 = zext i32 %59 to i64
%61 = getelementptr inbounds [258 x i32], [258 x i32]* %3, i64 0, i64 %60
%62 = load i32, i32* %61
%63 = icmp eq i32 %62, 144
br i1 %63, label %64, label %123
64: ; preds = %58
%65 = add nsw i32 %56, -1
%66 = zext i32 %65 to i64
%67 = getelementptr inbounds [258 x i32], [258 x i32]* %3, i64 0, i64 %66
%68 = load i32, i32* %67
%69 = icmp eq i32 %68, 0
br i1 %69, label %126, label %123
70: ; preds = %25
%71 = getelementptr inbounds [258 x i32], [258 x i32]* %3, i64 0, i64 8
%72 = call i64 @memcmp(i32* %71, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%73 = icmp eq i64 %72, 0
br i1 %73, label %74, label %123
74: ; preds = %70
%75 = call i32 @memcpy(i32* %12, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i32 14)
store i32 1032, i32* %6
store i32 2, i32* %4
store i32 0, i32* %5
%76 = call i64 @pCT_data(i32 %0, i32* %5, i32* %4, i32 14, i32* %12, i32* %6, i32* %14)
%77 = icmp eq i64 %76, 0
br i1 %77, label %78, label %130
78: ; preds = %74
%79 = load i32, i32* %4
%80 = icmp eq i32 %79, 0
br i1 %80, label %81, label %133
81: ; preds = %78
%82 = load i32, i32* %6
%83 = icmp ne i32 %82, 2
%84 = load i32, i32* %14
%85 = icmp ne i32 %84, 144
%86 = select i1 %83, i1 true, i1 %85
%87 = getelementptr inbounds [258 x i32], [258 x i32]* %3, i64 0, i64 1
%88 = load i32, i32* %87
%89 = icmp ne i32 %88, 0
%90 = select i1 %86, i1 true, i1 %89
br i1 %90, label %123, label %91
91: ; preds = %81
%92 = call i32 @memcpy(i32* %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i32 5)
store i32 1032, i32* %6
store i32 2, i32* %4
store i32 0, i32* %5
%93 = call i64 @pCT_data(i32 %0, i32* %5, i32* %4, i32 5, i32* %12, i32* %6, i32* %14)
%94 = icmp eq i64 %93, 0
br i1 %94, label %95, label %130
95: ; preds = %91
%96 = load i32, i32* %4
%97 = icmp eq i32 %96, 0
br i1 %97, label %98, label %133
98: ; preds = %95
%99 = load i32, i32* %6
%100 = icmp slt i32 %99, 5
br i1 %100, label %123, label %101
101: ; preds = %98
%102 = add nsw i32 %99, -2
%103 = zext i32 %102 to i64
%104 = getelementptr inbounds [258 x i32], [258 x i32]* %3, i64 0, i64 %103
%105 = load i32, i32* %104
%106 = icmp eq i32 %105, 144
br i1 %106, label %107, label %123
107: ; preds = %101
%108 = add nsw i32 %99, -1
%109 = zext i32 %108 to i64
%110 = getelementptr inbounds [258 x i32], [258 x i32]* %3, i64 0, i64 %109
%111 = load i32, i32* %110
%112 = icmp eq i32 %111, 0
br i1 %112, label %126, label %123
113: ; preds = %25
%114 = icmp sgt i32 %26, 2
br i1 %114, label %115, label %121
115: ; preds = %113
%116 = add nsw i32 %26, -2
%117 = zext i32 %116 to i64
%118 = getelementptr inbounds [258 x i32], [258 x i32]* %3, i64 0, i64 %117
%119 = load i32, i32* %118
%120 = icmp eq i32 %119, 144
br i1 %120, label %123, label %121
121: ; preds = %115, %113
%122 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
br label %136
123: ; preds = %115, %98, %101, %107, %81, %70, %55, %58, %64, %38, %27
%124 = phi i8* [ getelementptr inbounds ([16 x i8], [16 x i8]* @str.20, i64 0, i64 0), %27 ], [ getelementptr inbounds ([41 x i8], [41 x i8]* @str.19, i64 0, i64 0), %38 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @str.18, i64 0, i64 0), %64 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @str.18, i64 0, i64 0), %58 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @str.18, i64 0, i64 0), %55 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @str.20, i64 0, i64 0), %70 ], [ getelementptr inbounds ([41 x i8], [41 x i8]* @str.19, i64 0, i64 0), %81 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @str.18, i64 0, i64 0), %107 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @str.18, i64 0, i64 0), %101 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @str.18, i64 0, i64 0), %98 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @str.20, i64 0, i64 0), %115 ]
%125 = call i32 @puts(i8* dereferenceable(1) %124)
br label %126
126: ; preds = %123, %64, %107
%127 = call i32 @memcpy(i32* %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 5)
store i32 1032, i32* %6
store i32 2, i32* %4
store i32 1, i32* %5
%128 = call i64 @pCT_data(i32 %0, i32* %5, i32* %4, i32 5, i32* %12, i32* %6, i32* %14)
%129 = icmp eq i64 %128, 0
br i1 %129, label %136, label %130
130: ; preds = %126, %91, %74, %48, %31, %20, %1
%131 = phi i64 [ %15, %1 ], [ %23, %20 ], [ %128, %126 ], [ %33, %31 ], [ %50, %48 ], [ %76, %74 ], [ %93, %91 ]
%132 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.12, i64 0, i64 0), i64 %131)
br label %136
133: ; preds = %95, %78, %52, %35
%134 = phi i32 [ %96, %95 ], [ %79, %78 ], [ %53, %52 ], [ %36, %35 ]
%135 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.13, i64 0, i64 0), i32 %134)
br label %136
136: ; preds = %126, %20, %133, %130, %121
%137 = phi i32 [ 3, %130 ], [ 3, %133 ], [ 0, %121 ], [ 3, %20 ], [ 0, %126 ]
%138 = call i32 @sleep(i32 2)
ret i32 %137
}