#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ sleep(unsigned int);
void main() {
  int first[5] = {0}, econ[5] = {0};
  int nFirst = 1, nEcon = 1;
  int request;
  int cont = 1, still = 1;
  int i, i2;
  int skip = 0;
  printf("----------\n");
  while (cont == 1) {
    i = 0;
    i2 = 1;
    still = 1;
    while ((still == 1) && ((nFirst <= 5) || (nEcon <= 5))) {
      if (skip == 0) {
        printf("What class of seat would you like?\n");
        printf("Enter 1 for first class.\n");
        printf("Enter 2 for economy.\n");
        printf("Enter 3 to end.\n");
        scanf("%d", &request);
      }
      skip = 0;
      if (request == 1) {
        if (nFirst <= 5) {
          first[nFirst - 1] = 1;
          nFirst += 1;
          still = 0;
        } else {
          printf("----------\n");
          printf("Sorry, there are no first class seats free.\n");
          sleep((unsigned int)2);
          printf("----------\n");
          printf("Would you like to take an economy class seat?\n");
          printf("Enter 1 for no.\n");
          printf("Enter 2 for yes.\n");
          printf("Enter 3 to quit.\n");
          scanf("%d", &request);
          if (request == 1) {
            printf("----------\n");
            printf("Next flight leaves in 3 hours.\n");
            sleep((unsigned int)2);
            printf("----------\n");
          } else if (request == 2) {
            skip = 1;
          } else if (request == 3) {
            skip = 1;
          }
        }
      } else if (request == 2) {
        if (nEcon <= 5) {
          econ[nEcon - 1] = 1;
          nEcon += 1;
          still = 0;
        } else {
          printf("----------\n");
          printf("Sorry, there are no economy seats free.\n");
          sleep((unsigned int)2);
          printf("----------\n");
          printf("Would you like to take a first class seat?\n");
          printf("Enter 1 for yes.\n");
          printf("Enter 2 for no.\n");
          printf("Enter 3 to quit.\n");
          scanf("%d", &request);
          if (request == 1) {
            skip = 1;
          } else if (request == 2) {
            printf("----------\n");
            printf("Next flight leaves in 3 hours.\n");
            sleep((unsigned int)2);
            printf("----------\n");
          } else if (request == 3) {
            skip = 1;
          }
        }
      } else if (request == 3) {
        still = 0;
        cont = 0;
      }
    }
    if ((request == 1) || (request == 2)) {
      printf("----------\n");
      if (request == 1)
        printf("Class:\tFirst class\n");
      else if (request == 2)
        printf("Class:\tEconomy\n");
      if (request == 1)
        printf("Seat:\t1, %d\n", nFirst - 1);
      else if (request == 2)
        printf("Seat:\t2, %d\n", nEcon - 1);
    }
    if (!((nFirst <= 5) || (nEcon <= 5))) {
      printf("----------\n");
      sleep((unsigned int)2);
      printf("There are no more seats availible.\n");
      request = 0;
      cont = 0;
    }
    printf("----------\n");
    sleep((unsigned int)2);
    while (i2 <= 2) {
      while (i < 5) {
        if (i2 == 1)
          printf("%d ", first[i]);
        else if (i2 == 2)
          printf("%d ", econ[i]);
        i += 1;
      }
      printf("\n");
      i2 += 1;
      i = 0;
    }
    printf("----------\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1040 <memset@plt>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1040 <memset@plt>
movl   $0x1,-0x44(%rbp)
movl   $0x1,-0x48(%rbp)
movl   $0x1,-0x50(%rbp)
movl   $0x1,-0x54(%rbp)
movl   $0x0,-0x60(%rbp)
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x1,-0x50(%rbp)
jne    168a <main+0x54a>
movl   $0x0,-0x58(%rbp)
movl   $0x1,-0x5c(%rbp)
movl   $0x1,-0x54(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0x54(%rbp)
mov    %al,-0x61(%rbp)
jne    11e6 <main+0xa6>
mov    $0x1,%al
cmpl   $0x5,-0x44(%rbp)
mov    %al,-0x62(%rbp)
jle    11e0 <main+0xa0>
cmpl   $0x5,-0x48(%rbp)
setle  %al
mov    %al,-0x62(%rbp)
mov    -0x62(%rbp),%al
mov    %al,-0x61(%rbp)
mov    -0x61(%rbp),%al
test   $0x1,%al
jne    11f6 <main+0xb6>
jmp    14dc <main+0x39c>
cmpl   $0x0,-0x60(%rbp)
jne    1248 <main+0x108>
lea    0xe05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe1b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe32(%rip),%rdi
lea    -0x4c(%rbp),%rsi
call   1050 <scanf@plt>
movl   $0x0,-0x60(%rbp)
cmpl   $0x1,-0x4c(%rbp)
jne    1382 <main+0x242>
cmpl   $0x5,-0x44(%rbp)
jg     1288 <main+0x148>
mov    -0x44(%rbp),%eax
sub    $0x1,%eax
cltq
movl   $0x1,-0x20(%rbp,%rax,4)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
movl   $0x0,-0x54(%rbp)
jmp    137d <main+0x23d>
lea    0xd71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdd7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x2,%edi
call   1060 <sleep@plt>
lea    0xd4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdde(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe02(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd76(%rip),%rdi
lea    -0x4c(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x1,-0x4c(%rbp)
jne    1347 <main+0x207>
lea    0xceb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xde2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x2,%edi
call   1060 <sleep@plt>
lea    0xcc5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1378 <main+0x238>
cmpl   $0x2,-0x4c(%rbp)
jne    135d <main+0x21d>
movl   $0x1,-0x60(%rbp)
jmp    1373 <main+0x233>
cmpl   $0x3,-0x4c(%rbp)
jne    136e <main+0x22e>
movl   $0x1,-0x60(%rbp)
jmp    1373 <main+0x233>
jmp    1378 <main+0x238>
jmp    137d <main+0x23d>
jmp    14d7 <main+0x397>
cmpl   $0x2,-0x4c(%rbp)
jne    14b5 <main+0x375>
cmpl   $0x5,-0x48(%rbp)
jg     13bb <main+0x27b>
mov    -0x48(%rbp),%eax
sub    $0x1,%eax
cltq
movl   $0x1,-0x40(%rbp,%rax,4)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
movl   $0x0,-0x54(%rbp)
jmp    14b0 <main+0x370>
lea    0xc3e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd55(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x2,%edi
call   1060 <sleep@plt>
lea    0xc18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcd3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc43(%rip),%rdi
lea    -0x4c(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x1,-0x4c(%rbp)
jne    144d <main+0x30d>
movl   $0x1,-0x60(%rbp)
jmp    14ab <main+0x36b>
cmpl   $0x2,-0x4c(%rbp)
jne    1490 <main+0x350>
lea    0xba2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x2,%edi
call   1060 <sleep@plt>
lea    0xb7c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14a6 <main+0x366>
cmpl   $0x3,-0x4c(%rbp)
jne    14a1 <main+0x361>
movl   $0x1,-0x60(%rbp)
jmp    14a6 <main+0x366>
jmp    14ab <main+0x36b>
jmp    14b0 <main+0x370>
jmp    14d2 <main+0x392>
cmpl   $0x3,-0x4c(%rbp)
jne    14cd <main+0x38d>
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x50(%rbp)
jmp    14d2 <main+0x392>
jmp    14d7 <main+0x397>
jmp    11b8 <main+0x78>
cmpl   $0x1,-0x4c(%rbp)
je     14f0 <main+0x3b0>
cmpl   $0x2,-0x4c(%rbp)
jne    1583 <main+0x443>
lea    0xb09(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x1,-0x4c(%rbp)
jne    151b <main+0x3db>
lea    0xc8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1538 <main+0x3f8>
cmpl   $0x2,-0x4c(%rbp)
jne    1533 <main+0x3f3>
lea    0xc85(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1538 <main+0x3f8>
cmpl   $0x1,-0x4c(%rbp)
jne    155b <main+0x41b>
mov    -0x44(%rbp),%esi
sub    $0x1,%esi
lea    0xc72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    157e <main+0x43e>
cmpl   $0x2,-0x4c(%rbp)
jne    1579 <main+0x439>
mov    -0x48(%rbp),%esi
sub    $0x1,%esi
lea    0xc5c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    157e <main+0x43e>
jmp    1583 <main+0x443>
cmpl   $0x5,-0x44(%rbp)
jle    15cb <main+0x48b>
cmpl   $0x5,-0x48(%rbp)
jle    15cb <main+0x48b>
lea    0xa62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x2,%edi
call   1060 <sleep@plt>
lea    0xc25(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
lea    0xa2e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x2,%edi
call   1060 <sleep@plt>
cmpl   $0x2,-0x5c(%rbp)
jg     1677 <main+0x537>
jmp    15f2 <main+0x4b2>
cmpl   $0x5,-0x58(%rbp)
jge    1654 <main+0x514>
cmpl   $0x1,-0x5c(%rbp)
jne    1621 <main+0x4e1>
movslq -0x58(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%esi
lea    0xbea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1646 <main+0x506>
cmpl   $0x2,-0x5c(%rbp)
jne    1641 <main+0x501>
movslq -0x58(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%esi
lea    0xbc5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1646 <main+0x506>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    15f2 <main+0x4b2>
lea    0x9af(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
movl   $0x0,-0x58(%rbp)
jmp    15e3 <main+0x4a3>
lea    0x982(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1199 <main+0x59>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movl   $0x0,0x40(%rsp)
movaps %xmm0,0x10(%rsp)
movl   $0x0,0x20(%rsp)
lea    0x1003(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
movl   $0x1,0xc(%rsp)
lea    0x8(%rsp),%rbx
xor    %r12d,%r12d
mov    $0x1,%r13d
jmp    127e <main+0x12e>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
call   1040 <puts@plt>
mov    $0x2,%edi
call   1070 <sleep@plt>
mov    0x30(%rsp),%esi
lea    0xe50(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x34(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x38(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x3c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x40(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x10(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x18(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x1c(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x20(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
test   %ebp,%ebp
lea    0x8(%rsp),%rbx
je     1554 <main+0x404>
cmp    $0x6,%r13d
setl   %al
cmpl   $0x6,0xc(%rsp)
setl   %r15b
or     %al,%r15b
cmp    $0x1,%r15b
je     1368 <main+0x218>
mov    $0x1,%ebp
mov    0x8(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0x1,%eax
ja     1302 <main+0x1b2>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    0x8(%rsp),%eax
lea    0xd94(%rip),%rdi
cmp    $0x1,%eax
je     12d0 <main+0x180>
cmp    $0x2,%eax
jne    12d9 <main+0x189>
lea    0xd74(%rip),%rdi
call   1040 <puts@plt>
mov    0x8(%rsp),%eax
mov    %r13d,%esi
lea    0xd20(%rip),%rdi
cmp    $0x1,%eax
je     12f8 <main+0x1a8>
cmp    $0x2,%eax
jne    1302 <main+0x1b2>
mov    0xc(%rsp),%esi
lea    0xd18(%rip),%rdi
add    $0xffffffff,%esi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    $0x6,%r13d
jl     11b0 <main+0x60>
cmpl   $0x6,0xc(%rsp)
jl     11b0 <main+0x60>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    $0x2,%edi
call   1070 <sleep@plt>
lea    0xcf1(%rip),%rdi
call   1040 <puts@plt>
movl   $0x0,0x8(%rsp)
xor    %ebp,%ebp
jmp    11b0 <main+0x60>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x0,%r12d
cmp    $0x3,%eax
je     1518 <main+0x3c8>
test   %r15b,%r15b
je     129b <main+0x14b>
test   %r12d,%r12d
jne    13ac <main+0x25c>
lea    0xe1c(%rip),%rdi
call   1040 <puts@plt>
lea    0xe33(%rip),%rdi
call   1040 <puts@plt>
lea    0xe40(%rip),%rdi
call   1040 <puts@plt>
lea    0xe49(%rip),%rdi
call   1040 <puts@plt>
lea    0xc5c(%rip),%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
xor    %ebp,%ebp
mov    0x8(%rsp),%eax
cmp    $0x1,%eax
je     1460 <main+0x310>
cmp    $0x2,%eax
jne    1350 <main+0x200>
cmpl   $0x5,0xc(%rsp)
jle    1520 <main+0x3d0>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xc8c(%rip),%rdi
call   1040 <puts@plt>
mov    $0x2,%edi
call   1070 <sleep@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xc96(%rip),%rdi
call   1040 <puts@plt>
lea    0xcb5(%rip),%rdi
call   1040 <puts@plt>
lea    0xcba(%rip),%rdi
call   1040 <puts@plt>
lea    0xd39(%rip),%rdi
call   1040 <puts@plt>
lea    0xbd8(%rip),%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    $0x1,%r12d
mov    0x8(%rsp),%eax
cmp    $0x1,%eax
je     135f <main+0x20f>
cmp    $0x3,%eax
je     135f <main+0x20f>
cmp    $0x2,%eax
je     14ea <main+0x39a>
jmp    1510 <main+0x3c0>
nopw   0x0(%rax,%rax,1)
cmp    $0x5,%r13d
jle    1538 <main+0x3e8>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xc61(%rip),%rdi
call   1040 <puts@plt>
mov    $0x2,%edi
call   1070 <sleep@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xc6f(%rip),%rdi
call   1040 <puts@plt>
lea    0xc91(%rip),%rdi
call   1040 <puts@plt>
lea    0xc95(%rip),%rdi
call   1040 <puts@plt>
lea    0xc9a(%rip),%rdi
call   1040 <puts@plt>
lea    0xb39(%rip),%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    $0x1,%r12d
mov    0x8(%rsp),%eax
lea    -0x2(%rax),%ecx
cmp    $0x2,%ecx
jb     135f <main+0x20f>
cmp    $0x1,%eax
jne    1510 <main+0x3c0>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xc6d(%rip),%rdi
call   1040 <puts@plt>
mov    $0x2,%edi
call   1070 <sleep@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
xor    %r12d,%r12d
jmp    135f <main+0x20f>
xor    %r12d,%r12d
jmp    12a0 <main+0x150>
mov    0xc(%rsp),%ecx
movslq %ecx,%rax
movl   $0x1,0xc(%rsp,%rax,4)
add    $0x1,%ecx
mov    %ecx,0xc(%rsp)
jmp    1547 <main+0x3f7>
movslq %r13d,%rax
movl   $0x1,0x2c(%rsp,%rax,4)
add    $0x1,%r13d
mov    $0x1,%ebp
xor    %r12d,%r12d
jmp    12a0 <main+0x150>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"----------\0A\00"
@.str.1 = [36 x i8] c"What class of seat would you like?\0A\00"
@.str.2 = [26 x i8] c"Enter 1 for first class.\0A\00"
@.str.3 = [22 x i8] c"Enter 2 for economy.\0A\00"
@.str.4 = [17 x i8] c"Enter 3 to end.\0A\00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [45 x i8] c"Sorry, there are no first class seats free.\0A\00"
@.str.7 = [47 x i8] c"Would you like to take an economy class seat?\0A\00"
@.str.8 = [17 x i8] c"Enter 1 for no.\0A\00"
@.str.9 = [18 x i8] c"Enter 2 for yes.\0A\00"
@.str.10 = [18 x i8] c"Enter 3 to quit.\0A\00"
@.str.11 = [32 x i8] c"Next flight leaves in 3 hours.\0A\00"
@.str.12 = [41 x i8] c"Sorry, there are no economy seats free.\0A\00"
@.str.13 = [44 x i8] c"Would you like to take a first class seat?\0A\00"
@.str.14 = [18 x i8] c"Enter 1 for yes.\0A\00"
@.str.15 = [17 x i8] c"Enter 2 for no.\0A\00"
@.str.16 = [20 x i8] c"Class:\09First class\0A\00"
@.str.17 = [16 x i8] c"Class:\09Economy\0A\00"
@.str.18 = [13 x i8] c"Seat:\091, %d\0A\00"
@.str.19 = [13 x i8] c"Seat:\092, %d\0A\00"
@.str.20 = [36 x i8] c"There are no more seats availible.\0A\00"
@.str.21 = [4 x i8] c"%d \00"
@.str.22 = [2 x i8] c"\0A\00"
define void @main() {
%1 = alloca [5 x i32]
%2 = alloca [5 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = bitcast [5 x i32]* %1 to i8*
%12 = bitcast [5 x i32]* %2 to i8*
store i32 1, i32* %3
store i32 1, i32* %4
store i32 1, i32* %6
store i32 1, i32* %7
store i32 0, i32* %10
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %211, %0
%15 = load i32, i32* %6
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %213
17: ; preds = %14
store i32 0, i32* %8
store i32 1, i32* %9
store i32 1, i32* %7
br label %18
18: ; preds = %130, %17
%19 = load i32, i32* %7
%20 = icmp eq i32 %19, 1
br i1 %20, label %21, label %29
21: ; preds = %18
%22 = load i32, i32* %3
%23 = icmp sle i32 %22, 5
br i1 %23, label %27, label %24
24: ; preds = %21
%25 = load i32, i32* %4
%26 = icmp sle i32 %25, 5
br label %27
27: ; preds = %24, %21
%28 = phi i1 [ true, %21 ], [ %26, %24 ]
br label %29
29: ; preds = %27, %18
%30 = phi i1 [ false, %18 ], [ %28, %27 ]
br i1 %30, label %31, label %131
31: ; preds = %29
%32 = load i32, i32* %10
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %40
34: ; preds = %31
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%39 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %5)
br label %40
40: ; preds = %34, %31
store i32 0, i32* %10
%41 = load i32, i32* %5
%42 = icmp eq i32 %41, 1
br i1 %42, label %43, label %82
43: ; preds = %40
%44 = load i32, i32* %3
%45 = icmp sle i32 %44, 5
br i1 %45, label %46, label %53
46: ; preds = %43
%47 = load i32, i32* %3
%48 = sub nsw i32 %47, 1
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 %49
store i32 1, i32* %50
%51 = load i32, i32* %3
%52 = add nsw i32 %51, 1
store i32 %52, i32* %3
store i32 0, i32* %7
br label %81
53: ; preds = %43
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.6, i64 0, i64 0))
%56 = call i32 @sleep(i32 2)
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0))
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0))
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0))
%62 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %5)
%63 = load i32, i32* %5
%64 = icmp eq i32 %63, 1
br i1 %64, label %65, label %70
65: ; preds = %53
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0))
%68 = call i32 @sleep(i32 2)
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %80
70: ; preds = %53
%71 = load i32, i32* %5
%72 = icmp eq i32 %71, 2
br i1 %72, label %73, label %74
73: ; preds = %70
store i32 1, i32* %10
br label %79
74: ; preds = %70
%75 = load i32, i32* %5
%76 = icmp eq i32 %75, 3
br i1 %76, label %77, label %78
77: ; preds = %74
store i32 1, i32* %10
br label %78
78: ; preds = %77, %74
br label %79
79: ; preds = %78, %73
br label %80
80: ; preds = %79, %65
br label %81
81: ; preds = %80, %46
br label %130
82: ; preds = %40
%83 = load i32, i32* %5
%84 = icmp eq i32 %83, 2
br i1 %84, label %85, label %124
85: ; preds = %82
%86 = load i32, i32* %4
%87 = icmp sle i32 %86, 5
br i1 %87, label %88, label %95
88: ; preds = %85
%89 = load i32, i32* %4
%90 = sub nsw i32 %89, 1
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %91
store i32 1, i32* %92
%93 = load i32, i32* %4
%94 = add nsw i32 %93, 1
store i32 %94, i32* %4
store i32 0, i32* %7
br label %123
95: ; preds = %85
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.12, i64 0, i64 0))
%98 = call i32 @sleep(i32 2)
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.13, i64 0, i64 0))
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.14, i64 0, i64 0))
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0))
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0))
%104 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %5)
%105 = load i32, i32* %5
%106 = icmp eq i32 %105, 1
br i1 %106, label %107, label %108
107: ; preds = %95
store i32 1, i32* %10
br label %122
108: ; preds = %95
%109 = load i32, i32* %5
%110 = icmp eq i32 %109, 2
br i1 %110, label %111, label %116
111: ; preds = %108
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0))
%114 = call i32 @sleep(i32 2)
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %121
116: ; preds = %108
%117 = load i32, i32* %5
%118 = icmp eq i32 %117, 3
br i1 %118, label %119, label %120
119: ; preds = %116
store i32 1, i32* %10
br label %120
120: ; preds = %119, %116
br label %121
121: ; preds = %120, %111
br label %122
122: ; preds = %121, %107
br label %123
123: ; preds = %122, %88
br label %129
124: ; preds = %82
%125 = load i32, i32* %5
%126 = icmp eq i32 %125, 3
br i1 %126, label %127, label %128
127: ; preds = %124
store i32 0, i32* %7
store i32 0, i32* %6
br label %128
128: ; preds = %127, %124
br label %129
129: ; preds = %128, %123
br label %130
130: ; preds = %129, %81
br label %18
131: ; preds = %29
%132 = load i32, i32* %5
%133 = icmp eq i32 %132, 1
br i1 %133, label %137, label %134
134: ; preds = %131
%135 = load i32, i32* %5
%136 = icmp eq i32 %135, 2
br i1 %136, label %137, label %165
137: ; preds = %134, %131
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%139 = load i32, i32* %5
%140 = icmp eq i32 %139, 1
br i1 %140, label %141, label %143
141: ; preds = %137
%142 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.16, i64 0, i64 0))
br label %149
143: ; preds = %137
%144 = load i32, i32* %5
%145 = icmp eq i32 %144, 2
br i1 %145, label %146, label %148
146: ; preds = %143
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.17, i64 0, i64 0))
br label %148
148: ; preds = %146, %143
br label %149
149: ; preds = %148, %141
%150 = load i32, i32* %5
%151 = icmp eq i32 %150, 1
br i1 %151, label %152, label %156
152: ; preds = %149
%153 = load i32, i32* %3
%154 = sub nsw i32 %153, 1
%155 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.18, i64 0, i64 0), i32 %154)
br label %164
156: ; preds = %149
%157 = load i32, i32* %5
%158 = icmp eq i32 %157, 2
br i1 %158, label %159, label %163
159: ; preds = %156
%160 = load i32, i32* %4
%161 = sub nsw i32 %160, 1
%162 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0), i32 %161)
br label %163
163: ; preds = %159, %156
br label %164
164: ; preds = %163, %152
br label %165
165: ; preds = %164, %134
%166 = load i32, i32* %3
%167 = icmp sle i32 %166, 5
br i1 %167, label %175, label %168
168: ; preds = %165
%169 = load i32, i32* %4
%170 = icmp sle i32 %169, 5
br i1 %170, label %175, label %171
171: ; preds = %168
%172 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%173 = call i32 @sleep(i32 2)
%174 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.20, i64 0, i64 0))
store i32 0, i32* %5
store i32 0, i32* %6
br label %175
175: ; preds = %171, %168, %165
%176 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%177 = call i32 @sleep(i32 2)
br label %178
178: ; preds = %207, %175
%179 = load i32, i32* %9
%180 = icmp sle i32 %179, 2
br i1 %180, label %181, label %211
181: ; preds = %178
br label %182
182: ; preds = %204, %181
%183 = load i32, i32* %8
%184 = icmp slt i32 %183, 5
br i1 %184, label %185, label %207
185: ; preds = %182
%186 = load i32, i32* %9
%187 = icmp eq i32 %186, 1
br i1 %187, label %188, label %194
188: ; preds = %185
%189 = load i32, i32* %8
%190 = sext i32 %189 to i64
%191 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 %190
%192 = load i32, i32* %191
%193 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i32 %192)
br label %204
194: ; preds = %185
%195 = load i32, i32* %9
%196 = icmp eq i32 %195, 2
br i1 %196, label %197, label %203
197: ; preds = %194
%198 = load i32, i32* %8
%199 = sext i32 %198 to i64
%200 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %199
%201 = load i32, i32* %200
%202 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i32 %201)
br label %203
203: ; preds = %197, %194
br label %204
204: ; preds = %203, %188
%205 = load i32, i32* %8
%206 = add nsw i32 %205, 1
store i32 %206, i32* %8
br label %182
207: ; preds = %182
%208 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.22, i64 0, i64 0))
%209 = load i32, i32* %9
%210 = add nsw i32 %209, 1
store i32 %210, i32* %9
store i32 0, i32* %8
br label %178
211: ; preds = %178
%212 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %14
213: ; preds = %14
ret void
}

