#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*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
int strlen(char *);
int play_hangman(char enteredword[6]) {
  int lengthofword, index, guesscounter, won, runforever, foundcharinword;
  char onechar, guessedword[6], storechars[64];
  int gameover = 0;
  int charcounter = 0;
  int countfound = 0;
  lengthofword = strlen(enteredword);
  printf("You must attempt to guess a word of lenth: %d\n", lengthofword);
  for (index = 0; index < lengthofword; index++) {
    guessedword[index] = '-';
  }
  draw_hangman(guessedword, lengthofword, 1);
  won = 0;
  while (gameover == 0 && won == 0) {
    charcounter++;
    runforever = 0;
    while (runforever == 0) {
      printf("Guess a character? ");
      gets(&onechar);
      runforever = 1;
      for (index = 0; index < charcounter; index++) {
        if (onechar == storechars[index]) {
          printf("You already used the character %c, please enter a new one.\n",
                 onechar);
          runforever = 0;
          index = charcounter;
        }
      }
    }
    storechars[charcounter] = onechar;
    foundcharinword = 0;
    for (index = 0; index <= 5; index++) {
      if (onechar == enteredword[index]) {
        guessedword[index] = onechar;
        enteredword[index] = ' ';
        foundcharinword = 1;
        countfound++;
        if (countfound == lengthofword)
          won = 1;
      }
    }
    draw_hangman(guessedword, lengthofword, 1);
    draw_hangman(storechars, charcounter + 1, 2);
    if (foundcharinword == 0) {
      printf("Incorrect guess: %d\n", charcounter);
    }
    if (charcounter >= 10)
      gameover = 1;
  }
  if (won == 1) {
    printf("You won, with %d guesses.\n", charcounter);
  } else {
    printf("You lost.\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<play_hangman>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x74(%rbp)
movl   $0x0,-0x78(%rbp)
movl   $0x0,-0x7c(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11ab <play_hangman+0x6b>
movslq -0x10(%rbp),%rax
movb   $0x2d,-0x27(%rbp,%rax,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1188 <play_hangman+0x48>
lea    -0x27(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x1,%edx
call   1060 <draw_hangman@plt>
movl   $0x0,-0x18(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x74(%rbp)
mov    %al,-0x7d(%rbp)
jne    11dc <play_hangman+0x9c>
cmpl   $0x0,-0x18(%rbp)
sete   %al
mov    %al,-0x7d(%rbp)
mov    -0x7d(%rbp),%al
test   $0x1,%al
jne    11ec <play_hangman+0xac>
jmp    1366 <play_hangman+0x226>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    1283 <play_hangman+0x143>
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x21(%rbp),%rdi
call   1050 <gets@plt>
movl   $0x1,-0x1c(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    127e <play_hangman+0x13e>
movsbl -0x21(%rbp),%eax
movslq -0x10(%rbp),%rcx
movsbl -0x70(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
jne    126b <play_hangman+0x12b>
movsbl -0x21(%rbp),%esi
lea    0xdec(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x78(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1270 <play_hangman+0x130>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    122b <play_hangman+0xeb>
jmp    11fc <play_hangman+0xbc>
mov    -0x21(%rbp),%cl
movslq -0x78(%rbp),%rax
mov    %cl,-0x70(%rbp,%rax,1)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x5,-0x10(%rbp)
jg     1310 <play_hangman+0x1d0>
movsbl -0x21(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    12fd <play_hangman+0x1bd>
mov    -0x21(%rbp),%cl
movslq -0x10(%rbp),%rax
mov    %cl,-0x27(%rbp,%rax,1)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x20,(%rax,%rcx,1)
movl   $0x1,-0x20(%rbp)
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    12f8 <play_hangman+0x1b8>
movl   $0x1,-0x18(%rbp)
jmp    12fd <play_hangman+0x1bd>
jmp    1302 <play_hangman+0x1c2>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    129c <play_hangman+0x15c>
lea    -0x27(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x1,%edx
call   1060 <draw_hangman@plt>
lea    -0x70(%rbp),%rdi
mov    -0x78(%rbp),%esi
add    $0x1,%esi
mov    $0x2,%edx
call   1060 <draw_hangman@plt>
cmpl   $0x0,-0x20(%rbp)
jne    1350 <play_hangman+0x210>
mov    -0x78(%rbp),%esi
lea    0xd36(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0xa,-0x78(%rbp)
jl     1361 <play_hangman+0x221>
movl   $0x1,-0x74(%rbp)
jmp    11c3 <play_hangman+0x83>
cmpl   $0x1,-0x18(%rbp)
jne    1386 <play_hangman+0x246>
mov    -0x78(%rbp),%esi
lea    0xd1a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1394 <play_hangman+0x254>
lea    0xd22(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<play_hangman>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rdi,0x18(%rsp)
call   1040 <strlen@plt>
mov    %eax,%ebp
lea    0xe7f(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
test   %ebp,%ebp
jle    119f <play_hangman+0x3f>
mov    %ebp,%edx
lea    0xa(%rsp),%rdi
mov    $0x2d,%esi
call   1060 <memset@plt>
lea    0xa(%rsp),%rdi
mov    %ebp,%esi
mov    $0x1,%edx
call   1080 <draw_hangman@plt>
lea    0xe8c(%rip),%r14
xor    %r12d,%r12d
movl   $0x0,0x10(%rsp)
mov    %ebp,0x14(%rsp)
cs nopw 0x0(%rax,%rax,1)
lea    0x1(%r12),%r15
movslq %r15d,%r13
jmp    11e4 <play_hangman+0x84>
nopw   0x0(%rax,%rax,1)
test   %ebx,%ebx
jne    1240 <play_hangman+0xe0>
xor    %ebp,%ebp
lea    0xe42(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x9(%rsp),%rdi
call   1070 <gets@plt>
mov    $0x1,%ebx
jmp    1218 <play_hangman+0xb8>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ebp
cmp    %r12,%rax
jge    11e0 <play_hangman+0x80>
movsbl 0x9(%rsp),%esi
movslq %ebp,%rax
cmp    0x20(%rsp,%rax,1),%sil
jne    1210 <play_hangman+0xb0>
xor    %ebx,%ebx
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rax
mov    %r15d,%ebp
jmp    1210 <play_hangman+0xb0>
nopl   0x0(%rax,%rax,1)
mov    0x9(%rsp),%al
mov    %al,0x20(%rsp,%r15,1)
xor    %r13d,%r13d
mov    0x18(%rsp),%rcx
cmp    (%rcx),%al
jne    1280 <play_hangman+0x120>
mov    %al,0xa(%rsp)
movb   $0x20,(%rcx)
mov    0x10(%rsp),%edx
add    $0x1,%edx
xor    %r13d,%r13d
mov    0x14(%rsp),%ebp
cmp    %ebp,%edx
sete   %r13b
mov    $0x1,%ebx
cmp    0x1(%rcx),%al
je     128f <play_hangman+0x12f>
jmp    12a5 <play_hangman+0x145>
nopl   0x0(%rax)
xor    %ebx,%ebx
mov    0x14(%rsp),%ebp
mov    0x10(%rsp),%edx
cmp    0x1(%rcx),%al
jne    12a5 <play_hangman+0x145>
mov    %al,0xb(%rsp)
movb   $0x20,0x1(%rcx)
add    $0x1,%edx
cmp    %ebp,%edx
mov    $0x1,%ebx
cmove  %ebx,%r13d
cmp    0x2(%rcx),%al
je     12e0 <play_hangman+0x180>
cmp    0x3(%rcx),%al
je     12fb <play_hangman+0x19b>
cmp    0x4(%rcx),%al
je     1316 <play_hangman+0x1b6>
cmp    0x5(%rcx),%al
jne    1331 <play_hangman+0x1d1>
mov    %al,0xf(%rsp)
movb   $0x20,0x5(%rcx)
add    $0x1,%edx
mov    %edx,0x10(%rsp)
cmp    %ebp,%edx
mov    $0x1,%ebx
cmove  %ebx,%r13d
jmp    1335 <play_hangman+0x1d5>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %al,0xc(%rsp)
movb   $0x20,0x2(%rcx)
add    $0x1,%edx
cmp    %ebp,%edx
mov    $0x1,%ebx
cmove  %ebx,%r13d
cmp    0x3(%rcx),%al
jne    12af <play_hangman+0x14f>
mov    %al,0xd(%rsp)
movb   $0x20,0x3(%rcx)
add    $0x1,%edx
cmp    %ebp,%edx
mov    $0x1,%ebx
cmove  %ebx,%r13d
cmp    0x4(%rcx),%al
jne    12b4 <play_hangman+0x154>
mov    %al,0xe(%rsp)
movb   $0x20,0x4(%rcx)
add    $0x1,%edx
cmp    %ebp,%edx
mov    $0x1,%ebx
cmove  %ebx,%r13d
cmp    0x5(%rcx),%al
je     12b9 <play_hangman+0x159>
mov    %edx,0x10(%rsp)
lea    0xa(%rsp),%rdi
mov    %ebp,%esi
mov    $0x1,%edx
call   1080 <draw_hangman@plt>
lea    0x2(%r12),%esi
lea    0x20(%rsp),%rdi
mov    $0x2,%edx
call   1080 <draw_hangman@plt>
test   %ebx,%ebx
jne    136f <play_hangman+0x20f>
lea    0xd1a(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    $0x8,%r12
ja     1381 <play_hangman+0x221>
mov    %r15,%r12
test   %r13d,%r13d
je     11d0 <play_hangman+0x70>
test   %r13d,%r13d
je     1399 <play_hangman+0x239>
lea    0xd07(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    13a5 <play_hangman+0x245>
lea    0xd0f(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x68,%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 = [60 x i8] c"You already used the character %c, please enter a new one.\0A\00"
@.str.3 = [21 x i8] c"Incorrect guess: %d\0A\00"
@.str.4 = [27 x i8] c"You won, with %d guesses.\0A\00"
@.str.5 = [11 x i8] c"You lost.\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 i32
%8 = alloca i32
%9 = alloca i8
%10 = alloca [6 x i8]
%11 = alloca [64 x i8]
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
%15 = load i8*, i8** %2
%16 = call i32 @strlen(i8* %15)
store i32 %16, i32* %3
%17 = load i32, i32* %3
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %17)
store i32 0, i32* %4
br label %19
19: ; preds = %27, %1
%20 = load i32, i32* %4
%21 = load i32, i32* %3
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %30
23: ; preds = %19
%24 = load i32, i32* %4
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 %25
store i8 45, i8* %26
br label %27
27: ; preds = %23
%28 = load i32, i32* %4
%29 = add nsw i32 %28, 1
store i32 %29, i32* %4
br label %19
30: ; preds = %19
%31 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 0
%32 = load i32, i32* %3
%33 = call i32 @draw_hangman(i8* %31, i32 %32, i32 1)
store i32 0, i32* %6
br label %34
34: ; preds = %129, %30
%35 = load i32, i32* %12
%36 = icmp eq i32 %35, 0
br i1 %36, label %37, label %40
37: ; preds = %34
%38 = load i32, i32* %6
%39 = icmp eq i32 %38, 0
br label %40
40: ; preds = %37, %34
%41 = phi i1 [ false, %34 ], [ %39, %37 ]
br i1 %41, label %42, label %130
42: ; preds = %40
%43 = load i32, i32* %13
%44 = add nsw i32 %43, 1
store i32 %44, i32* %13
store i32 0, i32* %7
br label %45
45: ; preds = %73, %42
%46 = load i32, i32* %7
%47 = icmp eq i32 %46, 0
br i1 %47, label %48, label %74
48: ; preds = %45
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%50 = call i32 @gets(i8* %9)
store i32 1, i32* %7
store i32 0, i32* %4
br label %51
51: ; preds = %70, %48
%52 = load i32, i32* %4
%53 = load i32, i32* %13
%54 = icmp slt i32 %52, %53
br i1 %54, label %55, label %73
55: ; preds = %51
%56 = load i8, i8* %9
%57 = sext i8 %56 to i32
%58 = load i32, i32* %4
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 %59
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
%63 = icmp eq i32 %57, %62
br i1 %63, label %64, label %69
64: ; preds = %55
%65 = load i8, i8* %9
%66 = sext i8 %65 to i32
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0), i32 %66)
store i32 0, i32* %7
%68 = load i32, i32* %13
store i32 %68, i32* %4
br label %69
69: ; preds = %64, %55
br label %70
70: ; preds = %69
%71 = load i32, i32* %4
%72 = add nsw i32 %71, 1
store i32 %72, i32* %4
br label %51
73: ; preds = %51
br label %45
74: ; preds = %45
%75 = load i8, i8* %9
%76 = load i32, i32* %13
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 %77
store i8 %75, i8* %78
store i32 0, i32* %8
store i32 0, i32* %4
br label %79
79: ; preds = %109, %74
%80 = load i32, i32* %4
%81 = icmp sle i32 %80, 5
br i1 %81, label %82, label %112
82: ; preds = %79
%83 = load i8, i8* %9
%84 = sext i8 %83 to i32
%85 = load i8*, i8** %2
%86 = load i32, i32* %4
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds i8, i8* %85, i64 %87
%89 = load i8, i8* %88
%90 = sext i8 %89 to i32
%91 = icmp eq i32 %84, %90
br i1 %91, label %92, label %108
92: ; preds = %82
%93 = load i8, i8* %9
%94 = load i32, i32* %4
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 %95
store i8 %93, i8* %96
%97 = load i8*, i8** %2
%98 = load i32, i32* %4
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds i8, i8* %97, i64 %99
store i8 32, i8* %100
store i32 1, i32* %8
%101 = load i32, i32* %14
%102 = add nsw i32 %101, 1
store i32 %102, i32* %14
%103 = load i32, i32* %14
%104 = load i32, i32* %3
%105 = icmp eq i32 %103, %104
br i1 %105, label %106, label %107
106: ; preds = %92
store i32 1, i32* %6
br label %107
107: ; preds = %106, %92
br label %108
108: ; preds = %107, %82
br label %109
109: ; preds = %108
%110 = load i32, i32* %4
%111 = add nsw i32 %110, 1
store i32 %111, i32* %4
br label %79
112: ; preds = %79
%113 = getelementptr inbounds [6 x i8], [6 x i8]* %10, i64 0, i64 0
%114 = load i32, i32* %3
%115 = call i32 @draw_hangman(i8* %113, i32 %114, i32 1)
%116 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%117 = load i32, i32* %13
%118 = add nsw i32 %117, 1
%119 = call i32 @draw_hangman(i8* %116, i32 %118, i32 2)
%120 = load i32, i32* %8
%121 = icmp eq i32 %120, 0
br i1 %121, label %122, label %125
122: ; preds = %112
%123 = load i32, i32* %13
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %123)
br label %125
125: ; preds = %122, %112
%126 = load i32, i32* %13
%127 = icmp sge i32 %126, 10
br i1 %127, label %128, label %129
128: ; preds = %125
store i32 1, i32* %12
br label %129
129: ; preds = %128, %125
br label %34
130: ; preds = %40
%131 = load i32, i32* %6
%132 = icmp eq i32 %131, 1
br i1 %132, label %133, label %136
133: ; preds = %130
%134 = load i32, i32* %13
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i32 %134)
br label %138
136: ; preds = %130
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
br label %138
138: ; preds = %136, %133
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 = [60 x i8] c"You already used the character %c, please enter a new one.\0A\00"
@.str.3 = [21 x i8] c"Incorrect guess: %d\0A\00"
@.str.4 = [27 x i8] c"You won, with %d guesses.\0A\00"
@str = [10 x i8] c"You lost.\00"
define i32 @play_hangman(i8* %0) {
%2 = alloca i8
%3 = alloca [6 x i8]
%4 = alloca [64 x i8]
%5 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%7 = tail call i32 @strlen(i8* %0)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = icmp sgt i32 %7, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%12 = zext i32 %7 to i64
br label %13
13: ; preds = %10, %1
%14 = call i32 @draw_hangman(i8* %5, i32 %7, i32 1)
%15 = getelementptr inbounds i8, i8* %0, i64 1
%16 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 1
%17 = getelementptr inbounds i8, i8* %0, i64 2
%18 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 2
%19 = getelementptr inbounds i8, i8* %0, i64 3
%20 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 3
%21 = getelementptr inbounds i8, i8* %0, i64 4
%22 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 4
%23 = getelementptr inbounds i8, i8* %0, i64 5
%24 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 5
br label %25
25: ; preds = %13, %124
%26 = phi i64 [ 0, %13 ], [ %28, %124 ]
%27 = phi i32 [ 0, %13 ], [ %116, %124 ]
%28 = add nuw nsw i64 %26, 1
%29 = trunc i64 %28 to i32
%30 = shl i64 %28, 32
%31 = ashr exact i64 %30, 32
br label %34
32: ; preds = %48
%33 = icmp eq i32 %51, 0
br i1 %33, label %34, label %54
34: ; preds = %25, %32
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%36 = call i32 @gets(i8* %2)
br label %37
37: ; preds = %34, %48
%38 = phi i32 [ 1, %34 ], [ %51, %48 ]
%39 = phi i32 [ 0, %34 ], [ %52, %48 ]
%40 = load i8, i8* %2
%41 = sext i32 %39 to i64
%42 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 %41
%43 = load i8, i8* %42
%44 = icmp eq i8 %40, %43
br i1 %44, label %45, label %48
45: ; preds = %37
%46 = sext i8 %40 to i32
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0), i32 %46)
br label %48
48: ; preds = %37, %45
%49 = phi i64 [ %41, %37 ], [ %31, %45 ]
%50 = phi i32 [ %39, %37 ], [ %29, %45 ]
%51 = phi i32 [ %38, %37 ], [ 0, %45 ]
%52 = add nsw i32 %50, 1
%53 = icmp slt i64 %49, %26
br i1 %53, label %37, label %32
54: ; preds = %32
%55 = load i8, i8* %2
%56 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 %28
store i8 %55, i8* %56
%57 = load i8, i8* %0
%58 = icmp eq i8 %55, %57
br i1 %58, label %59, label %63
59: ; preds = %54
store i8 %55, i8* %5
store i8 32, i8* %0
%60 = add nsw i32 %27, 1
%61 = icmp eq i32 %60, %7
%62 = zext i1 %61 to i32
br label %63
63: ; preds = %59, %54
%64 = phi i32 [ 0, %54 ], [ %62, %59 ]
%65 = phi i32 [ 0, %54 ], [ 1, %59 ]
%66 = phi i32 [ %27, %54 ], [ %60, %59 ]
%67 = load i8, i8* %15
%68 = icmp eq i8 %55, %67
br i1 %68, label %69, label %73
69: ; preds = %63
store i8 %55, i8* %16
store i8 32, i8* %15
%70 = add nsw i32 %66, 1
%71 = icmp eq i32 %70, %7
%72 = select i1 %71, i32 1, i32 %64
br label %73
73: ; preds = %69, %63
%74 = phi i32 [ %64, %63 ], [ %72, %69 ]
%75 = phi i32 [ %65, %63 ], [ 1, %69 ]
%76 = phi i32 [ %66, %63 ], [ %70, %69 ]
%77 = load i8, i8* %17
%78 = icmp eq i8 %55, %77
br i1 %78, label %79, label %83
79: ; preds = %73
store i8 %55, i8* %18
store i8 32, i8* %17
%80 = add nsw i32 %76, 1
%81 = icmp eq i32 %80, %7
%82 = select i1 %81, i32 1, i32 %74
br label %83
83: ; preds = %79, %73
%84 = phi i32 [ %74, %73 ], [ %82, %79 ]
%85 = phi i32 [ %75, %73 ], [ 1, %79 ]
%86 = phi i32 [ %76, %73 ], [ %80, %79 ]
%87 = load i8, i8* %19
%88 = icmp eq i8 %55, %87
br i1 %88, label %89, label %93
89: ; preds = %83
store i8 %55, i8* %20
store i8 32, i8* %19
%90 = add nsw i32 %86, 1
%91 = icmp eq i32 %90, %7
%92 = select i1 %91, i32 1, i32 %84
br label %93
93: ; preds = %89, %83
%94 = phi i32 [ %84, %83 ], [ %92, %89 ]
%95 = phi i32 [ %85, %83 ], [ 1, %89 ]
%96 = phi i32 [ %86, %83 ], [ %90, %89 ]
%97 = load i8, i8* %21
%98 = icmp eq i8 %55, %97
br i1 %98, label %99, label %103
99: ; preds = %93
store i8 %55, i8* %22
store i8 32, i8* %21
%100 = add nsw i32 %96, 1
%101 = icmp eq i32 %100, %7
%102 = select i1 %101, i32 1, i32 %94
br label %103
103: ; preds = %99, %93
%104 = phi i32 [ %94, %93 ], [ %102, %99 ]
%105 = phi i32 [ %95, %93 ], [ 1, %99 ]
%106 = phi i32 [ %96, %93 ], [ %100, %99 ]
%107 = load i8, i8* %23
%108 = icmp eq i8 %55, %107
br i1 %108, label %109, label %113
109: ; preds = %103
store i8 %55, i8* %24
store i8 32, i8* %23
%110 = add nsw i32 %106, 1
%111 = icmp eq i32 %110, %7
%112 = select i1 %111, i32 1, i32 %104
br label %113
113: ; preds = %109, %103
%114 = phi i32 [ %104, %103 ], [ %112, %109 ]
%115 = phi i32 [ %105, %103 ], [ 1, %109 ]
%116 = phi i32 [ %106, %103 ], [ %110, %109 ]
%117 = call i32 @draw_hangman(i8* %5, i32 %7, i32 1)
%118 = trunc i64 %26 to i32
%119 = add i32 %118, 2
%120 = call i32 @draw_hangman(i8* %6, i32 %119, i32 2)
%121 = icmp eq i32 %115, 0
br i1 %121, label %122, label %124
122: ; preds = %113
%123 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %29)
br label %124
124: ; preds = %122, %113
%125 = icmp ult i64 %26, 9
%126 = icmp eq i32 %114, 0
%127 = select i1 %125, i1 %126, i1 false
br i1 %127, label %25, label %128
128: ; preds = %124
%129 = icmp eq i32 %114, 1
br i1 %129, label %130, label %133
130: ; preds = %128
%131 = trunc i64 %28 to i32
%132 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i32 %131)
br label %135
133: ; preds = %128
%134 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
br label %135
135: ; preds = %133, %130
ret i32 0
}