#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, char **);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char **);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(void) {
  FILE *secretWord;
  char secret[100];
  char guess[100];
  int counter = 0;
  char test[5];
  int count = 0;
  int temp;
  printf("There are 20 secret words.\nYou have 3 chances to guess each secret "
         "word.\nIf you guess one correctly you have 3 more guesses to guess "
         "the next one:\n");
  secretWord = fopen("secretword.txt", "r");
  if (secretWord == NULL) {
    printf("Cannot open secretWord for reading \n");
    exit(0);
  }
  while ((count < 20) && (strcmp(test, "done") != 0)) {
    fscanf(secretWord, "%s", &secret);
    for (counter = 0; (counter < 3) && (strcmp(test, "done") != 0); counter++) {
      scanf("%99s", &guess);
      if (strcmp(secret, guess) == 0) {
        printf("Well done. You guessed secret word number %d correctly\n",
               (temp = count + 1));
        strcpy(test, "done");
        if (count < 19)
          printf("Try guessing word %d:\n", (temp = count + 2));
        if (count == 19)
          printf("Congratulations, you guessed all the secret words\n");
      } else if (strcmp(secret, guess) != 0) {
        if (counter == 0)
          printf(
              "%d:%s is not the secret word, you have two guesses remaining:\n",
              counter, guess);
        if (counter == 1)
          printf(
              "%d:%s is not the secret word, you have one guess remaining:\n",
              counter, guess);
        if (counter == 2) {
          printf(
              "%d:%s is not the secret word, you have no guesses remaining\n",
              counter, guess);
          strcpy(test, "done");
        }
      }
    }
    if (strcmp(secret, guess) == 0)
      strcpy(test, "not");
    count++;
  }
  fclose(secretWord);
  printf("Goodbye!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xf4(%rbp)
movl   $0x0,-0x100(%rbp)
lea    0xe53(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xed9(%rip),%rdi
lea    0xee1(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11eb <main+0x6b>
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
jmp    11f0 <main+0x70>
xor    %eax,%eax
cmpl   $0x14,-0x100(%rbp)
mov    %al,-0x105(%rbp)
jge    1225 <main+0xa5>
lea    -0xf9(%rbp),%rdi
lea    0xeb7(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x105(%rbp)
mov    -0x105(%rbp),%al
test   $0x1,%al
jne    1238 <main+0xb8>
jmp    144e <main+0x2ce>
mov    -0x10(%rbp),%rdi
lea    -0x80(%rbp),%rdx
lea    0xe88(%rip),%rsi
call   1060 <fscanf@plt>
movl   $0x0,-0xf4(%rbp)
xor    %eax,%eax
cmpl   $0x3,-0xf4(%rbp)
mov    %al,-0x106(%rbp)
jge    128b <main+0x10b>
lea    -0xf9(%rbp),%rdi
lea    0xe51(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x106(%rbp)
mov    -0x106(%rbp),%al
test   $0x1,%al
jne    129e <main+0x11e>
jmp    140d <main+0x28d>
lea    -0xf0(%rbp),%rsi
lea    0xe26(%rip),%rdi
call   1080 <scanf@plt>
lea    -0x80(%rbp),%rdi
lea    -0xf0(%rbp),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    1345 <main+0x1c5>
mov    -0x100(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x104(%rbp)
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0xf9(%rbp),%rdi
lea    0xdd4(%rip),%rsi
call   1030 <strcpy@plt>
cmpl   $0x13,-0x100(%rbp)
jge    1325 <main+0x1a5>
mov    -0x100(%rbp),%esi
add    $0x2,%esi
mov    %esi,-0x104(%rbp)
lea    0xdf1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x13,-0x100(%rbp)
jne    1340 <main+0x1c0>
lea    0xded(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    13f4 <main+0x274>
lea    -0x80(%rbp),%rdi
lea    -0xf0(%rbp),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     13ef <main+0x26f>
cmpl   $0x0,-0xf4(%rbp)
jne    1387 <main+0x207>
mov    -0xf4(%rbp),%esi
lea    -0xf0(%rbp),%rdx
lea    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x1,-0xf4(%rbp)
jne    13af <main+0x22f>
mov    -0xf4(%rbp),%esi
lea    -0xf0(%rbp),%rdx
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x2,-0xf4(%rbp)
jne    13ea <main+0x26a>
mov    -0xf4(%rbp),%esi
lea    -0xf0(%rbp),%rdx
lea    0xe05(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0xf9(%rbp),%rdi
lea    0xce5(%rip),%rsi
call   1030 <strcpy@plt>
jmp    13ef <main+0x26f>
jmp    13f4 <main+0x274>
jmp    13f9 <main+0x279>
mov    -0xf4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
jmp    1256 <main+0xd6>
lea    -0x80(%rbp),%rdi
lea    -0xf0(%rbp),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    143a <main+0x2ba>
lea    -0xf9(%rbp),%rdi
lea    0xddd(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x100(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100(%rbp)
jmp    11f0 <main+0x70>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
lea    0xdb8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
lea    0xf82(%rip),%rdi
call   1040 <puts@plt>
lea    0xe4c(%rip),%rdi
lea    0xe54(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,0x10(%rsp)
test   %rax,%rax
je     1494 <main+0x304>
lea    0xe3c(%rip),%r15
lea    0x1b(%rsp),%r13
lea    0x90(%rsp),%rbx
lea    0x20(%rsp),%rbp
xor    %r14d,%r14d
jmp    1221 <main+0x91>
lea    0xe63(%rip),%rdi
mov    0xc(%rsp),%esi
xor    %eax,%eax
call   1060 <printf@plt>
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     12b0 <main+0x120>
mov    %r12d,%r14d
cmp    $0x14,%r12d
je     146a <main+0x2da>
mov    %r13,%rdi
mov    %r15,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     146a <main+0x2da>
mov    0x10(%rsp),%rdi
lea    0xdd5(%rip),%rsi
mov    %rbx,%rdx
call   1070 <fscanf@plt>
lea    0x1(%r14),%r12d
mov    %r13,%rdi
mov    %r15,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1200 <main+0x70>
lea    0x2(%r14),%eax
mov    %eax,0xc(%rsp)
lea    0xdad(%rip),%rdi
mov    %rbp,%rsi
call   1090 <scanf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     12d0 <main+0x140>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1320 <main+0x190>
lea    0xdce(%rip),%rdi
xor    %esi,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1320 <main+0x190>
nopl   (%rax)
mov    %r13,%rdi
lea    0xe6c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    1214 <main+0x84>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0xd47(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r13,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
cmp    $0x12,%r14d
ja     1306 <main+0x176>
lea    0xd5d(%rip),%rdi
mov    0xc(%rsp),%esi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1320 <main+0x190>
cmp    $0x13,%r14d
jne    1320 <main+0x190>
lea    0xeb3(%rip),%rdi
call   1040 <puts@plt>
nopl   0x0(%rax,%rax,1)
mov    %r13,%rdi
mov    %r15,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1200 <main+0x70>
lea    0xcde(%rip),%rdi
mov    %rbp,%rsi
call   1090 <scanf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     137b <main+0x1eb>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     13c0 <main+0x230>
lea    0xd42(%rip),%rdi
mov    $0x1,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
jmp    13c0 <main+0x230>
lea    0xc9c(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r13,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
cmp    $0x13,%r14d
jae    13b1 <main+0x221>
lea    0xcb2(%rip),%rdi
mov    0xc(%rsp),%esi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    13c0 <main+0x230>
jne    13c0 <main+0x230>
lea    0xe0c(%rip),%rdi
call   1040 <puts@plt>
nop
mov    %r13,%rdi
mov    %r15,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1200 <main+0x70>
lea    0xc3e(%rip),%rdi
mov    %rbp,%rsi
call   1090 <scanf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     142d <main+0x29d>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1200 <main+0x70>
lea    0xcdb(%rip),%rdi
mov    $0x2,%esi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r13,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
jmp    1200 <main+0x70>
lea    0xbea(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r13,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
cmp    $0x13,%r14d
jb     11ec <main+0x5c>
jne    1200 <main+0x70>
lea    0xd66(%rip),%rdi
call   1040 <puts@plt>
jmp    1200 <main+0x70>
mov    0x10(%rsp),%rdi
call   1050 <fclose@plt>
lea    0xd42(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xd5d(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@.str = [148 x i8] c"There are 20 secret words.\0AYou have 3 chances to guess each secret word.\0AIf you guess one correctly you have 3 more guesses to guess the next one:\0A\00"
@.str.1 = [15 x i8] c"secretword.txt\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [37 x i8] c"Cannot open secretWord for reading \0A\00"
@.str.4 = [5 x i8] c"done\00"
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [5 x i8] c"%99s\00"
@.str.7 = [56 x i8] c"Well done. You guessed secret word number %d correctly\0A\00"
@.str.8 = [23 x i8] c"Try guessing word %d:\0A\00"
@.str.9 = [51 x i8] c"Congratulations, you guessed all the secret words\0A\00"
@.str.10 = [63 x i8] c"%d:%s is not the secret word, you have two guesses remaining:\0A\00"
@.str.11 = [61 x i8] c"%d:%s is not the secret word, you have one guess remaining:\0A\00"
@.str.12 = [61 x i8] c"%d:%s is not the secret word, you have no guesses remaining\0A\00"
@.str.13 = [4 x i8] c"not\00"
@.str.14 = [10 x i8] c"Goodbye!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = alloca i32
%6 = alloca [5 x i8]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %5
store i32 0, i32* %7
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0))
%10 = call i32* @fopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %10, i32** %2
%11 = load i32*, i32** %2
%12 = icmp eq i32* %11, null
br i1 %12, label %13, label %16
13: ; preds = %0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 @exit(i32 0)
unreachable
16: ; preds = %0
br label %17
17: ; preds = %106, %16
%18 = load i32, i32* %7
%19 = icmp slt i32 %18, 20
br i1 %19, label %20, label %24
20: ; preds = %17
%21 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%22 = call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%23 = icmp ne i64 %22, 0
br label %24
24: ; preds = %20, %17
%25 = phi i1 [ false, %17 ], [ %23, %20 ]
br i1 %25, label %26, label %109
26: ; preds = %24
%27 = load i32*, i32** %2
%28 = bitcast [100 x i8]* %3 to i8**
%29 = call i32 @fscanf(i32* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8** %28)
store i32 0, i32* %5
br label %30
30: ; preds = %95, %26
%31 = load i32, i32* %5
%32 = icmp slt i32 %31, 3
br i1 %32, label %33, label %37
33: ; preds = %30
%34 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%35 = call i64 @strcmp(i8* %34, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%36 = icmp ne i64 %35, 0
br label %37
37: ; preds = %33, %30
%38 = phi i1 [ false, %30 ], [ %36, %33 ]
br i1 %38, label %39, label %98
39: ; preds = %37
%40 = bitcast [100 x i8]* %4 to i8**
%41 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8** %40)
%42 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%43 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%44 = call i64 @strcmp(i8* %42, i8* %43)
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %64
46: ; preds = %39
%47 = load i32, i32* %7
%48 = add nsw i32 %47, 1
store i32 %48, i32* %8
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.7, i64 0, i64 0), i32 %48)
%50 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%51 = call i32 @strcpy(i8* %50, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%52 = load i32, i32* %7
%53 = icmp slt i32 %52, 19
br i1 %53, label %54, label %58
54: ; preds = %46
%55 = load i32, i32* %7
%56 = add nsw i32 %55, 2
store i32 %56, i32* %8
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %56)
br label %58
58: ; preds = %54, %46
%59 = load i32, i32* %7
%60 = icmp eq i32 %59, 19
br i1 %60, label %61, label %63
61: ; preds = %58
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0))
br label %63
63: ; preds = %61, %58
br label %94
64: ; preds = %39
%65 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%66 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%67 = call i64 @strcmp(i8* %65, i8* %66)
%68 = icmp ne i64 %67, 0
br i1 %68, label %69, label %93
69: ; preds = %64
%70 = load i32, i32* %5
%71 = icmp eq i32 %70, 0
br i1 %71, label %72, label %76
72: ; preds = %69
%73 = load i32, i32* %5
%74 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.10, i64 0, i64 0), i32 %73, i8* %74)
br label %76
76: ; preds = %72, %69
%77 = load i32, i32* %5
%78 = icmp eq i32 %77, 1
br i1 %78, label %79, label %83
79: ; preds = %76
%80 = load i32, i32* %5
%81 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.11, i64 0, i64 0), i32 %80, i8* %81)
br label %83
83: ; preds = %79, %76
%84 = load i32, i32* %5
%85 = icmp eq i32 %84, 2
br i1 %85, label %86, label %92
86: ; preds = %83
%87 = load i32, i32* %5
%88 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.12, i64 0, i64 0), i32 %87, i8* %88)
%90 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%91 = call i32 @strcpy(i8* %90, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %92
92: ; preds = %86, %83
br label %93
93: ; preds = %92, %64
br label %94
94: ; preds = %93, %63
br label %95
95: ; preds = %94
%96 = load i32, i32* %5
%97 = add nsw i32 %96, 1
store i32 %97, i32* %5
br label %30
98: ; preds = %37
%99 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%100 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%101 = call i64 @strcmp(i8* %99, i8* %100)
%102 = icmp eq i64 %101, 0
br i1 %102, label %103, label %106
103: ; preds = %98
%104 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%105 = call i32 @strcpy(i8* %104, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0))
br label %106
106: ; preds = %103, %98
%107 = load i32, i32* %7
%108 = add nsw i32 %107, 1
store i32 %108, i32* %7
br label %17
109: ; preds = %24
%110 = load i32*, i32** %2
%111 = call i32 @fclose(i32* %110)
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [15 x i8] c"secretword.txt\00"
@.str.2 = [2 x i8] c"r\00"
@.str.4 = [5 x i8] c"done\00"
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [5 x i8] c"%99s\00"
@.str.7 = [56 x i8] c"Well done. You guessed secret word number %d correctly\0A\00"
@.str.8 = [23 x i8] c"Try guessing word %d:\0A\00"
@.str.10 = [63 x i8] c"%d:%s is not the secret word, you have two guesses remaining:\0A\00"
@.str.11 = [61 x i8] c"%d:%s is not the secret word, you have one guess remaining:\0A\00"
@.str.12 = [61 x i8] c"%d:%s is not the secret word, you have no guesses remaining\0A\00"
@.str.13 = [4 x i8] c"not\00"
@str = [147 x i8] c"There are 20 secret words.\0AYou have 3 chances to guess each secret word.\0AIf you guess one correctly you have 3 more guesses to guess the next one:\00"
@str.15 = [9 x i8] c"Goodbye!\00"
@str.16 = [50 x i8] c"Congratulations, you guessed all the secret words\00"
@str.17 = [36 x i8] c"Cannot open secretWord for reading \00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [100 x i8]
%3 = alloca [5 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([147 x i8], [147 x i8]* @str, i64 0, i64 0))
%8 = tail call i32* @fopen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%9 = icmp eq i32* %8, null
br i1 %9, label %13, label %10
10: ; preds = %0
%11 = bitcast [100 x i8]* %1 to i8**
%12 = bitcast [100 x i8]* %2 to i8**
br label %16
13: ; preds = %0
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.17, i64 0, i64 0))
%15 = tail call i32 @exit(i32 0)
unreachable
16: ; preds = %10, %91
%17 = phi i32 [ 0, %10 ], [ %22, %91 ]
%18 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %93, label %20
20: ; preds = %16
%21 = call i32 @fscanf(i32* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8** %11)
%22 = add nuw nsw i32 %17, 1
%23 = icmp ult i32 %17, 19
%24 = icmp eq i32 %17, 19
%25 = add nuw nsw i32 %17, 2
%26 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %86, label %28
28: ; preds = %20
%29 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8** %12)
%30 = call i64 @strcmp(i8* %4, i8* %5)
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %40
32: ; preds = %28
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.7, i64 0, i64 0), i32 %22)
%34 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br i1 %23, label %35, label %37
35: ; preds = %32
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %25)
br label %45
37: ; preds = %32
br i1 %24, label %38, label %45
38: ; preds = %37
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.16, i64 0, i64 0))
br label %45
40: ; preds = %28
%41 = call i64 @strcmp(i8* %4, i8* %5)
%42 = icmp eq i64 %41, 0
br i1 %42, label %45, label %43
43: ; preds = %40
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.10, i64 0, i64 0), i32 0, i8* %5)
br label %45
45: ; preds = %35, %43, %38, %37, %40
%46 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %86, label %48
48: ; preds = %45
%49 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8** %12)
%50 = call i64 @strcmp(i8* %4, i8* %5)
%51 = icmp eq i64 %50, 0
br i1 %51, label %57, label %52
52: ; preds = %48
%53 = call i64 @strcmp(i8* %4, i8* %5)
%54 = icmp eq i64 %53, 0
br i1 %54, label %65, label %55
55: ; preds = %52
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @.str.11, i64 0, i64 0), i32 1, i8* %5)
br label %65
57: ; preds = %48
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.7, i64 0, i64 0), i32 %22)
%59 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br i1 %23, label %63, label %60
60: ; preds = %57
br i1 %24, label %61, label %65
61: ; preds = %60
%62 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.16, i64 0, i64 0))
br label %65
63: ; preds = %57
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %25)
br label %65
65: ; preds = %63, %61, %60, %55, %52
%66 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%67 = icmp eq i64 %66, 0
br i1 %67, label %86, label %68
68: ; preds = %65
%69 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8** %12)
%70 = call i64 @strcmp(i8* %4, i8* %5)
%71 = icmp eq i64 %70, 0
br i1 %71, label %78, label %72
72: ; preds = %68
%73 = call i64 @strcmp(i8* %4, i8* %5)
%74 = icmp eq i64 %73, 0
br i1 %74, label %86, label %75
75: ; preds = %72
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @.str.12, i64 0, i64 0), i32 2, i8* %5)
%77 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %86
78: ; preds = %68
%79 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.7, i64 0, i64 0), i32 %22)
%80 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br i1 %23, label %84, label %81
81: ; preds = %78
br i1 %24, label %82, label %86
82: ; preds = %81
%83 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.16, i64 0, i64 0))
br label %86
84: ; preds = %78
%85 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %25)
br label %86
86: ; preds = %72, %75, %81, %82, %84, %65, %45, %20
%87 = call i64 @strcmp(i8* %4, i8* %5)
%88 = icmp eq i64 %87, 0
br i1 %88, label %89, label %91
89: ; preds = %86
%90 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0))
br label %91
91: ; preds = %89, %86
%92 = icmp eq i32 %22, 20
br i1 %92, label %93, label %16
93: ; preds = %91, %16
%94 = call i32 @fclose(i32* %8)
%95 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.15, i64 0, i64 0))
ret i32 0
}