LLVM IR (-O2):
@.str.5 = [3 x i8] c"%d\00"
@.str.18 = [13 x i8] c"Seat:\091, %d\0A\00"
@.str.19 = [13 x i8] c"Seat:\092, %d\0A\00"
@.str.21 = [4 x i8] c"%d \00"
@str.24 = [35 x i8] c"There are no more seats availible.\00"
@str.28 = [15 x i8] c"Class:\09Economy\00"
@str.29 = [19 x i8] c"Class:\09First class\00"
@str.31 = [40 x i8] c"Sorry, there are no economy seats free.\00"
@str.33 = [43 x i8] c"Would you like to take a first class seat?\00"
@str.34 = [17 x i8] c"Enter 1 for yes.\00"
@str.35 = [16 x i8] c"Enter 2 for no.\00"
@str.41 = [44 x i8] c"Sorry, there are no first class seats free.\00"
@str.43 = [46 x i8] c"Would you like to take an economy class seat?\00"
@str.44 = [16 x i8] c"Enter 1 for no.\00"
@str.45 = [17 x i8] c"Enter 2 for yes.\00"
@str.46 = [17 x i8] c"Enter 3 to quit.\00"
@str.48 = [31 x i8] c"Next flight leaves in 3 hours.\00"
@str.49 = [11 x i8] c"----------\00"
@str.50 = [35 x i8] c"What class of seat would you like?\00"
@str.51 = [25 x i8] c"Enter 1 for first class.\00"
@str.52 = [21 x i8] c"Enter 2 for economy.\00"
@str.53 = [16 x i8] c"Enter 3 to end.\00"
define void @main() {
%1 = alloca [5 x i32]
%2 = alloca [5 x i32]
%3 = alloca i32
%4 = bitcast [5 x i32]* %1 to i8*
%5 = bitcast [5 x i32]* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.49, i64 0, i64 0))
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%9 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 1
%10 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 2
%11 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 3
%12 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 4
%13 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%14 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 1
%15 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 2
%16 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 3
%17 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 4
br label %18
18: ; preds = %0, %116
%19 = phi i32 [ 0, %0 ], [ %88, %116 ]
%20 = phi i32 [ 1, %0 ], [ %86, %116 ]
%21 = phi i32 [ 1, %0 ], [ %85, %116 ]
%22 = icmp slt i32 %21, 6
%23 = icmp slt i32 %20, 6
%24 = select i1 %22, i1 true, i1 %23
br i1 %24, label %25, label %84
25: ; preds = %18, %82
%26 = phi i32 [ %83, %82 ], [ %19, %18 ]
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %34
28: ; preds = %25
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.50, i64 0, i64 0))
%30 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.51, i64 0, i64 0))
%31 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.52, i64 0, i64 0))
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.53, i64 0, i64 0))
%33 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %3)
br label %34
34: ; preds = %28, %25
%35 = load i32, i32* %3
switch i32 %35, label %82 [
i32 1, label %36
i32 2, label %58
i32 3, label %84
]
36: ; preds = %34
br i1 %22, label %37, label %42
37: ; preds = %36
%38 = add nsw i32 %21, -1
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 %39
store i32 1, i32* %40
%41 = add nsw i32 %21, 1
br label %84
42: ; preds = %36
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.49, i64 0, i64 0))
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.41, i64 0, i64 0))
%45 = call i32 @sleep(i32 2)
%46 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.49, i64 0, i64 0))
%47 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.43, i64 0, i64 0))
%48 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.44, i64 0, i64 0))
%49 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.45, i64 0, i64 0))
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.46, i64 0, i64 0))
%51 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %3)
%52 = load i32, i32* %3
switch i32 %52, label %80 [
i32 1, label %53
i32 2, label %82
i32 3, label %82
]
53: ; preds = %42
%54 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.49, i64 0, i64 0))
%55 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.48, i64 0, i64 0))
%56 = call i32 @sleep(i32 2)
%57 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.49, i64 0, i64 0))
br label %82
58: ; preds = %34
br i1 %23, label %59, label %64
59: ; preds = %58
%60 = add nsw i32 %20, -1
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %61
store i32 1, i32* %62
%63 = add nsw i32 %20, 1
br label %84
64: ; preds = %58
%65 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.49, i64 0, i64 0))
%66 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.31, i64 0, i64 0))
%67 = call i32 @sleep(i32 2)
%68 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.49, i64 0, i64 0))
%69 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.33, i64 0, i64 0))
%70 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.34, i64 0, i64 0))
%71 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.35, i64 0, i64 0))
%72 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.46, i64 0, i64 0))
%73 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %3)
%74 = load i32, i32* %3
switch i32 %74, label %81 [
i32 1, label %82
i32 2, label %75
i32 3, label %82
]
75: ; preds = %64
%76 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.49, i64 0, i64 0))
%77 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.48, i64 0, i64 0))
%78 = call i32 @sleep(i32 2)
%79 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.49, i64 0, i64 0))
br label %82
80: ; preds = %42
br label %82
81: ; preds = %64
br label %82
82: ; preds = %34, %64, %64, %81, %42, %42, %80, %75, %53
%83 = phi i32 [ 0, %53 ], [ 0, %75 ], [ 1, %42 ], [ 0, %80 ], [ 1, %42 ], [ 1, %64 ], [ 0, %81 ], [ 1, %64 ], [ 0, %34 ]
br i1 %24, label %25, label %84
84: ; preds = %82, %34, %18, %59, %37
%85 = phi i32 [ %21, %59 ], [ %41, %37 ], [ %21, %18 ], [ %21, %34 ], [ %21, %82 ]
%86 = phi i32 [ %63, %59 ], [ %20, %37 ], [ %20, %18 ], [ %20, %34 ], [ %20, %82 ]
%87 = phi i32 [ 1, %59 ], [ 1, %37 ], [ 1, %18 ], [ 1, %82 ], [ 0, %34 ]
%88 = phi i32 [ 0, %59 ], [ 0, %37 ], [ %19, %18 ], [ %83, %82 ], [ 0, %34 ]
%89 = load i32, i32* %3
%90 = add i32 %89, -1
%91 = icmp ult i32 %90, 2
br i1 %91, label %92, label %108
92: ; preds = %84
%93 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.49, i64 0, i64 0))
%94 = load i32, i32* %3
switch i32 %94, label %100 [
i32 1, label %96
i32 2, label %95
]
95: ; preds = %92
br label %96
96: ; preds = %92, %95
%97 = phi i8* [ getelementptr inbounds ([15 x i8], [15 x i8]* @str.28, i64 0, i64 0), %95 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @str.29, i64 0, i64 0), %92 ]
%98 = call i32 @puts(i8* dereferenceable(1) %97)
%99 = load i32, i32* %3
br label %100
100: ; preds = %96, %92
%101 = phi i32 [ %99, %96 ], [ %94, %92 ]
switch i32 %101, label %108 [
i32 1, label %103
i32 2, label %102
]
102: ; preds = %100
br label %103
103: ; preds = %100, %102
%104 = phi i32 [ %86, %102 ], [ %85, %100 ]
%105 = phi i8* [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0), %102 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.18, i64 0, i64 0), %100 ]
%106 = add nsw i32 %104, -1
%107 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %105, i32 %106)
br label %108
108: ; preds = %103, %100, %84
%109 = icmp slt i32 %85, 6
%110 = icmp slt i32 %86, 6
%111 = select i1 %109, i1 true, i1 %110
br i1 %111, label %116, label %112
112: ; preds = %108
%113 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.49, i64 0, i64 0))
%114 = call i32 @sleep(i32 2)
%115 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.24, i64 0, i64 0))
store i32 0, i32* %3
br label %116
116: ; preds = %112, %108
%117 = phi i32 [ %87, %108 ], [ 0, %112 ]
%118 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.49, i64 0, i64 0))
%119 = call i32 @sleep(i32 2)
%120 = load i32, i32* %8
%121 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i32 %120)
%122 = load i32, i32* %9
%123 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i32 %122)
%124 = load i32, i32* %10
%125 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i32 %124)
%126 = load i32, i32* %11
%127 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i32 %126)
%128 = load i32, i32* %12
%129 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i32 %128)
%130 = call i32 @putchar(i32 10)
%131 = load i32, i32* %13
%132 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i32 %131)
%133 = load i32, i32* %14
%134 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i32 %133)
%135 = load i32, i32* %15
%136 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i32 %135)
%137 = load i32, i32* %16
%138 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i32 %137)
%139 = load i32, i32* %17
%140 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i32 %139)
%141 = call i32 @putchar(i32 10)
%142 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.49, i64 0, i64 0))
%143 = icmp eq i32 %117, 1
br i1 %143, label %18, label %144
144: ; preds = %116
ret void
}