#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 */
char EOF;
char getchar();
int /*<<< orphan*/ printf(char *);
int strlen(char *);
int main() {
  char s[400];
  int i, j, st[20];
  st[0] = 1;
  for (i = 0;; i++) {
    s[i] = getchar();
    if (s[i] == EOF)
      break;
    while (1)
      if (getchar() == '\n')
        break;
  }
  for (i = 0; i < strlen(s); i++) {
    if (s[i] == 'b') {
      if (st[i] == 1)
        st[i + 1] = 2;
      if (st[i] == 2)
        st[i + 1] = 6;
      if (st[i] == 3)
        st[i + 1] = 4;
      if (st[i] == 4)
        st[i + 1] = 5;
      if (st[i] == 5)
        st[i + 1] = 2;
      if (st[i] == 6)
        st[i + 1] = 4;
    } else {
      if (st[i] == 2)
        st[i + 1] = 3;
      if (st[i] == 4)
        st[i + 1] = 1;
    }
  }
  for (j = 0; j < i + 2; j++) {
    if (st[j] == 1)
      printf("Door: CLOSED\n");
    if (st[j] == 2)
      printf("Door: OPENING\n");
    if (st[j] == 3)
      printf("Door: OPEN\n");
    if (st[j] == 4)
      printf("Door: CLOSING\n");
    if (st[j] == 5)
      printf("Door: STOPPED_WHILE_CLOSING\n");
    if (st[j] == 6)
      printf("Door: STOPPED_WHILE_OPENING\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x200(%rbp)
movl   $0x0,-0x1a4(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,%cl
movslq -0x1a4(%rbp),%rax
mov    %cl,-0x1a0(%rbp,%rax,1)
movslq -0x1a4(%rbp),%rax
movsbl -0x1a0(%rbp,%rax,1),%eax
ff
mov    0x2e65(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1193 <main+0x63>
jmp    11ce <main+0x9e>
jmp    1198 <main+0x68>
mov    $0x0,%al
call   1050 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
jne    11b0 <main+0x80>
jmp    11b5 <main+0x85>
jmp    1198 <main+0x68>
jmp    11ba <main+0x8a>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    1156 <main+0x26>
movl   $0x0,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
mov    %eax,-0x204(%rbp)
lea    -0x1a0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x204(%rbp),%eax
cmp    %ecx,%eax
jge    1393 <main+0x263>
movslq -0x1a4(%rbp),%rax
movsbl -0x1a0(%rbp,%rax,1),%eax
ff
cmp    $0x62,%eax
jne    131f <main+0x1ef>
movslq -0x1a4(%rbp),%rax
cmpl   $0x1,-0x200(%rbp,%rax,4)
01
jne    1243 <main+0x113>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
cltq
movl   $0x2,-0x200(%rbp,%rax,4)
movslq -0x1a4(%rbp),%rax
cmpl   $0x2,-0x200(%rbp,%rax,4)
02
jne    126e <main+0x13e>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
cltq
movl   $0x6,-0x200(%rbp,%rax,4)
movslq -0x1a4(%rbp),%rax
cmpl   $0x3,-0x200(%rbp,%rax,4)
03
jne    1299 <main+0x169>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
cltq
movl   $0x4,-0x200(%rbp,%rax,4)
movslq -0x1a4(%rbp),%rax
cmpl   $0x4,-0x200(%rbp,%rax,4)
04
jne    12c4 <main+0x194>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
cltq
movl   $0x5,-0x200(%rbp,%rax,4)
movslq -0x1a4(%rbp),%rax
cmpl   $0x5,-0x200(%rbp,%rax,4)
05
jne    12ef <main+0x1bf>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
cltq
movl   $0x2,-0x200(%rbp,%rax,4)
movslq -0x1a4(%rbp),%rax
cmpl   $0x6,-0x200(%rbp,%rax,4)
06
jne    131a <main+0x1ea>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
cltq
movl   $0x4,-0x200(%rbp,%rax,4)
jmp    137a <main+0x24a>
movslq -0x1a4(%rbp),%rax
cmpl   $0x2,-0x200(%rbp,%rax,4)
02
jne    134a <main+0x21a>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
cltq
movl   $0x3,-0x200(%rbp,%rax,4)
movslq -0x1a4(%rbp),%rax
cmpl   $0x4,-0x200(%rbp,%rax,4)
04
jne    1375 <main+0x245>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
cltq
movl   $0x1,-0x200(%rbp,%rax,4)
jmp    137a <main+0x24a>
jmp    137f <main+0x24f>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    11d8 <main+0xa8>
movl   $0x0,-0x1a8(%rbp)
mov    -0x1a8(%rbp),%eax
mov    -0x1a4(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
jge    1493 <main+0x363>
movslq -0x1a8(%rbp),%rax
cmpl   $0x1,-0x200(%rbp,%rax,4)
01
jne    13d5 <main+0x2a5>
lea    0xc30(%rip),%rdi
call   1040 <printf@plt>
movslq -0x1a8(%rbp),%rax
cmpl   $0x2,-0x200(%rbp,%rax,4)
02
jne    13f6 <main+0x2c6>
lea    0xc1d(%rip),%rdi
call   1040 <printf@plt>
movslq -0x1a8(%rbp),%rax
cmpl   $0x3,-0x200(%rbp,%rax,4)
03
jne    1417 <main+0x2e7>
lea    0xc0b(%rip),%rdi
call   1040 <printf@plt>
movslq -0x1a8(%rbp),%rax
cmpl   $0x4,-0x200(%rbp,%rax,4)
04
jne    1438 <main+0x308>
lea    0xbf6(%rip),%rdi
call   1040 <printf@plt>
movslq -0x1a8(%rbp),%rax
cmpl   $0x5,-0x200(%rbp,%rax,4)
05
jne    1459 <main+0x329>
lea    0xbe4(%rip),%rdi
call   1040 <printf@plt>
movslq -0x1a8(%rbp),%rax
cmpl   $0x6,-0x200(%rbp,%rax,4)
06
jne    147a <main+0x34a>
lea    0xbe0(%rip),%rdi
call   1040 <printf@plt>
jmp    147f <main+0x34f>
mov    -0x1a8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a8(%rbp)
jmp    139d <main+0x26d>
xor    %eax,%eax
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x1e8,%rsp
movl   $0x1,(%rsp)
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %al,0x50(%rsp)
mov    0x2e91(%rip),%r14
cmp    (%r14),%al
je     1182 <main+0x52>
xor    %ebx,%ebx
xchg   %ax,%ax
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    $0xa,%al
jne    1160 <main+0x30>
lea    0x1(%rbx),%r15
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %al,0x51(%rsp,%rbx,1)
mov    %r15,%rbx
cmp    (%r14),%al
jne    1160 <main+0x30>
lea    0x50(%rsp),%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    11f7 <main+0xc7>
xor    %r12d,%r12d
lea    0xed2(%rip),%r15
lea    0x50(%rsp),%r14
jmp    11be <main+0x8e>
mov    $0x3,%eax
mov    %eax,0x4(%rsp,%r12,4)
add    $0x1,%r12
mov    %r14,%rdi
call   1040 <strlen@plt>
cltq
cmp    %rax,%r12
jge    11f1 <main+0xc1>
cmpb   $0x62,0x50(%rsp,%r12,1)
mov    (%rsp,%r12,4),%eax
jne    11e0 <main+0xb0>
add    $0xffffffff,%eax
cmp    $0x6,%eax
jae    11ab <main+0x7b>
cltq
mov    (%r15,%rax,4),%eax
jmp    11a6 <main+0x76>
nopw   0x0(%rax,%rax,1)
cmp    $0x2,%eax
je     11a1 <main+0x71>
cmp    $0x4,%eax
jne    11ab <main+0x7b>
mov    $0x1,%eax
jmp    11a6 <main+0x76>
add    $0x2,%r12
jmp    11fd <main+0xcd>
mov    $0x2,%r12d
xor    %ebx,%ebx
lea    0xe7e(%rip),%r14
jmp    1219 <main+0xe9>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %rbx,%r12
je     1234 <main+0x104>
mov    (%rsp,%rbx,4),%eax
add    $0xffffffff,%eax
cmp    $0x5,%eax
ja     1210 <main+0xe0>
cltq
movslq (%r14,%rax,4),%rdi
add    %r14,%rdi
call   1030 <puts@plt>
jmp    1210 <main+0xe0>
xor    %eax,%eax
add    $0x1e8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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