#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() {
  char command[20];
  int condition = 0;
  printf("Door: CLOSED");
  scanf("%s", command);
  while (1) {
    if (condition == 0) {
      if (strcmp(command, "button_clicked") == 0) {
        condition = 2;
        printf("\nDoor: OPENING");
        if (scanf("%s", command) == EOF)
          break;
      }
    }
    if (condition == 1) {
      if (strcmp(command, "button_clicked") == 0) {
        condition = -2;
        printf("\nDoor: CLOSING");
        if (scanf("%s", command) == EOF)
          break;
      }
    }
    if (condition == 2) {
      if (strcmp(command, "button_clicked") == 0) {
        condition = 3;
        printf("\nDoor: STOPPED_WHILE_OPENING");
        if (scanf("%s", command) == EOF)
          break;
      }
      if (strcmp(command, "cycle_complete") == 0) {
        condition = 1;
        printf("\nDoor: OPEN");
        if (scanf("%s", command) == EOF)
          break;
      }
    }
    if (condition == -2) {
      if (strcmp(command, "button_clicked") == 0) {
        condition = -3;
        printf("\nDoor: STOPPED_WHILE_CLOSING");
        if (scanf("%s", command) == EOF)
          break;
      }
      if (strcmp(command, "cycle_complete") == 0) {
        condition = 0;
        printf("\nDoor: CLOSED");
        if (scanf("%s", command) == EOF)
          break;
      }
    }
    if (condition == 3) {
      if (strcmp(command, "button_clicked") == 0) {
        condition = -2;
        printf("\nDoor: CLOSING");
        if (scanf("%s", command) == EOF)
          break;
      }
    }
    if (condition == -3) {
      if (strcmp(command, "button_clicked") == 0) {
        condition = 2;
        printf("\nDoor: OPENING");
        if (scanf("%s", command) == EOF)
          break;
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x24(%rbp)
lea    0xf39(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1050 <scanf@plt>
cmpl   $0x0,-0x24(%rbp)
jne    11c8 <main+0x98>
lea    -0x20(%rbp),%rdi
lea    0xe8c(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11c3 <main+0x93>
movl   $0x2,-0x24(%rbp)
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xe5c(%rip),%rdi
call   1050 <scanf@plt>
mov    0x2e38(%rip),%rcx
cmp    (%rcx),%rax
jne    11be <main+0x8e>
jmp    1479 <main+0x349>
jmp    11c3 <main+0x93>
jmp    11c8 <main+0x98>
cmpl   $0x1,-0x24(%rbp)
jne    122e <main+0xfe>
lea    -0x20(%rbp),%rdi
lea    0xe26(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1229 <main+0xf9>
movl   $0xfffffffe,-0x24(%rbp)
lea    0xe27(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xdf6(%rip),%rdi
call   1050 <scanf@plt>
mov    0x2dd2(%rip),%rcx
cmp    (%rcx),%rax
jne    1224 <main+0xf4>
jmp    1479 <main+0x349>
jmp    1229 <main+0xf9>
jmp    122e <main+0xfe>
cmpl   $0x2,-0x24(%rbp)
jne    12eb <main+0x1bb>
lea    -0x20(%rbp),%rdi
lea    0xdc0(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    128f <main+0x15f>
movl   $0x3,-0x24(%rbp)
lea    0xdd0(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xd90(%rip),%rdi
call   1050 <scanf@plt>
mov    0x2d6c(%rip),%rcx
cmp    (%rcx),%rax
jne    128a <main+0x15a>
jmp    1479 <main+0x349>
jmp    128f <main+0x15f>
lea    -0x20(%rbp),%rdi
lea    0xdb3(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    12e6 <main+0x1b6>
movl   $0x1,-0x24(%rbp)
lea    0xda5(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xd39(%rip),%rdi
call   1050 <scanf@plt>
mov    0x2d15(%rip),%rcx
cmp    (%rcx),%rax
jne    12e1 <main+0x1b1>
jmp    1479 <main+0x349>
jmp    12e6 <main+0x1b6>
jmp    12eb <main+0x1bb>
cmpl   $0xfffffffe,-0x24(%rbp)
jne    13a8 <main+0x278>
lea    -0x20(%rbp),%rdi
lea    0xd03(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    134c <main+0x21c>
movl   $0xfffffffd,-0x24(%rbp)
lea    0xd4b(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xcd3(%rip),%rdi
call   1050 <scanf@plt>
mov    0x2caf(%rip),%rcx
cmp    (%rcx),%rax
jne    1347 <main+0x217>
jmp    1479 <main+0x349>
jmp    134c <main+0x21c>
lea    -0x20(%rbp),%rdi
lea    0xcf6(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    13a3 <main+0x273>
movl   $0x0,-0x24(%rbp)
lea    0xd11(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xc7c(%rip),%rdi
call   1050 <scanf@plt>
mov    0x2c58(%rip),%rcx
cmp    (%rcx),%rax
jne    139e <main+0x26e>
jmp    1479 <main+0x349>
jmp    13a3 <main+0x273>
jmp    13a8 <main+0x278>
cmpl   $0x3,-0x24(%rbp)
jne    140e <main+0x2de>
lea    -0x20(%rbp),%rdi
lea    0xc46(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1409 <main+0x2d9>
movl   $0xfffffffe,-0x24(%rbp)
lea    0xc47(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xc16(%rip),%rdi
call   1050 <scanf@plt>
mov    0x2bf2(%rip),%rcx
cmp    (%rcx),%rax
jne    1404 <main+0x2d4>
jmp    1479 <main+0x349>
jmp    1409 <main+0x2d9>
jmp    140e <main+0x2de>
cmpl   $0xfffffffd,-0x24(%rbp)
jne    1474 <main+0x344>
lea    -0x20(%rbp),%rdi
lea    0xbe0(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    146f <main+0x33f>
movl   $0x2,-0x24(%rbp)
lea    0xbd2(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xbb0(%rip),%rdi
call   1050 <scanf@plt>
mov    0x2b8c(%rip),%rcx
cmp    (%rcx),%rax
jne    146a <main+0x33a>
jmp    1479 <main+0x349>
jmp    146f <main+0x33f>
jmp    1474 <main+0x344>
jmp    1162 <main+0x32>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xf55(%rip),%rdi
call   1030 <printf@plt>
lea    0xec3(%rip),%r14
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
xor    %ebp,%ebp
lea    0xeaf(%rip),%r15
mov    0x2e79(%rip),%r13
lea    0xe8a(%rip),%r12
jmp    119e <main+0x6e>
lea    0xef1(%rip),%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    $0x1,%ebp
cmp    0x0(%r13),%rax
je     1369 <main+0x239>
lea    0x2(%rbp),%eax
cmp    $0x4,%eax
ja     123c <main+0x10c>
movslq (%r12,%rax,4),%rax
add    %r12,%rax
jmp    *%rax
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <strcmp@plt>
mov    $0x0,%ebp
test   %rax,%rax
jne    119e <main+0x6e>
lea    0xe57(%rip),%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
cmp    0x0(%r13),%rax
je     1369 <main+0x239>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <strcmp@plt>
mov    $0x2,%ebp
test   %rax,%rax
jne    1224 <main+0xf4>
lea    0xe3f(%rip),%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    $0x3,%ebp
cmp    0x0(%r13),%rax
je     1369 <main+0x239>
mov    %rbx,%rdi
lea    0xe33(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1178 <main+0x48>
cmp    $0x3,%ebp
jne    1305 <main+0x1d5>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <strcmp@plt>
mov    $0x3,%ebp
test   %rax,%rax
jne    119e <main+0x6e>
lea    0xdd0(%rip),%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    $0xfffffffe,%ebp
jmp    1194 <main+0x64>
nop
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <strcmp@plt>
mov    $0x1,%ebp
test   %rax,%rax
jne    119e <main+0x6e>
lea    0xd95(%rip),%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
cmp    0x0(%r13),%rax
je     1369 <main+0x239>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <strcmp@plt>
mov    $0xfffffffe,%ebp
test   %rax,%rax
jne    12f1 <main+0x1c1>
lea    0xda6(%rip),%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    $0xfffffffd,%ebp
cmp    0x0(%r13),%rax
je     1369 <main+0x239>
mov    %rbx,%rdi
lea    0xd66(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1348 <main+0x218>
cmp    $0xfffffffd,%ebp
jne    119e <main+0x6e>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <strcmp@plt>
mov    $0xfffffffd,%ebp
test   %rax,%rax
jne    119e <main+0x6e>
lea    0xcf8(%rip),%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    $0x2,%ebp
jmp    1194 <main+0x64>
lea    0xd4a(%rip),%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    $0x0,%ebp
jmp    1194 <main+0x64>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Door: CLOSED\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [15 x i8] c"button_clicked\00"
@.str.3 = [15 x i8] c"\0ADoor: OPENING\00"
@EOF = global i64 0
@.str.4 = [15 x i8] c"\0ADoor: CLOSING\00"
@.str.5 = [29 x i8] c"\0ADoor: STOPPED_WHILE_OPENING\00"
@.str.6 = [15 x i8] c"cycle_complete\00"
@.str.7 = [12 x i8] c"\0ADoor: OPEN\00"
@.str.8 = [29 x i8] c"\0ADoor: STOPPED_WHILE_CLOSING\00"
@.str.9 = [14 x i8] c"\0ADoor: CLOSED\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%6 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
br label %7
7: ; preds = %0, %127
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %23
10: ; preds = %7
%11 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%12 = call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %22
14: ; preds = %10
store i32 2, i32* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%16 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%17 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %16)
%18 = load i64, i64* @EOF
%19 = icmp eq i64 %17, %18
br i1 %19, label %20, label %21
20: ; preds = %14
br label %128
21: ; preds = %14
br label %22
22: ; preds = %21, %10
br label %23
23: ; preds = %22, %7
%24 = load i32, i32* %3
%25 = icmp eq i32 %24, 1
br i1 %25, label %26, label %39
26: ; preds = %23
%27 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%28 = call i64 @strcmp(i8* %27, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %38
30: ; preds = %26
store i32 -2, i32* %3
%31 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%32 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%33 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %32)
%34 = load i64, i64* @EOF
%35 = icmp eq i64 %33, %34
br i1 %35, label %36, label %37
36: ; preds = %30
br label %128
37: ; preds = %30
br label %38
38: ; preds = %37, %26
br label %39
39: ; preds = %38, %23
%40 = load i32, i32* %3
%41 = icmp eq i32 %40, 2
br i1 %41, label %42, label %67
42: ; preds = %39
%43 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%44 = call i64 @strcmp(i8* %43, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %54
46: ; preds = %42
store i32 3, i32* %3
%47 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%48 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%49 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %48)
%50 = load i64, i64* @EOF
%51 = icmp eq i64 %49, %50
br i1 %51, label %52, label %53
52: ; preds = %46
br label %128
53: ; preds = %46
br label %54
54: ; preds = %53, %42
%55 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%56 = call i64 @strcmp(i8* %55, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
%57 = icmp eq i64 %56, 0
br i1 %57, label %58, label %66
58: ; preds = %54
store i32 1, i32* %3
%59 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
%60 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%61 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %60)
%62 = load i64, i64* @EOF
%63 = icmp eq i64 %61, %62
br i1 %63, label %64, label %65
64: ; preds = %58
br label %128
65: ; preds = %58
br label %66
66: ; preds = %65, %54
br label %67
67: ; preds = %66, %39
%68 = load i32, i32* %3
%69 = icmp eq i32 %68, -2
br i1 %69, label %70, label %95
70: ; preds = %67
%71 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%72 = call i64 @strcmp(i8* %71, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%73 = icmp eq i64 %72, 0
br i1 %73, label %74, label %82
74: ; preds = %70
store i32 -3, i32* %3
%75 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%76 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%77 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %76)
%78 = load i64, i64* @EOF
%79 = icmp eq i64 %77, %78
br i1 %79, label %80, label %81
80: ; preds = %74
br label %128
81: ; preds = %74
br label %82
82: ; preds = %81, %70
%83 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%84 = call i64 @strcmp(i8* %83, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
%85 = icmp eq i64 %84, 0
br i1 %85, label %86, label %94
86: ; preds = %82
store i32 0, i32* %3
%87 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%88 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%89 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %88)
%90 = load i64, i64* @EOF
%91 = icmp eq i64 %89, %90
br i1 %91, label %92, label %93
92: ; preds = %86
br label %128
93: ; preds = %86
br label %94
94: ; preds = %93, %82
br label %95
95: ; preds = %94, %67
%96 = load i32, i32* %3
%97 = icmp eq i32 %96, 3
br i1 %97, label %98, label %111
98: ; preds = %95
%99 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%100 = call i64 @strcmp(i8* %99, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%101 = icmp eq i64 %100, 0
br i1 %101, label %102, label %110
102: ; preds = %98
store i32 -2, i32* %3
%103 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%104 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%105 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %104)
%106 = load i64, i64* @EOF
%107 = icmp eq i64 %105, %106
br i1 %107, label %108, label %109
108: ; preds = %102
br label %128
109: ; preds = %102
br label %110
110: ; preds = %109, %98
br label %111
111: ; preds = %110, %95
%112 = load i32, i32* %3
%113 = icmp eq i32 %112, -3
br i1 %113, label %114, label %127
114: ; preds = %111
%115 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%116 = call i64 @strcmp(i8* %115, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%117 = icmp eq i64 %116, 0
br i1 %117, label %118, label %126
118: ; preds = %114
store i32 2, i32* %3
%119 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%120 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%121 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %120)
%122 = load i64, i64* @EOF
%123 = icmp eq i64 %121, %122
br i1 %123, label %124, label %125
124: ; preds = %118
br label %128
125: ; preds = %118
br label %126
126: ; preds = %125, %114
br label %127
127: ; preds = %126, %111
br label %7
128: ; preds = %124, %108, %92, %80, %64, %52, %36, %20
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Door: CLOSED\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [15 x i8] c"button_clicked\00"
@.str.3 = [15 x i8] c"\0ADoor: OPENING\00"
@EOF = global i64 0
@.str.4 = [15 x i8] c"\0ADoor: CLOSING\00"
@.str.5 = [29 x i8] c"\0ADoor: STOPPED_WHILE_OPENING\00"
@.str.6 = [15 x i8] c"cycle_complete\00"
@.str.7 = [12 x i8] c"\0ADoor: OPEN\00"
@.str.8 = [29 x i8] c"\0ADoor: STOPPED_WHILE_CLOSING\00"
@.str.9 = [14 x i8] c"\0ADoor: CLOSED\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
br label %5
5: ; preds = %10, %0
%6 = phi i32 [ 0, %0 ], [ %11, %10 ]
switch i32 %6, label %59 [
i32 0, label %7
i32 1, label %17
i32 2, label %25
i32 -2, label %42
]
7: ; preds = %5
%8 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %7, %17, %37, %54, %62, %65, %73, %76, %70
%11 = phi i32 [ 2, %76 ], [ -3, %73 ], [ %71, %70 ], [ 3, %62 ], [ -2, %65 ], [ 0, %54 ], [ 1, %37 ], [ 1, %17 ], [ 0, %7 ]
br label %5
12: ; preds = %7
%13 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%14 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%15 = load i64, i64* @EOF
%16 = icmp eq i64 %14, %15
br i1 %16, label %81, label %25
17: ; preds = %5
%18 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %10
20: ; preds = %17
%21 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%22 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%23 = load i64, i64* @EOF
%24 = icmp eq i64 %22, %23
br i1 %24, label %81, label %42
25: ; preds = %5, %12
%26 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %33
28: ; preds = %25
%29 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%30 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%31 = load i64, i64* @EOF
%32 = icmp eq i64 %30, %31
br i1 %32, label %81, label %33
33: ; preds = %28, %25
%34 = phi i32 [ 3, %28 ], [ 2, %25 ]
%35 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %59
37: ; preds = %33
%38 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
%39 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%40 = load i64, i64* @EOF
%41 = icmp eq i64 %39, %40
br i1 %41, label %81, label %10
42: ; preds = %5, %20
%43 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %50
45: ; preds = %42
%46 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%47 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%48 = load i64, i64* @EOF
%49 = icmp eq i64 %47, %48
br i1 %49, label %81, label %50
50: ; preds = %45, %42
%51 = phi i32 [ -3, %45 ], [ -2, %42 ]
%52 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %70
54: ; preds = %50
%55 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%56 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%57 = load i64, i64* @EOF
%58 = icmp eq i64 %56, %57
br i1 %58, label %81, label %10
59: ; preds = %5, %33
%60 = phi i32 [ %34, %33 ], [ %6, %5 ]
%61 = icmp eq i32 %60, 3
br i1 %61, label %62, label %70
62: ; preds = %59
%63 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%64 = icmp eq i64 %63, 0
br i1 %64, label %65, label %10
65: ; preds = %62
%66 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%67 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%68 = load i64, i64* @EOF
%69 = icmp eq i64 %67, %68
br i1 %69, label %81, label %10
70: ; preds = %50, %59
%71 = phi i32 [ %60, %59 ], [ %51, %50 ]
%72 = icmp eq i32 %71, -3
br i1 %72, label %73, label %10
73: ; preds = %70
%74 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%75 = icmp eq i64 %74, 0
br i1 %75, label %76, label %10
76: ; preds = %73
%77 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%78 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%79 = load i64, i64* @EOF
%80 = icmp eq i64 %78, %79
br i1 %80, label %81, label %10
81: ; preds = %76, %65, %54, %45, %37, %28, %20, %12
ret i32 0
}