#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*/ endwin();
int /*<<< orphan*/ getch();
int /*<<< orphan*/ getstr(char *);
int /*<<< orphan*/ initscr();
void *malloc(int);
int /*<<< orphan*/ printw(char *, ...);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ scanw(char *, char **);
scalar_t__ strncmp(char *, char *, int);
int main() {
  initscr();
  struct player {
    char *name;
    unsigned short age;
    unsigned short health;
    unsigned int level;
    unsigned short location;
    unsigned short active;
    unsigned short inventory[50];
  };
  char input[25] = "";
  struct player *main_character = NULL;
  main_character = malloc(sizeof(struct player));
  main_character->level = 1;
  main_character->location = 0;
  main_character->health = 100;
  main_character->active = 1;
  for (unsigned short i = 0; i < 50; i++) {
    main_character->inventory[i] = 0;
  }
  main_character->name = malloc(sizeof(char) * 15);
  printw("What is your name? (Maximum of 15 characters)\n");
  getstr(main_character->name);
  refresh();
  printw("Welcome, %s\n", main_character->name);
  refresh();
  while (main_character->active == 1) {
    if (main_character->location == 0) {
      printw("You are in a dark room. There is a door to the north.\n");
      refresh();
      scanw("%s", &input);
      if (strncmp(input, "north", 5) == 0 || strncmp(input, "n", 1) == 0) {
        printw("You walk through the doorway.\n");
        refresh();
        main_character->location = 1;
      }
      if (strncmp(input, "exit", 4) == 0 || strncmp(input, "quit", 4) == 0) {
        printw("Exiting game...");
        refresh();
        main_character->active = 0;
      }
    }
    if (main_character->location == 1) {
      printw("You are now in a hallway. There is a light to the west.\n");
      refresh();
      scanw("%s", &input);
      if (strncmp(input, "west", 4) == 0 || strncmp(input, "w", 1) == 0) {
        printw("You are free.\n");
        refresh();
        main_character->active = 0;
      }
    }
  }
  printw("Game over. Press any key to quit.\n");
  refresh();
  getch();
  endwin();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <initscr@plt>
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x19,%edx
call   1050 <memset@plt>
movq   $0x0,-0x28(%rbp)
mov    $0x78,%edi
call   1080 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movl   $0x1,0xc(%rax)
mov    -0x28(%rbp),%rax
movw   $0x0,0x10(%rax)
mov    -0x28(%rbp),%rax
movw   $0x64,0xa(%rax)
mov    -0x28(%rbp),%rax
movw   $0x1,0x12(%rax)
movw   $0x0,-0x2a(%rbp)
movzwl -0x2a(%rbp),%eax
cmp    $0x32,%eax
jge    1238 <main+0x98>
mov    -0x28(%rbp),%rax
movzwl -0x2a(%rbp),%ecx
movw   $0x0,0x14(%rax,%rcx,2)
mov    -0x2a(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x2a(%rbp)
jmp    120b <main+0x6b>
mov    $0xf,%edi
call   1080 <malloc@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
lea    0xdad(%rip),%rdi
mov    $0x0,%al
call   1070 <printw@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
call   1060 <getstr@plt>
mov    $0x0,%al
call   1090 <refresh@plt>
mov    -0x28(%rbp),%rax
mov    (%rax),%rsi
lea    0xdb4(%rip),%rdi
mov    $0x0,%al
call   1070 <printw@plt>
mov    $0x0,%al
call   1090 <refresh@plt>
mov    -0x28(%rbp),%rax
movzwl 0x12(%rax),%eax
cmp    $0x1,%eax
jne    142c <main+0x28c>
mov    -0x28(%rbp),%rax
movzwl 0x10(%rax),%eax
cmp    $0x0,%eax
jne    138f <main+0x1ef>
lea    0xd8a(%rip),%rdi
mov    $0x0,%al
call   1070 <printw@plt>
mov    $0x0,%al
call   1090 <refresh@plt>
lea    -0x20(%rbp),%rsi
lea    0xda8(%rip),%rdi
call   10c0 <scanw@plt>
lea    -0x20(%rbp),%rdi
lea    0xd9b(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     130e <main+0x16e>
lea    -0x20(%rbp),%rdi
lea    0xd82(%rip),%rsi
mov    $0x1,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    132d <main+0x18d>
lea    0xd69(%rip),%rdi
mov    $0x0,%al
call   1070 <printw@plt>
mov    $0x0,%al
call   1090 <refresh@plt>
mov    -0x28(%rbp),%rax
movw   $0x1,0x10(%rax)
lea    -0x20(%rbp),%rdi
lea    0xd65(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     136b <main+0x1cb>
lea    -0x20(%rbp),%rdi
lea    0xd4b(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    138a <main+0x1ea>
lea    0xd35(%rip),%rdi
mov    $0x0,%al
call   1070 <printw@plt>
mov    $0x0,%al
call   1090 <refresh@plt>
mov    -0x28(%rbp),%rax
movw   $0x0,0x12(%rax)
jmp    138f <main+0x1ef>
mov    -0x28(%rbp),%rax
movzwl 0x10(%rax),%eax
cmp    $0x1,%eax
jne    1427 <main+0x287>
lea    0xd10(%rip),%rdi
mov    $0x0,%al
call   1070 <printw@plt>
mov    $0x0,%al
call   1090 <refresh@plt>
lea    -0x20(%rbp),%rsi
lea    0xcb3(%rip),%rdi
call   10c0 <scanw@plt>
lea    -0x20(%rbp),%rdi
lea    0xd20(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     1403 <main+0x263>
lea    -0x20(%rbp),%rdi
lea    0xd06(%rip),%rsi
mov    $0x1,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1422 <main+0x282>
lea    0xced(%rip),%rdi
mov    $0x0,%al
call   1070 <printw@plt>
mov    $0x0,%al
call   1090 <refresh@plt>
mov    -0x28(%rbp),%rax
movw   $0x0,0x12(%rax)
jmp    1427 <main+0x287>
jmp    1289 <main+0xe9>
lea    0xcd3(%rip),%rdi
mov    $0x0,%al
call   1070 <printw@plt>
mov    $0x0,%al
call   1090 <refresh@plt>
mov    $0x0,%al
call   10a0 <getch@plt>
mov    $0x0,%al
call   10b0 <endwin@plt>
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    $0x28,%rsp
xor    %eax,%eax
call   1040 <initscr@plt>
xorps  %xmm0,%xmm0
movups %xmm0,0x9(%rsp)
movaps %xmm0,(%rsp)
mov    $0xf,%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
lea    0xe3b(%rip),%rdi
xor    %eax,%eax
call   1060 <printw@plt>
mov    %rbx,%rdi
call   1050 <getstr@plt>
xor    %eax,%eax
call   1080 <refresh@plt>
lea    0xe4d(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printw@plt>
xor    %eax,%eax
call   1080 <refresh@plt>
lea    0xe79(%rip),%r15
mov    %rsp,%rbx
lea    0xeb3(%rip),%r13
lea    0xee5(%rip),%r14
xor    %r12d,%r12d
jmp    1219 <main+0x89>
test   %bpl,%bpl
je     1351 <main+0x1c1>
mov    $0x1,%bpl
test   %r12w,%r12w
jne    12e3 <main+0x153>
lea    0xe0f(%rip),%rdi
xor    %eax,%eax
call   1060 <printw@plt>
xor    %eax,%eax
call   1080 <refresh@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   10b0 <scanw@plt>
mov    %rbx,%rdi
lea    0xe26(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1280 <main+0xf0>
mov    %rbx,%rdi
lea    0xe13(%rip),%rsi
mov    $0x1,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1280 <main+0xf0>
xor    %r12d,%r12d
jmp    129a <main+0x10a>
nopl   (%rax)
lea    0xdf7(%rip),%rdi
xor    %eax,%eax
call   1060 <printw@plt>
xor    %eax,%eax
call   1080 <refresh@plt>
mov    $0x1,%r12w
mov    %rbx,%rdi
lea    0xdf9(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12cc <main+0x13c>
mov    %rbx,%rdi
lea    0xde5(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    12e3 <main+0x153>
xor    %ebp,%ebp
lea    0xdd2(%rip),%rdi
xor    %eax,%eax
call   1060 <printw@plt>
xor    %eax,%eax
call   1080 <refresh@plt>
cmp    $0x1,%r12w
jne    1210 <main+0x80>
mov    %r13,%rdi
xor    %eax,%eax
call   1060 <printw@plt>
xor    %eax,%eax
call   1080 <refresh@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   10b0 <scanw@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     133c <main+0x1ac>
mov    %rbx,%rdi
lea    0xdcc(%rip),%rsi
mov    $0x1,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    1210 <main+0x80>
lea    0xdb4(%rip),%rdi
xor    %eax,%eax
call   1060 <printw@plt>
xor    %eax,%eax
call   1080 <refresh@plt>
lea    0xdae(%rip),%rdi
xor    %eax,%eax
call   1060 <printw@plt>
xor    %eax,%eax
call   1080 <refresh@plt>
xor    %eax,%eax
call   1090 <getch@plt>
xor    %eax,%eax
call   10a0 <endwin@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.player = type { i8*, i16, i16, i32, i16, i16, [50 x i16] }
@.str = [47 x i8] c"What is your name? (Maximum of 15 characters)\0A\00"
@.str.1 = [13 x i8] c"Welcome, %s\0A\00"
@.str.2 = [55 x i8] c"You are in a dark room. There is a door to the north.\0A\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [6 x i8] c"north\00"
@.str.5 = [2 x i8] c"n\00"
@.str.6 = [31 x i8] c"You walk through the doorway.\0A\00"
@.str.7 = [5 x i8] c"exit\00"
@.str.8 = [5 x i8] c"quit\00"
@.str.9 = [16 x i8] c"Exiting game...\00"
@.str.10 = [57 x i8] c"You are now in a hallway. There is a light to the west.\0A\00"
@.str.11 = [5 x i8] c"west\00"
@.str.12 = [2 x i8] c"w\00"
@.str.13 = [15 x i8] c"You are free.\0A\00"
@.str.14 = [35 x i8] c"Game over. Press any key to quit.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [25 x i8]
%3 = alloca %struct.player*
%4 = alloca i16
store i32 0, i32* %1
%5 = call i32 (...) @initscr()
%6 = bitcast [25 x i8]* %2 to i8*
store %struct.player* null, %struct.player** %3
%7 = call i8* @malloc(i32 120)
%8 = bitcast i8* %7 to %struct.player*
store %struct.player* %8, %struct.player** %3
%9 = load %struct.player*, %struct.player** %3
%10 = getelementptr inbounds %struct.player, %struct.player* %9, i32 0, i32 3
store i32 1, i32* %10
%11 = load %struct.player*, %struct.player** %3
%12 = getelementptr inbounds %struct.player, %struct.player* %11, i32 0, i32 4
store i16 0, i16* %12
%13 = load %struct.player*, %struct.player** %3
%14 = getelementptr inbounds %struct.player, %struct.player* %13, i32 0, i32 2
store i16 100, i16* %14
%15 = load %struct.player*, %struct.player** %3
%16 = getelementptr inbounds %struct.player, %struct.player* %15, i32 0, i32 5
store i16 1, i16* %16
store i16 0, i16* %4
br label %17
17: ; preds = %27, %0
%18 = load i16, i16* %4
%19 = zext i16 %18 to i32
%20 = icmp slt i32 %19, 50
br i1 %20, label %21, label %30
21: ; preds = %17
%22 = load %struct.player*, %struct.player** %3
%23 = getelementptr inbounds %struct.player, %struct.player* %22, i32 0, i32 6
%24 = load i16, i16* %4
%25 = zext i16 %24 to i64
%26 = getelementptr inbounds [50 x i16], [50 x i16]* %23, i64 0, i64 %25
store i16 0, i16* %26
br label %27
27: ; preds = %21
%28 = load i16, i16* %4
%29 = add i16 %28, 1
store i16 %29, i16* %4
br label %17
30: ; preds = %17
%31 = call i8* @malloc(i32 15)
%32 = load %struct.player*, %struct.player** %3
%33 = getelementptr inbounds %struct.player, %struct.player* %32, i32 0, i32 0
store i8* %31, i8** %33
%34 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%35 = load %struct.player*, %struct.player** %3
%36 = getelementptr inbounds %struct.player, %struct.player* %35, i32 0, i32 0
%37 = load i8*, i8** %36
%38 = call i32 @getstr(i8* %37)
%39 = call i32 (...) @refresh()
%40 = load %struct.player*, %struct.player** %3
%41 = getelementptr inbounds %struct.player, %struct.player* %40, i32 0, i32 0
%42 = load i8*, i8** %41
%43 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %42)
%44 = call i32 (...) @refresh()
br label %45
45: ; preds = %112, %30
%46 = load %struct.player*, %struct.player** %3
%47 = getelementptr inbounds %struct.player, %struct.player* %46, i32 0, i32 5
%48 = load i16, i16* %47
%49 = zext i16 %48 to i32
%50 = icmp eq i32 %49, 1
br i1 %50, label %51, label %113
51: ; preds = %45
%52 = load %struct.player*, %struct.player** %3
%53 = getelementptr inbounds %struct.player, %struct.player* %52, i32 0, i32 4
%54 = load i16, i16* %53
%55 = zext i16 %54 to i32
%56 = icmp eq i32 %55, 0
br i1 %56, label %57, label %88
57: ; preds = %51
%58 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0))
%59 = call i32 (...) @refresh()
%60 = bitcast [25 x i8]* %2 to i8**
%61 = call i32 @scanw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %60)
%62 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%63 = call i64 @strncmp(i8* %62, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 5)
%64 = icmp eq i64 %63, 0
br i1 %64, label %69, label %65
65: ; preds = %57
%66 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%67 = call i64 @strncmp(i8* %66, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32 1)
%68 = icmp eq i64 %67, 0
br i1 %68, label %69, label %74
69: ; preds = %65, %57
%70 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0))
%71 = call i32 (...) @refresh()
%72 = load %struct.player*, %struct.player** %3
%73 = getelementptr inbounds %struct.player, %struct.player* %72, i32 0, i32 4
store i16 1, i16* %73
br label %74
74: ; preds = %69, %65
%75 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%76 = call i64 @strncmp(i8* %75, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 4)
%77 = icmp eq i64 %76, 0
br i1 %77, label %82, label %78
78: ; preds = %74
%79 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%80 = call i64 @strncmp(i8* %79, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 4)
%81 = icmp eq i64 %80, 0
br i1 %81, label %82, label %87
82: ; preds = %78, %74
%83 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0))
%84 = call i32 (...) @refresh()
%85 = load %struct.player*, %struct.player** %3
%86 = getelementptr inbounds %struct.player, %struct.player* %85, i32 0, i32 5
store i16 0, i16* %86
br label %87
87: ; preds = %82, %78
br label %88
88: ; preds = %87, %51
%89 = load %struct.player*, %struct.player** %3
%90 = getelementptr inbounds %struct.player, %struct.player* %89, i32 0, i32 4
%91 = load i16, i16* %90
%92 = zext i16 %91 to i32
%93 = icmp eq i32 %92, 1
br i1 %93, label %94, label %112
94: ; preds = %88
%95 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.10, i64 0, i64 0))
%96 = call i32 (...) @refresh()
%97 = bitcast [25 x i8]* %2 to i8**
%98 = call i32 @scanw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %97)
%99 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%100 = call i64 @strncmp(i8* %99, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i32 4)
%101 = icmp eq i64 %100, 0
br i1 %101, label %106, label %102
102: ; preds = %94
%103 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%104 = call i64 @strncmp(i8* %103, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), i32 1)
%105 = icmp eq i64 %104, 0
br i1 %105, label %106, label %111
106: ; preds = %102, %94
%107 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0))
%108 = call i32 (...) @refresh()
%109 = load %struct.player*, %struct.player** %3
%110 = getelementptr inbounds %struct.player, %struct.player* %109, i32 0, i32 5
store i16 0, i16* %110
br label %111
111: ; preds = %106, %102
br label %112
112: ; preds = %111, %88
br label %45
113: ; preds = %45
%114 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0))
%115 = call i32 (...) @refresh()
%116 = call i32 (...) @getch()
%117 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
%struct.player = type { i8*, i16, i16, i32, i16, i16, [50 x i16] }
@.str = [47 x i8] c"What is your name? (Maximum of 15 characters)\0A\00"
@.str.1 = [13 x i8] c"Welcome, %s\0A\00"
@.str.2 = [55 x i8] c"You are in a dark room. There is a door to the north.\0A\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [6 x i8] c"north\00"
@.str.5 = [2 x i8] c"n\00"
@.str.6 = [31 x i8] c"You walk through the doorway.\0A\00"
@.str.7 = [5 x i8] c"exit\00"
@.str.8 = [5 x i8] c"quit\00"
@.str.9 = [16 x i8] c"Exiting game...\00"
@.str.10 = [57 x i8] c"You are now in a hallway. There is a light to the west.\0A\00"
@.str.11 = [5 x i8] c"west\00"
@.str.12 = [2 x i8] c"w\00"
@.str.13 = [15 x i8] c"You are free.\0A\00"
@.str.14 = [35 x i8] c"Game over. Press any key to quit.\0A\00"
define i32 @main() {
%1 = alloca [25 x i8]
%2 = tail call i32 (...) @initscr()
%3 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 0
%4 = tail call dereferenceable_or_null(15) i8* @malloc(i32 15)
%5 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @getstr(i8* %4)
%7 = tail call i32 (...) @refresh()
%8 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%9 = tail call i32 (...) @refresh()
%10 = bitcast [25 x i8]* %1 to i8**
br label %11
11: ; preds = %0, %52
%12 = phi i16 [ 0, %0 ], [ %37, %52 ]
%13 = icmp eq i16 %12, 0
br i1 %13, label %14, label %36
14: ; preds = %11
%15 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0))
%16 = call i32 (...) @refresh()
%17 = call i32 @scanw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %10)
%18 = call i64 @strncmp(i8* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 5)
%19 = icmp eq i64 %18, 0
br i1 %19, label %23, label %20
20: ; preds = %14
%21 = call i64 @strncmp(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i32 1)
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %20, %14
%24 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0))
%25 = call i32 (...) @refresh()
br label %26
26: ; preds = %23, %20
%27 = phi i16 [ 1, %23 ], [ 0, %20 ]
%28 = call i64 @strncmp(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 4)
%29 = icmp eq i64 %28, 0
br i1 %29, label %33, label %30
30: ; preds = %26
%31 = call i64 @strncmp(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i32 4)
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %36
33: ; preds = %30, %26
%34 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0))
%35 = call i32 (...) @refresh()
br label %36
36: ; preds = %30, %33, %11
%37 = phi i16 [ %12, %11 ], [ %27, %33 ], [ %27, %30 ]
%38 = phi i1 [ true, %11 ], [ false, %33 ], [ true, %30 ]
%39 = icmp eq i16 %37, 1
br i1 %39, label %40, label %52
40: ; preds = %36
%41 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.10, i64 0, i64 0))
%42 = call i32 (...) @refresh()
%43 = call i32 @scanw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %10)
%44 = call i64 @strncmp(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0), i32 4)
%45 = icmp eq i64 %44, 0
br i1 %45, label %49, label %46
46: ; preds = %40
%47 = call i64 @strncmp(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0), i32 1)
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %52
49: ; preds = %40, %46
%50 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0))
%51 = call i32 (...) @refresh()
br label %53
52: ; preds = %46, %36
br i1 %38, label %11, label %53
53: ; preds = %52, %49
%54 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0))
%55 = call i32 (...) @refresh()
%56 = call i32 (...) @getch()
%57 = call i32 (...) @endwin()
ret i32 0
}