#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *);
scalar_t__ scanf(char *, char *);
scalar_t__ strcmp(char *, char *);
int main() {
  int b = 0, c[100], i = 0;
  char a[25];
  c[0] = 0;
  while (scanf("%s", a) != EOF) {
    if (strcmp(a, "button_clicked") == 0)
      b = 0;
    if (strcmp(a, "cycle_complete") == 0)
      b = 1;
    if (b == 0) {
      if (c[i] == 0)
        c[i + 1] = 1;
      if (c[i] == 1)
        c[i + 1] = 2;
      if (c[i] == 2)
        c[i + 1] = 4;
      if (c[i] == 3)
        c[i + 1] = 1;
      if (c[i] == 4)
        c[i + 1] = 3;
      if (c[i] == 5)
        c[i + 1] = 4;
    }
    if (b == 1) {
      if (c[i] == 1)
        c[i + 1] = 5;
      if (c[i] == 4)
        c[i + 1] = 0;
    }
    i++;
  }
  for (b = 0; b <= i; b++) {
    if (c[b] == 0)
      printf("Door: CLOSED\n");
    if (c[b] == 1)
      printf("Door: OPENING\n");
    if (c[b] == 2)
      printf("Door: STOPPED_WHILE_OPENING\n");
    if (c[b] == 3)
      printf("Door: STOPPED_WHILE_CLOSING\n");
    if (c[b] == 4)
      printf("Door: CLOSING\n");
    if (c[b] == 5)
      printf("Door: OPEN\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x1a4(%rbp)
movl   $0x0,-0x1a0(%rbp)
lea    -0x1c0(%rbp),%rsi
lea    0xe95(%rip),%rdi
call   1050 <scanf@plt>
mov    0x2e71(%rip),%rcx
cmp    (%rcx),%rax
je     1352 <main+0x222>
lea    -0x1c0(%rbp),%rdi
lea    0xe75(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11a4 <main+0x74>
movl   $0x0,-0x8(%rbp)
lea    -0x1c0(%rbp),%rdi
lea    0xe60(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11c8 <main+0x98>
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    12d9 <main+0x1a9>
movslq -0x1a4(%rbp),%rax
cmpl   $0x0,-0x1a0(%rbp,%rax,4)
jne    11fd <main+0xcd>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
cltq
movl   $0x1,-0x1a0(%rbp,%rax,4)
movslq -0x1a4(%rbp),%rax
cmpl   $0x1,-0x1a0(%rbp,%rax,4)
01
jne    1228 <main+0xf8>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
cltq
movl   $0x2,-0x1a0(%rbp,%rax,4)
movslq -0x1a4(%rbp),%rax
cmpl   $0x2,-0x1a0(%rbp,%rax,4)
02
jne    1253 <main+0x123>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
cltq
movl   $0x4,-0x1a0(%rbp,%rax,4)
movslq -0x1a4(%rbp),%rax
cmpl   $0x3,-0x1a0(%rbp,%rax,4)
03
jne    127e <main+0x14e>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
cltq
movl   $0x1,-0x1a0(%rbp,%rax,4)
movslq -0x1a4(%rbp),%rax
cmpl   $0x4,-0x1a0(%rbp,%rax,4)
04
jne    12a9 <main+0x179>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
cltq
movl   $0x3,-0x1a0(%rbp,%rax,4)
movslq -0x1a4(%rbp),%rax
cmpl   $0x5,-0x1a0(%rbp,%rax,4)
05
jne    12d4 <main+0x1a4>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
cltq
movl   $0x4,-0x1a0(%rbp,%rax,4)
jmp    12d9 <main+0x1a9>
cmpl   $0x1,-0x8(%rbp)
jne    133e <main+0x20e>
movslq -0x1a4(%rbp),%rax
cmpl   $0x1,-0x1a0(%rbp,%rax,4)
01
jne    130e <main+0x1de>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
cltq
movl   $0x5,-0x1a0(%rbp,%rax,4)
movslq -0x1a4(%rbp),%rax
cmpl   $0x4,-0x1a0(%rbp,%rax,4)
04
jne    1339 <main+0x209>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
cltq
movl   $0x0,-0x1a0(%rbp,%rax,4)
jmp    133e <main+0x20e>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    115d <main+0x2d>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x1a4(%rbp),%eax
jg     142f <main+0x2ff>
movslq -0x8(%rbp),%rax
cmpl   $0x0,-0x1a0(%rbp,%rax,4)
jne    1386 <main+0x256>
lea    0xca0(%rip),%rdi
call   1030 <printf@plt>
movslq -0x8(%rbp),%rax
cmpl   $0x1,-0x1a0(%rbp,%rax,4)
01
jne    13a4 <main+0x274>
lea    0xc90(%rip),%rdi
call   1030 <printf@plt>
movslq -0x8(%rbp),%rax
cmpl   $0x2,-0x1a0(%rbp,%rax,4)
02
jne    13c2 <main+0x292>
lea    0xc81(%rip),%rdi
call   1030 <printf@plt>
movslq -0x8(%rbp),%rax
cmpl   $0x3,-0x1a0(%rbp,%rax,4)
03
jne    13e0 <main+0x2b0>
lea    0xc80(%rip),%rdi
call   1030 <printf@plt>
movslq -0x8(%rbp),%rax
cmpl   $0x4,-0x1a0(%rbp,%rax,4)
04
jne    13fe <main+0x2ce>
lea    0xc7f(%rip),%rdi
call   1030 <printf@plt>
movslq -0x8(%rbp),%rax
cmpl   $0x5,-0x1a0(%rbp,%rax,4)
05
jne    141c <main+0x2ec>
lea    0xc70(%rip),%rdi
call   1030 <printf@plt>
jmp    1421 <main+0x2f1>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1359 <main+0x229>
xor    %eax,%eax
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1b8,%rsp
movl   $0x0,0x20(%rsp)
lea    0xeb0(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
mov    0x2e89(%rip),%rcx
mov    $0x1,%ebx
cmp    (%rcx),%rax
je     122f <main+0xff>
mov    $0x1,%ebp
mov    %rsp,%rbx
lea    0xe96(%rip),%r15
mov    $0x1,%r13d
lea    0xe77(%rip),%r12
xor    %r14d,%r14d
jmp    11b2 <main+0x82>
mov    $0x5,%eax
mov    %eax,0x20(%rsp,%rbp,4)
mov    %r12,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
add    $0x1,%rbp
mov    0x2e3b(%rip),%rcx
cmp    (%rcx),%rax
je     122d <main+0xfd>
mov    %rbx,%rdi
lea    0xe47(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
mov    $0x0,%eax
cmove  %eax,%r14d
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
cmove  %r13d,%r14d
cmp    $0x1,%r14d
je     1210 <main+0xe0>
test   %r14d,%r14d
jne    1197 <main+0x67>
movslq 0x1c(%rsp,%rbp,4),%rax
cmp    $0x6,%rax
jae    1197 <main+0x67>
lea    0xe94(%rip),%rcx
mov    (%rcx,%rax,4),%eax
jmp    1193 <main+0x63>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x1c(%rsp,%rbp,4),%eax
cmp    $0x1,%eax
je     118e <main+0x5e>
cmp    $0x4,%eax
jne    1197 <main+0x67>
xor    %eax,%eax
jmp    1193 <main+0x63>
mov    %ebp,%ebx
xor    %ebp,%ebp
lea    0xe70(%rip),%r14
jmp    1249 <main+0x119>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    %rbp,%rbx
je     1262 <main+0x132>
movslq 0x20(%rsp,%rbp,4),%rax
cmp    $0x5,%rax
ja     1240 <main+0x110>
movslq (%r14,%rax,4),%rdi
add    %r14,%rdi
call   1030 <puts@plt>
jmp    1240 <main+0x110>
xor    %eax,%eax
add    $0x1b8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@EOF = global i64 0
@.str.1 = [15 x i8] c"button_clicked\00"
@.str.2 = [15 x i8] c"cycle_complete\00"
@.str.3 = [14 x i8] c"Door: CLOSED\0A\00"
@.str.4 = [15 x i8] c"Door: OPENING\0A\00"
@.str.5 = [29 x i8] c"Door: STOPPED_WHILE_OPENING\0A\00"
@.str.6 = [29 x i8] c"Door: STOPPED_WHILE_CLOSING\0A\00"
@.str.7 = [15 x i8] c"Door: CLOSING\0A\00"
@.str.8 = [12 x i8] c"Door: OPEN\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x i32]
%4 = alloca i32
%5 = alloca [25 x i8]
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %4
%6 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 0
store i32 0, i32* %6
br label %7
7: ; preds = %118, %0
%8 = getelementptr inbounds [25 x i8], [25 x i8]* %5, i64 0, i64 0
%9 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i64, i64* @EOF
%11 = icmp ne i64 %9, %10
br i1 %11, label %12, label %121
12: ; preds = %7
%13 = getelementptr inbounds [25 x i8], [25 x i8]* %5, i64 0, i64 0
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 0, i32* %2
br label %17
17: ; preds = %16, %12
%18 = getelementptr inbounds [25 x i8], [25 x i8]* %5, i64 0, i64 0
%19 = call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %17
store i32 1, i32* %2
br label %22
22: ; preds = %21, %17
%23 = load i32, i32* %2
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %92
25: ; preds = %22
%26 = load i32, i32* %4
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %27
%29 = load i32, i32* %28
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %36
31: ; preds = %25
%32 = load i32, i32* %4
%33 = add nsw i32 %32, 1
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %34
store i32 1, i32* %35
br label %36
36: ; preds = %31, %25
%37 = load i32, i32* %4
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %38
%40 = load i32, i32* %39
%41 = icmp eq i32 %40, 1
br i1 %41, label %42, label %47
42: ; preds = %36
%43 = load i32, i32* %4
%44 = add nsw i32 %43, 1
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %45
store i32 2, i32* %46
br label %47
47: ; preds = %42, %36
%48 = load i32, i32* %4
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %49
%51 = load i32, i32* %50
%52 = icmp eq i32 %51, 2
br i1 %52, label %53, label %58
53: ; preds = %47
%54 = load i32, i32* %4
%55 = add nsw i32 %54, 1
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %56
store i32 4, i32* %57
br label %58
58: ; preds = %53, %47
%59 = load i32, i32* %4
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %60
%62 = load i32, i32* %61
%63 = icmp eq i32 %62, 3
br i1 %63, label %64, label %69
64: ; preds = %58
%65 = load i32, i32* %4
%66 = add nsw i32 %65, 1
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %67
store i32 1, i32* %68
br label %69
69: ; preds = %64, %58
%70 = load i32, i32* %4
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %71
%73 = load i32, i32* %72
%74 = icmp eq i32 %73, 4
br i1 %74, label %75, label %80
75: ; preds = %69
%76 = load i32, i32* %4
%77 = add nsw i32 %76, 1
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %78
store i32 3, i32* %79
br label %80
80: ; preds = %75, %69
%81 = load i32, i32* %4
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %82
%84 = load i32, i32* %83
%85 = icmp eq i32 %84, 5
br i1 %85, label %86, label %91
86: ; preds = %80
%87 = load i32, i32* %4
%88 = add nsw i32 %87, 1
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %89
store i32 4, i32* %90
br label %91
91: ; preds = %86, %80
br label %92
92: ; preds = %91, %22
%93 = load i32, i32* %2
%94 = icmp eq i32 %93, 1
br i1 %94, label %95, label %118
95: ; preds = %92
%96 = load i32, i32* %4
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %97
%99 = load i32, i32* %98
%100 = icmp eq i32 %99, 1
br i1 %100, label %101, label %106
101: ; preds = %95
%102 = load i32, i32* %4
%103 = add nsw i32 %102, 1
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %104
store i32 5, i32* %105
br label %106
106: ; preds = %101, %95
%107 = load i32, i32* %4
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %108
%110 = load i32, i32* %109
%111 = icmp eq i32 %110, 4
br i1 %111, label %112, label %117
112: ; preds = %106
%113 = load i32, i32* %4
%114 = add nsw i32 %113, 1
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %115
store i32 0, i32* %116
br label %117
117: ; preds = %112, %106
br label %118
118: ; preds = %117, %92
%119 = load i32, i32* %4
%120 = add nsw i32 %119, 1
store i32 %120, i32* %4
br label %7
121: ; preds = %7
store i32 0, i32* %2
br label %122
122: ; preds = %175, %121
%123 = load i32, i32* %2
%124 = load i32, i32* %4
%125 = icmp sle i32 %123, %124
br i1 %125, label %126, label %178
126: ; preds = %122
%127 = load i32, i32* %2
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %128
%130 = load i32, i32* %129
%131 = icmp eq i32 %130, 0
br i1 %131, label %132, label %134
132: ; preds = %126
%133 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
br label %134
134: ; preds = %132, %126
%135 = load i32, i32* %2
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %136
%138 = load i32, i32* %137
%139 = icmp eq i32 %138, 1
br i1 %139, label %140, label %142
140: ; preds = %134
%141 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
br label %142
142: ; preds = %140, %134
%143 = load i32, i32* %2
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %144
%146 = load i32, i32* %145
%147 = icmp eq i32 %146, 2
br i1 %147, label %148, label %150
148: ; preds = %142
%149 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
br label %150
150: ; preds = %148, %142
%151 = load i32, i32* %2
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %152
%154 = load i32, i32* %153
%155 = icmp eq i32 %154, 3
br i1 %155, label %156, label %158
156: ; preds = %150
%157 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0))
br label %158
158: ; preds = %156, %150
%159 = load i32, i32* %2
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %160
%162 = load i32, i32* %161
%163 = icmp eq i32 %162, 4
br i1 %163, label %164, label %166
164: ; preds = %158
%165 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
br label %166
166: ; preds = %164, %158
%167 = load i32, i32* %2
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %168
%170 = load i32, i32* %169
%171 = icmp eq i32 %170, 5
br i1 %171, label %172, label %174
172: ; preds = %166
%173 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
br label %174
174: ; preds = %172, %166
br label %175
175: ; preds = %174
%176 = load i32, i32* %2
%177 = add nsw i32 %176, 1
store i32 %177, i32* %2
br label %122
178: ; preds = %122
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@EOF = global i64 0
@.str.1 = [15 x i8] c"button_clicked\00"
@.str.2 = [15 x i8] c"cycle_complete\00"
@str = [11 x i8] c"Door: OPEN\00"
@str.9 = [14 x i8] c"Door: CLOSING\00"
@str.10 = [28 x i8] c"Door: STOPPED_WHILE_CLOSING\00"
@str.11 = [28 x i8] c"Door: STOPPED_WHILE_OPENING\00"
@str.12 = [14 x i8] c"Door: OPENING\00"
@str.13 = [13 x i8] c"Door: CLOSED\00"
@switch.table.main = [6 x i32] [i32 1, i32 2, i32 4, i32 1, i32 3, i32 4]
@reltable.main = [6 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @str.13 to i64), i64 ptrtoint ([6 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @str.12 to i64), i64 ptrtoint ([6 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([28 x i8]* @str.11 to i64), i64 ptrtoint ([6 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([28 x i8]* @str.10 to i64), i64 ptrtoint ([6 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @str.9 to i64), i64 ptrtoint ([6 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @str to i64), i64 ptrtoint ([6 x i32]* @reltable.main to i64)) to i32)]
define i32 @main() {
%1 = alloca [100 x i32]
%2 = alloca [25 x i8]
%3 = bitcast [100 x i32]* %1 to i8*
%4 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
store i32 0, i32* %5
%6 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%7 = load i64, i64* @EOF
%8 = icmp eq i64 %6, %7
br i1 %8, label %12, label %14
9: ; preds = %39
%10 = add i64 %15, 2
%11 = and i64 %10, 4294967295
br label %12
12: ; preds = %9, %0
%13 = phi i64 [ 1, %0 ], [ %11, %9 ]
br label %44
14: ; preds = %0, %39
%15 = phi i64 [ %40, %39 ], [ 0, %0 ]
%16 = phi i32 [ %22, %39 ], [ 0, %0 ]
%17 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
%19 = select i1 %18, i32 0, i32 %16
%20 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
%22 = select i1 %21, i32 1, i32 %19
switch i32 %22, label %39 [
i32 0, label %23
i32 1, label %27
]
23: ; preds = %14
%24 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %15
%25 = load i32, i32* %24
%26 = icmp ult i32 %25, 6
br i1 %26, label %31, label %39
27: ; preds = %14
%28 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %15
%29 = load i32, i32* %28
switch i32 %29, label %39 [
i32 1, label %35
i32 4, label %30
]
30: ; preds = %27
br label %35
31: ; preds = %23
%32 = sext i32 %25 to i64
%33 = getelementptr inbounds [6 x i32], [6 x i32]* @switch.table.main, i64 0, i64 %32
%34 = load i32, i32* %33
br label %35
35: ; preds = %31, %27, %30
%36 = phi i32 [ 0, %30 ], [ 5, %27 ], [ %34, %31 ]
%37 = add nuw nsw i64 %15, 1
%38 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %37
store i32 %36, i32* %38
br label %39
39: ; preds = %23, %35, %27, %14
%40 = add nuw i64 %15, 1
%41 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%42 = load i64, i64* @EOF
%43 = icmp eq i64 %41, %42
br i1 %43, label %9, label %14
44: ; preds = %12, %54
%45 = phi i64 [ 0, %12 ], [ %55, %54 ]
%46 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %45
%47 = load i32, i32* %46
%48 = icmp ult i32 %47, 6
br i1 %48, label %49, label %54
49: ; preds = %44
%50 = sext i32 %47 to i64
%51 = shl i64 %50, 2
%52 = call i8* @llvm.load.relative.i64(i8* bitcast ([6 x i32]* @reltable.main to i8*), i64 %51)
%53 = call i32 @puts(i8* dereferenceable(1) %52)
br label %54
54: ; preds = %44, %49
%55 = add nuw nsw i64 %45, 1
%56 = icmp eq i64 %55, %13
br i1 %56, label %57, label %44
57: ; preds = %54
ret i32 0
}