#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*/ draw_hangman(char *, int, int);
int /*<<< orphan*/ print_result(int, int, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int strlen(char *);
int play_hangman(char storedstring[7]) {
  int stringsize;
  int index;
  int enteragain;
  int foundcharinword;
  char onechar;
  char guessedword[7];
  char originalword[7];
  char lettersguessed[64];
  int playthegame = 0;
  int countguesses = -1;
  int foundchar = 0;
  int winner = 0;
  int initone = 0;
  stringsize = strlen(storedstring);
  printf("You must attempt to guess a word of lenth: %d\n", stringsize);
  for (index = 0; index < stringsize; index++) {
    originalword[index] = storedstring[index];
  }
  for (index = 0; index < stringsize; index++) {
    guessedword[index] = '-';
  }
  draw_hangman(guessedword, stringsize, 0);
  while (playthegame == 0) {
    countguesses++;
    enteragain = 0;
    while (enteragain == 0) {
      printf("Guess a character? ");
      scanf("%1s", &onechar);
      enteragain = 1;
      for (index = 0; index < countguesses; index++) {
        if (onechar == lettersguessed[index]) {
          printf("You already used the character %c, please enter a new one.\n",
                 onechar);
          enteragain = 0;
          index = countguesses;
        }
      }
    }
    lettersguessed[countguesses] = onechar;
    foundcharinword = 0;
    for (index = 0; index < stringsize; index++) {
      if (onechar == storedstring[index]) {
        guessedword[index] = onechar;
        storedstring[index] = '&';
        foundcharinword = 1;
        foundchar++;
        if (foundchar >= stringsize)
          winner = 1;
      }
    }
    draw_hangman(guessedword, stringsize, 0);
    draw_hangman(lettersguessed, countguesses, 1);
    if (foundcharinword == 0) {
      draw_hangman(lettersguessed, countguesses, 2);
    }
    if (countguesses >= 9 || winner == 1)
      playthegame = 1;
  }
  print_result(winner, countguesses, originalword);
  return 0;
}


x86 assembly (clang, -O0):
<play_hangman>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x74(%rbp)
movl   $0xffffffff,-0x78(%rbp)
movl   $0x0,-0x7c(%rbp)
movl   $0x0,-0x80(%rbp)
movl   $0x0,-0x84(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11d6 <play_hangman+0x86>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
movslq -0x10(%rbp),%rax
mov    %cl,-0x27(%rbp,%rax,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11a9 <play_hangman+0x59>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1200 <play_hangman+0xb0>
movslq -0x10(%rbp),%rax
movb   $0x2d,-0x20(%rbp,%rax,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11dd <play_hangman+0x8d>
lea    -0x20(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1070 <draw_hangman@plt>
cmpl   $0x0,-0x74(%rbp)
jne    139f <play_hangman+0x24f>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    12b6 <play_hangman+0x166>
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdfc(%rip),%rdi
lea    -0x19(%rbp),%rsi
call   1060 <scanf@plt>
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    12b1 <play_hangman+0x161>
movsbl -0x19(%rbp),%eax
movslq -0x10(%rbp),%rcx
movsbl -0x70(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
jne    129e <play_hangman+0x14e>
movsbl -0x19(%rbp),%esi
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x78(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    12a3 <play_hangman+0x153>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    125e <play_hangman+0x10e>
jmp    1228 <play_hangman+0xd8>
mov    -0x19(%rbp),%cl
movslq -0x78(%rbp),%rax
mov    %cl,-0x70(%rbp,%rax,1)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1345 <play_hangman+0x1f5>
movsbl -0x19(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    1332 <play_hangman+0x1e2>
mov    -0x19(%rbp),%cl
movslq -0x10(%rbp),%rax
mov    %cl,-0x20(%rbp,%rax,1)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x26,(%rax,%rcx,1)
movl   $0x1,-0x18(%rbp)
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     132d <play_hangman+0x1dd>
movl   $0x1,-0x80(%rbp)
jmp    1332 <play_hangman+0x1e2>
jmp    1337 <play_hangman+0x1e7>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12cf <play_hangman+0x17f>
lea    -0x20(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1070 <draw_hangman@plt>
lea    -0x70(%rbp),%rdi
mov    -0x78(%rbp),%esi
mov    $0x1,%edx
call   1070 <draw_hangman@plt>
cmpl   $0x0,-0x18(%rbp)
jne    137f <play_hangman+0x22f>
lea    -0x70(%rbp),%rdi
mov    -0x78(%rbp),%esi
mov    $0x2,%edx
call   1070 <draw_hangman@plt>
cmpl   $0x9,-0x78(%rbp)
jge    1393 <play_hangman+0x243>
cmpl   $0x1,-0x80(%rbp)
jne    139a <play_hangman+0x24a>
movl   $0x1,-0x74(%rbp)
jmp    120e <play_hangman+0xbe>
mov    -0x80(%rbp),%edi
mov    -0x78(%rbp),%esi
lea    -0x27(%rbp),%rdx
call   1050 <print_result@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<play_hangman>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ebp
lea    0xe6e(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%r14d
test   %ebp,%ebp
jle    11c4 <play_hangman+0x54>
lea    0x21(%rsp),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1070 <memcpy@plt>
lea    0x1a(%rsp),%rdi
mov    $0x2d,%esi
mov    %r14,%rdx
call   1050 <memset@plt>
lea    0x1a(%rsp),%rdi
mov    %ebp,%esi
xor    %edx,%edx
call   1090 <draw_hangman@plt>
mov    %r14,0x30(%rsp)
and    $0xfffffffe,%r14d
mov    %r14,0x28(%rsp)
mov    $0xffffffffffffffff,%r13
lea    0xe59(%rip),%r12
xor    %edi,%edi
movl   $0x0,0x14(%rsp)
mov    %rbx,0x38(%rsp)
nopl   (%rax)
mov    %edi,0x10(%rsp)
mov    %ebp,%r14d
lea    0x1(%r13),%r15
movslq %r15d,%rbx
jmp    1214 <play_hangman+0xa4>
test   %ebp,%ebp
jne    1280 <play_hangman+0x110>
lea    0xe14(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe1a(%rip),%rdi
lea    0xf(%rsp),%rsi
call   1080 <scanf@plt>
test   %r13,%r13
js     1280 <play_hangman+0x110>
mov    $0x1,%ebp
xor    %eax,%eax
jmp    1258 <play_hangman+0xe8>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
cmp    %r13,%rcx
jge    1210 <play_hangman+0xa0>
movsbl 0xf(%rsp),%esi
movslq %eax,%rcx
cmp    0x40(%rsp,%rcx,1),%sil
jne    1250 <play_hangman+0xe0>
xor    %ebp,%ebp
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rcx
mov    %r15d,%eax
jmp    1250 <play_hangman+0xe0>
nopl   0x0(%rax,%rax,1)
mov    0xf(%rsp),%al
mov    %al,0x40(%rsp,%r15,1)
mov    %r14d,%ebp
test   %r14d,%r14d
mov    0x38(%rsp),%rbx
jle    12e0 <play_hangman+0x170>
cmp    $0x1,%ebp
mov    0x28(%rsp),%rdx
mov    0x10(%rsp),%esi
mov    0x14(%rsp),%edi
jne    1350 <play_hangman+0x1e0>
xor    %ecx,%ecx
xor    %r14d,%r14d
testb  $0x1,0x30(%rsp)
je     12eb <play_hangman+0x17b>
cmp    (%rbx,%rcx,1),%al
jne    12eb <play_hangman+0x17b>
mov    %al,0x1a(%rsp,%rcx,1)
movb   $0x26,(%rbx,%rcx,1)
add    $0x1,%edi
cmp    %ebp,%edi
mov    $0x1,%r14d
cmovge %r14d,%esi
jmp    12eb <play_hangman+0x17b>
cs nopw 0x0(%rax,%rax,1)
xor    %r14d,%r14d
mov    0x10(%rsp),%esi
mov    0x14(%rsp),%edi
mov    %edi,0x14(%rsp)
mov    %esi,0x10(%rsp)
lea    0x1a(%rsp),%rdi
mov    %ebp,%esi
xor    %edx,%edx
call   1090 <draw_hangman@plt>
lea    0x40(%rsp),%rdi
mov    %r15d,%esi
mov    $0x1,%edx
call   1090 <draw_hangman@plt>
test   %r14d,%r14d
jne    132a <play_hangman+0x1ba>
lea    0x40(%rsp),%rdi
mov    %r15d,%esi
mov    $0x2,%edx
call   1090 <draw_hangman@plt>
cmp    $0x7,%r13
mov    0x10(%rsp),%edi
jg     13a9 <play_hangman+0x239>
mov    %r15,%r13
cmp    $0x1,%edi
jne    1200 <play_hangman+0x90>
jmp    13a9 <play_hangman+0x239>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %ecx,%ecx
xor    %r14d,%r14d
jmp    136d <play_hangman+0x1fd>
nopw   0x0(%rax,%rax,1)
add    $0x2,%rcx
cmp    %rcx,%rdx
je     12b1 <play_hangman+0x141>
cmp    (%rbx,%rcx,1),%al
jne    1389 <play_hangman+0x219>
mov    %al,0x1a(%rsp,%rcx,1)
movb   $0x26,(%rbx,%rcx,1)
add    $0x1,%edi
cmp    %ebp,%edi
mov    $0x1,%r14d
cmovge %r14d,%esi
cmp    0x1(%rbx,%rcx,1),%al
jne    1360 <play_hangman+0x1f0>
mov    %al,0x1b(%rsp,%rcx,1)
movb   $0x26,0x1(%rbx,%rcx,1)
add    $0x1,%edi
cmp    %ebp,%edi
mov    $0x1,%r14d
cmovge %r14d,%esi
jmp    1360 <play_hangman+0x1f0>
lea    0x21(%rsp),%rdx
mov    %r15d,%esi
call   1060 <print_result@plt>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [47 x i8] c"You must attempt to guess a word of lenth: %d\0A\00"
@.str.1 = [20 x i8] c"Guess a character? \00"
@.str.2 = [4 x i8] c"%1s\00"
@.str.3 = [60 x i8] c"You already used the character %c, please enter a new one.\0A\00"
define i32 @play_hangman(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8
%8 = alloca [7 x i8]
%9 = alloca [7 x i8]
%10 = alloca [64 x i8]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %11
store i32 -1, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
%16 = load i8*, i8** %2
%17 = call i32 @strlen(i8* %16)
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %18)
store i32 0, i32* %4
br label %20
20: ; preds = %33, %1
%21 = load i32, i32* %4
%22 = load i32, i32* %3
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %36
24: ; preds = %20
%25 = load i8*, i8** %2
%26 = load i32, i32* %4
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %25, i64 %27
%29 = load i8, i8* %28
%30 = load i32, i32* %4
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [7 x i8], [7 x i8]* %9, i64 0, i64 %31
store i8 %29, i8* %32
br label %33
33: ; preds = %24
%34 = load i32, i32* %4
%35 = add nsw i32 %34, 1
store i32 %35, i32* %4
br label %20
36: ; preds = %20
store i32 0, i32* %4
br label %37
37: ; preds = %45, %36
%38 = load i32, i32* %4
%39 = load i32, i32* %3
%40 = icmp slt i32 %38, %39
br i1 %40, label %41, label %48
41: ; preds = %37
%42 = load i32, i32* %4
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 %43
store i8 45, i8* %44
br label %45
45: ; preds = %41
%46 = load i32, i32* %4
%47 = add nsw i32 %46, 1
store i32 %47, i32* %4
br label %37
48: ; preds = %37
%49 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 0
%50 = load i32, i32* %3
%51 = call i32 @draw_hangman(i8* %49, i32 %50, i32 0)
br label %52
52: ; preds = %146, %48
%53 = load i32, i32* %11
%54 = icmp eq i32 %53, 0
br i1 %54, label %55, label %147
55: ; preds = %52
%56 = load i32, i32* %12
%57 = add nsw i32 %56, 1
store i32 %57, i32* %12
store i32 0, i32* %5
br label %58
58: ; preds = %86, %55
%59 = load i32, i32* %5
%60 = icmp eq i32 %59, 0
br i1 %60, label %61, label %87
61: ; preds = %58
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%63 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %7)
store i32 1, i32* %5
store i32 0, i32* %4
br label %64
64: ; preds = %83, %61
%65 = load i32, i32* %4
%66 = load i32, i32* %12
%67 = icmp slt i32 %65, %66
br i1 %67, label %68, label %86
68: ; preds = %64
%69 = load i8, i8* %7
%70 = sext i8 %69 to i32
%71 = load i32, i32* %4
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [64 x i8], [64 x i8]* %10, i64 0, i64 %72
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = icmp eq i32 %70, %75
br i1 %76, label %77, label %82
77: ; preds = %68
%78 = load i8, i8* %7
%79 = sext i8 %78 to i32
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0), i32 %79)
store i32 0, i32* %5
%81 = load i32, i32* %12
store i32 %81, i32* %4
br label %82
82: ; preds = %77, %68
br label %83
83: ; preds = %82
%84 = load i32, i32* %4
%85 = add nsw i32 %84, 1
store i32 %85, i32* %4
br label %64
86: ; preds = %64
br label %58
87: ; preds = %58
%88 = load i8, i8* %7
%89 = load i32, i32* %12
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [64 x i8], [64 x i8]* %10, i64 0, i64 %90
store i8 %88, i8* %91
store i32 0, i32* %6
store i32 0, i32* %4
br label %92
92: ; preds = %123, %87
%93 = load i32, i32* %4
%94 = load i32, i32* %3
%95 = icmp slt i32 %93, %94
br i1 %95, label %96, label %126
96: ; preds = %92
%97 = load i8, i8* %7
%98 = sext i8 %97 to i32
%99 = load i8*, i8** %2
%100 = load i32, i32* %4
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds i8, i8* %99, i64 %101
%103 = load i8, i8* %102
%104 = sext i8 %103 to i32
%105 = icmp eq i32 %98, %104
br i1 %105, label %106, label %122
106: ; preds = %96
%107 = load i8, i8* %7
%108 = load i32, i32* %4
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 %109
store i8 %107, i8* %110
%111 = load i8*, i8** %2
%112 = load i32, i32* %4
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds i8, i8* %111, i64 %113
store i8 38, i8* %114
store i32 1, i32* %6
%115 = load i32, i32* %13
%116 = add nsw i32 %115, 1
store i32 %116, i32* %13
%117 = load i32, i32* %13
%118 = load i32, i32* %3
%119 = icmp sge i32 %117, %118
br i1 %119, label %120, label %121
120: ; preds = %106
store i32 1, i32* %14
br label %121
121: ; preds = %120, %106
br label %122
122: ; preds = %121, %96
br label %123
123: ; preds = %122
%124 = load i32, i32* %4
%125 = add nsw i32 %124, 1
store i32 %125, i32* %4
br label %92
126: ; preds = %92
%127 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 0
%128 = load i32, i32* %3
%129 = call i32 @draw_hangman(i8* %127, i32 %128, i32 0)
%130 = getelementptr inbounds [64 x i8], [64 x i8]* %10, i64 0, i64 0
%131 = load i32, i32* %12
%132 = call i32 @draw_hangman(i8* %130, i32 %131, i32 1)
%133 = load i32, i32* %6
%134 = icmp eq i32 %133, 0
br i1 %134, label %135, label %139
135: ; preds = %126
%136 = getelementptr inbounds [64 x i8], [64 x i8]* %10, i64 0, i64 0
%137 = load i32, i32* %12
%138 = call i32 @draw_hangman(i8* %136, i32 %137, i32 2)
br label %139
139: ; preds = %135, %126
%140 = load i32, i32* %12
%141 = icmp sge i32 %140, 9
br i1 %141, label %145, label %142
142: ; preds = %139
%143 = load i32, i32* %14
%144 = icmp eq i32 %143, 1
br i1 %144, label %145, label %146
145: ; preds = %142, %139
store i32 1, i32* %11
br label %146
146: ; preds = %145, %142
br label %52
147: ; preds = %52
%148 = load i32, i32* %14
%149 = load i32, i32* %12
%150 = getelementptr inbounds [7 x i8], [7 x i8]* %9, i64 0, i64 0
%151 = call i32 @print_result(i32 %148, i32 %149, i8* %150)
ret i32 0
}

LLVM IR (-O2):
@.str = [47 x i8] c"You must attempt to guess a word of lenth: %d\0A\00"
@.str.1 = [20 x i8] c"Guess a character? \00"
@.str.2 = [4 x i8] c"%1s\00"
@.str.3 = [60 x i8] c"You already used the character %c, please enter a new one.\0A\00"
define i32 @play_hangman(i8* %0) {
%2 = alloca i8
%3 = alloca [7 x i8]
%4 = alloca [7 x i8]
%5 = alloca [64 x i8]
%6 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%9 = tail call i32 @strlen(i8* %0)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = icmp sgt i32 %9, 0
br i1 %11, label %12, label %17
12: ; preds = %1
%13 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%14 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 0
%15 = zext i32 %9 to i64
%16 = zext i32 %9 to i64
br label %17
17: ; preds = %1, %12
%18 = call i32 @draw_hangman(i8* %6, i32 %9, i32 0)
%19 = zext i32 %9 to i64
%20 = and i64 %19, 1
%21 = icmp eq i32 %9, 1
%22 = and i64 %19, 4294967294
%23 = icmp eq i64 %20, 0
br label %24
24: ; preds = %17, %119
%25 = phi i64 [ -1, %17 ], [ %28, %119 ]
%26 = phi i32 [ 0, %17 ], [ %113, %119 ]
%27 = phi i32 [ 0, %17 ], [ %112, %119 ]
%28 = add nsw i64 %25, 1
%29 = icmp slt i64 %25, 0
%30 = trunc i64 %28 to i32
%31 = shl i64 %28, 32
%32 = ashr exact i64 %31, 32
br label %35
33: ; preds = %49
%34 = icmp eq i32 %51, 0
br i1 %34, label %35, label %55
35: ; preds = %24, %33
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%37 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %2)
br i1 %29, label %55, label %38
38: ; preds = %35, %49
%39 = phi i32 [ %53, %49 ], [ 0, %35 ]
%40 = phi i32 [ %51, %49 ], [ 1, %35 ]
%41 = load i8, i8* %2
%42 = sext i32 %39 to i64
%43 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 %42
%44 = load i8, i8* %43
%45 = icmp eq i8 %41, %44
br i1 %45, label %46, label %49
46: ; preds = %38
%47 = sext i8 %41 to i32
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0), i32 %47)
br label %49
49: ; preds = %38, %46
%50 = phi i64 [ %42, %38 ], [ %32, %46 ]
%51 = phi i32 [ %40, %38 ], [ 0, %46 ]
%52 = phi i32 [ %39, %38 ], [ %30, %46 ]
%53 = add nsw i32 %52, 1
%54 = icmp slt i64 %50, %25
br i1 %54, label %38, label %33
55: ; preds = %35, %33
%56 = load i8, i8* %2
%57 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 %28
store i8 %56, i8* %57
br i1 %11, label %58, label %110
58: ; preds = %55
br i1 %21, label %93, label %59
59: ; preds = %58, %86
%60 = phi i64 [ %90, %86 ], [ 0, %58 ]
%61 = phi i32 [ %89, %86 ], [ %26, %58 ]
%62 = phi i32 [ %88, %86 ], [ %27, %58 ]
%63 = phi i32 [ %87, %86 ], [ 0, %58 ]
%64 = phi i64 [ %91, %86 ], [ 0, %58 ]
%65 = getelementptr inbounds i8, i8* %0, i64 %60
%66 = load i8, i8* %65
%67 = icmp eq i8 %56, %66
br i1 %67, label %68, label %73
68: ; preds = %59
%69 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 %60
store i8 %56, i8* %69
store i8 38, i8* %65
%70 = add nsw i32 %62, 1
%71 = icmp slt i32 %70, %9
%72 = select i1 %71, i32 %61, i32 1
br label %73
73: ; preds = %68, %59
%74 = phi i32 [ %63, %59 ], [ 1, %68 ]
%75 = phi i32 [ %62, %59 ], [ %70, %68 ]
%76 = phi i32 [ %61, %59 ], [ %72, %68 ]
%77 = or i64 %60, 1
%78 = getelementptr inbounds i8, i8* %0, i64 %77
%79 = load i8, i8* %78
%80 = icmp eq i8 %56, %79
br i1 %80, label %81, label %86
81: ; preds = %73
%82 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 %77
store i8 %56, i8* %82
store i8 38, i8* %78
%83 = add nsw i32 %75, 1
%84 = icmp slt i32 %83, %9
%85 = select i1 %84, i32 %76, i32 1
br label %86
86: ; preds = %81, %73
%87 = phi i32 [ %74, %73 ], [ 1, %81 ]
%88 = phi i32 [ %75, %73 ], [ %83, %81 ]
%89 = phi i32 [ %76, %73 ], [ %85, %81 ]
%90 = add nuw nsw i64 %60, 2
%91 = add i64 %64, 2
%92 = icmp eq i64 %91, %22
br i1 %92, label %93, label %59
93: ; preds = %86, %58
%94 = phi i32 [ undef, %58 ], [ %87, %86 ]
%95 = phi i32 [ undef, %58 ], [ %88, %86 ]
%96 = phi i32 [ undef, %58 ], [ %89, %86 ]
%97 = phi i64 [ 0, %58 ], [ %90, %86 ]
%98 = phi i32 [ %26, %58 ], [ %89, %86 ]
%99 = phi i32 [ %27, %58 ], [ %88, %86 ]
%100 = phi i32 [ 0, %58 ], [ %87, %86 ]
br i1 %23, label %110, label %101
101: ; preds = %93
%102 = getelementptr inbounds i8, i8* %0, i64 %97
%103 = load i8, i8* %102
%104 = icmp eq i8 %56, %103
br i1 %104, label %105, label %110
105: ; preds = %101
%106 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 %97
store i8 %56, i8* %106
store i8 38, i8* %102
%107 = add nsw i32 %99, 1
%108 = icmp slt i32 %107, %9
%109 = select i1 %108, i32 %98, i32 1
br label %110
110: ; preds = %93, %105, %101, %55
%111 = phi i32 [ 0, %55 ], [ %94, %93 ], [ %100, %101 ], [ 1, %105 ]
%112 = phi i32 [ %27, %55 ], [ %95, %93 ], [ %99, %101 ], [ %107, %105 ]
%113 = phi i32 [ %26, %55 ], [ %96, %93 ], [ %98, %101 ], [ %109, %105 ]
%114 = call i32 @draw_hangman(i8* %6, i32 %9, i32 0)
%115 = call i32 @draw_hangman(i8* %8, i32 %30, i32 1)
%116 = icmp eq i32 %111, 0
br i1 %116, label %117, label %119
117: ; preds = %110
%118 = call i32 @draw_hangman(i8* %8, i32 %30, i32 2)
br label %119
119: ; preds = %117, %110
%120 = icmp slt i64 %25, 8
%121 = icmp ne i32 %113, 1
%122 = select i1 %120, i1 %121, i1 false
br i1 %122, label %24, label %123
123: ; preds = %119
%124 = trunc i64 %28 to i32
%125 = call i32 @print_result(i32 %113, i32 %124, i8* %7)
ret i32 0
}