#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*/ printextralines(int, int, char *);
int /*<<< orphan*/ printf(char *, ...);
int play_hangman(char hiddenword[7], int wordsize) {
  int index;
  int runloop1;
  int foundcharinword;
  char storechar;
  char guessedword[7];
  char originalword[7];
  char lettersguessed[64];
  int playthegame = 0;
  int countguesses = -1;
  int foundchar = -2;
  int playerwins = 0;
  for (index = 0; index < wordsize; index++) {
    guessedword[index] = '-';
  }
  for (index = 0; index < wordsize; index++) {
    originalword[index] = hiddenword[index];
  }
  printf("You must attempt to guess a word of lenth: %d\n", wordsize);
  draw_hangman(guessedword, wordsize, 0);
  while (playthegame == 0) {
    countguesses++;
    runloop1 = 0;
    while (runloop1 == 0) {
      printf("Guess a character? ");
      gets(&storechar);
      runloop1 = 1;
      for (index = 0; index < countguesses; index++) {
        if (storechar == lettersguessed[index]) {
          printf("The character %c is already in the list, please enter a new "
                 "one.\n",
                 storechar);
          runloop1 = 0;
          index = countguesses;
        }
      }
    }
    lettersguessed[countguesses] = storechar;
    foundcharinword = 0;
    for (index = 0; index < 7; index++) {
      if (storechar == hiddenword[index]) {
        guessedword[index] = storechar;
        hiddenword[index] = '?';
        foundcharinword = 1;
        foundchar++;
        if (foundchar >= wordsize)
          playerwins = 1;
      }
    }
    draw_hangman(guessedword, wordsize, 0);
    draw_hangman(lettersguessed, countguesses, 1);
    if (foundcharinword == 0) {
      draw_hangman(lettersguessed, countguesses, 2);
    }
    if (countguesses >= 10 || playerwins == 1) {
      playthegame = 1;
    }
  }
  printextralines(playerwins, countguesses, originalword);
  return 0;
}


x86 assembly (clang, -O0):
<play_hangman>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x74(%rbp)
movl   $0xffffffff,-0x78(%rbp)
movl   $0xfffffffe,-0x7c(%rbp)
movl   $0x0,-0x80(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1198 <play_hangman+0x58>
movslq -0x10(%rbp),%rax
movb   $0x2d,-0x20(%rbp,%rax,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1175 <play_hangman+0x35>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11cc <play_hangman+0x8c>
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    119f <play_hangman+0x5f>
mov    -0xc(%rbp),%esi
lea    0xe2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1060 <draw_hangman@plt>
cmpl   $0x0,-0x74(%rbp)
jne    1373 <play_hangman+0x233>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    128c <play_hangman+0x14c>
lea    0xe19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x19(%rbp),%rdi
call   1050 <gets@plt>
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x78(%rbp),%eax
jge    1287 <play_hangman+0x147>
movsbl -0x19(%rbp),%eax
movslq -0x10(%rbp),%rcx
movsbl -0x70(%rbp,%rcx,1),%ecx
cmp    %ecx,%eax
jne    1274 <play_hangman+0x134>
movsbl -0x19(%rbp),%esi
lea    0xde3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x78(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1279 <play_hangman+0x139>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1234 <play_hangman+0xf4>
jmp    1205 <play_hangman+0xc5>
mov    -0x19(%rbp),%cl
movslq -0x78(%rbp),%rax
mov    %cl,-0x70(%rbp,%rax,1)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x7,-0x10(%rbp)
jge    1319 <play_hangman+0x1d9>
movsbl -0x19(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    1306 <play_hangman+0x1c6>
mov    -0x19(%rbp),%cl
movslq -0x10(%rbp),%rax
mov    %cl,-0x20(%rbp,%rax,1)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x3f,(%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     1301 <play_hangman+0x1c1>
movl   $0x1,-0x80(%rbp)
jmp    1306 <play_hangman+0x1c6>
jmp    130b <play_hangman+0x1cb>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    12a5 <play_hangman+0x165>
lea    -0x20(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1060 <draw_hangman@plt>
lea    -0x70(%rbp),%rdi
mov    -0x78(%rbp),%esi
mov    $0x1,%edx
call   1060 <draw_hangman@plt>
cmpl   $0x0,-0x18(%rbp)
jne    1353 <play_hangman+0x213>
lea    -0x70(%rbp),%rdi
mov    -0x78(%rbp),%esi
mov    $0x2,%edx
call   1060 <draw_hangman@plt>
cmpl   $0xa,-0x78(%rbp)
jge    1367 <play_hangman+0x227>
cmpl   $0x1,-0x80(%rbp)
jne    136e <play_hangman+0x22e>
movl   $0x1,-0x74(%rbp)
jmp    11eb <play_hangman+0xab>
mov    -0x80(%rbp),%edi
mov    -0x78(%rbp),%esi
lea    -0x27(%rbp),%rdx
call   1040 <printextralines@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    $0x78,%rsp
mov    %rdi,%rbp
test   %esi,%esi
mov    %esi,%ebx
jle    119c <play_hangman+0x3c>
mov    %esi,%r14d
lea    0x15(%rsp),%rdi
mov    $0x2d,%esi
mov    %r14,%rdx
call   1040 <memset@plt>
lea    0x21(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1060 <memcpy@plt>
mov    %rbp,0x28(%rsp)
lea    0xe58(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x15(%rsp),%rdi
mov    %ebx,%esi
xor    %edx,%edx
call   1080 <draw_hangman@plt>
mov    $0xfffffffe,%r14d
mov    $0xffffffffffffffff,%r15
lea    0xe70(%rip),%r13
xor    %edi,%edi
mov    %ebx,0x1c(%rsp)
nopl   0x0(%rax)
mov    %edi,0x10(%rsp)
lea    0x1(%r15),%r12
movslq %r12d,%rbp
jmp    11f4 <play_hangman+0x94>
nopl   (%rax)
test   %ebx,%ebx
jne    1250 <play_hangman+0xf0>
lea    0xe34(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf(%rsp),%rdi
call   1070 <gets@plt>
test   %r15,%r15
js     1250 <play_hangman+0xf0>
xor    %eax,%eax
mov    $0x1,%ebx
jmp    1228 <play_hangman+0xc8>
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
cmp    %r15,%rcx
jge    11f0 <play_hangman+0x90>
movsbl 0xf(%rsp),%esi
movslq %eax,%rcx
cmp    0x30(%rsp,%rcx,1),%sil
jne    1220 <play_hangman+0xc0>
xor    %ebx,%ebx
mov    %r13,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbp,%rcx
mov    %r12d,%eax
jmp    1220 <play_hangman+0xc0>
nopl   0x0(%rax,%rax,1)
mov    0xf(%rsp),%al
mov    %al,0x30(%rsp,%r12,1)
xor    %ebp,%ebp
mov    0x28(%rsp),%rcx
cmp    (%rcx),%al
jne    1290 <play_hangman+0x130>
mov    %al,0x15(%rsp)
movb   $0x3f,(%rcx)
add    $0x1,%r14d
mov    0x1c(%rsp),%esi
cmp    %esi,%r14d
mov    $0x1,%ebp
mov    0x10(%rsp),%edx
cmovge %ebp,%edx
cmp    0x1(%rcx),%al
je     129d <play_hangman+0x13d>
jmp    12b4 <play_hangman+0x154>
nopl   0x0(%rax)
mov    0x1c(%rsp),%esi
mov    0x10(%rsp),%edx
cmp    0x1(%rcx),%al
jne    12b4 <play_hangman+0x154>
mov    %al,0x16(%rsp)
movb   $0x3f,0x1(%rcx)
add    $0x1,%r14d
cmp    %esi,%r14d
mov    $0x1,%ebp
cmovge %ebp,%edx
cmp    0x2(%rcx),%al
je     1350 <play_hangman+0x1f0>
cmp    0x3(%rcx),%al
je     1370 <play_hangman+0x210>
cmp    0x4(%rcx),%al
je     1390 <play_hangman+0x230>
cmp    0x5(%rcx),%al
je     13b0 <play_hangman+0x250>
cmp    0x6(%rcx),%al
jne    12f4 <play_hangman+0x194>
mov    %al,0x1b(%rsp)
movb   $0x3f,0x6(%rcx)
add    $0x1,%r14d
cmp    %esi,%r14d
mov    $0x1,%ebp
cmovge %ebp,%edx
mov    %edx,0x10(%rsp)
lea    0x15(%rsp),%rdi
xor    %edx,%edx
call   1080 <draw_hangman@plt>
lea    0x30(%rsp),%rdi
mov    %r12d,%esi
mov    $0x1,%edx
call   1080 <draw_hangman@plt>
test   %ebp,%ebp
jne    132c <play_hangman+0x1cc>
lea    0x30(%rsp),%rdi
mov    %r12d,%esi
mov    $0x2,%edx
call   1080 <draw_hangman@plt>
cmp    $0x8,%r15
mov    0x10(%rsp),%edi
jg     13d5 <play_hangman+0x275>
mov    %r12,%r15
cmp    $0x1,%edi
jne    11e0 <play_hangman+0x80>
jmp    13d5 <play_hangman+0x275>
nopl   0x0(%rax,%rax,1)
mov    %al,0x17(%rsp)
movb   $0x3f,0x2(%rcx)
add    $0x1,%r14d
cmp    %esi,%r14d
mov    $0x1,%ebp
cmovge %ebp,%edx
cmp    0x3(%rcx),%al
jne    12c6 <play_hangman+0x166>
mov    %al,0x18(%rsp)
movb   $0x3f,0x3(%rcx)
add    $0x1,%r14d
cmp    %esi,%r14d
mov    $0x1,%ebp
cmovge %ebp,%edx
cmp    0x4(%rcx),%al
jne    12cf <play_hangman+0x16f>
mov    %al,0x19(%rsp)
movb   $0x3f,0x4(%rcx)
add    $0x1,%r14d
cmp    %esi,%r14d
mov    $0x1,%ebp
cmovge %ebp,%edx
cmp    0x5(%rcx),%al
jne    12d8 <play_hangman+0x178>
mov    %al,0x1a(%rsp)
movb   $0x3f,0x5(%rcx)
add    $0x1,%r14d
cmp    %esi,%r14d
mov    $0x1,%ebp
cmovge %ebp,%edx
cmp    0x6(%rcx),%al
je     12dd <play_hangman+0x17d>
jmp    12f4 <play_hangman+0x194>
lea    0x21(%rsp),%rdx
mov    %r12d,%esi
call   1050 <printextralines@plt>
xor    %eax,%eax
add    $0x78,%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 = [66 x i8] c"The character %c is already in the list, please enter a new one.\0A\00"
define i32 @play_hangman(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
%9 = alloca [7 x i8]
%10 = alloca [7 x i8]
%11 = alloca [64 x i8]
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %12
store i32 -1, i32* %13
store i32 -2, i32* %14
store i32 0, i32* %15
store i32 0, i32* %5
br label %16
16: ; preds = %24, %2
%17 = load i32, i32* %5
%18 = load i32, i32* %4
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %27
20: ; preds = %16
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [7 x i8], [7 x i8]* %9, i64 0, i64 %22
store i8 45, i8* %23
br label %24
24: ; preds = %20
%25 = load i32, i32* %5
%26 = add nsw i32 %25, 1
store i32 %26, i32* %5
br label %16
27: ; preds = %16
store i32 0, i32* %5
br label %28
28: ; preds = %41, %27
%29 = load i32, i32* %5
%30 = load i32, i32* %4
%31 = icmp slt i32 %29, %30
br i1 %31, label %32, label %44
32: ; preds = %28
%33 = load i8*, i8** %3
%34 = load i32, i32* %5
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8, i8* %33, i64 %35
%37 = load i8, i8* %36
%38 = load i32, i32* %5
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [7 x i8], [7 x i8]* %10, i64 0, i64 %39
store i8 %37, i8* %40
br label %41
41: ; preds = %32
%42 = load i32, i32* %5
%43 = add nsw i32 %42, 1
store i32 %43, i32* %5
br label %28
44: ; preds = %28
%45 = load i32, i32* %4
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %45)
%47 = getelementptr inbounds [7 x i8], [7 x i8]* %9, i64 0, i64 0
%48 = load i32, i32* %4
%49 = call i32 @draw_hangman(i8* %47, i32 %48, i32 0)
br label %50
50: ; preds = %143, %44
%51 = load i32, i32* %12
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %144
53: ; preds = %50
%54 = load i32, i32* %13
%55 = add nsw i32 %54, 1
store i32 %55, i32* %13
store i32 0, i32* %6
br label %56
56: ; preds = %84, %53
%57 = load i32, i32* %6
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %85
59: ; preds = %56
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%61 = call i32 @gets(i8* %8)
store i32 1, i32* %6
store i32 0, i32* %5
br label %62
62: ; preds = %81, %59
%63 = load i32, i32* %5
%64 = load i32, i32* %13
%65 = icmp slt i32 %63, %64
br i1 %65, label %66, label %84
66: ; preds = %62
%67 = load i8, i8* %8
%68 = sext i8 %67 to i32
%69 = load i32, i32* %5
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 %70
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = icmp eq i32 %68, %73
br i1 %74, label %75, label %80
75: ; preds = %66
%76 = load i8, i8* %8
%77 = sext i8 %76 to i32
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0), i32 %77)
store i32 0, i32* %6
%79 = load i32, i32* %13
store i32 %79, i32* %5
br label %80
80: ; preds = %75, %66
br label %81
81: ; preds = %80
%82 = load i32, i32* %5
%83 = add nsw i32 %82, 1
store i32 %83, i32* %5
br label %62
84: ; preds = %62
br label %56
85: ; preds = %56
%86 = load i8, i8* %8
%87 = load i32, i32* %13
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 %88
store i8 %86, i8* %89
store i32 0, i32* %7
store i32 0, i32* %5
br label %90
90: ; preds = %120, %85
%91 = load i32, i32* %5
%92 = icmp slt i32 %91, 7
br i1 %92, label %93, label %123
93: ; preds = %90
%94 = load i8, i8* %8
%95 = sext i8 %94 to i32
%96 = load i8*, i8** %3
%97 = load i32, i32* %5
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds i8, i8* %96, i64 %98
%100 = load i8, i8* %99
%101 = sext i8 %100 to i32
%102 = icmp eq i32 %95, %101
br i1 %102, label %103, label %119
103: ; preds = %93
%104 = load i8, i8* %8
%105 = load i32, i32* %5
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [7 x i8], [7 x i8]* %9, i64 0, i64 %106
store i8 %104, i8* %107
%108 = load i8*, i8** %3
%109 = load i32, i32* %5
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds i8, i8* %108, i64 %110
store i8 63, i8* %111
store i32 1, i32* %7
%112 = load i32, i32* %14
%113 = add nsw i32 %112, 1
store i32 %113, i32* %14
%114 = load i32, i32* %14
%115 = load i32, i32* %4
%116 = icmp sge i32 %114, %115
br i1 %116, label %117, label %118
117: ; preds = %103
store i32 1, i32* %15
br label %118
118: ; preds = %117, %103
br label %119
119: ; preds = %118, %93
br label %120
120: ; preds = %119
%121 = load i32, i32* %5
%122 = add nsw i32 %121, 1
store i32 %122, i32* %5
br label %90
123: ; preds = %90
%124 = getelementptr inbounds [7 x i8], [7 x i8]* %9, i64 0, i64 0
%125 = load i32, i32* %4
%126 = call i32 @draw_hangman(i8* %124, i32 %125, i32 0)
%127 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%128 = load i32, i32* %13
%129 = call i32 @draw_hangman(i8* %127, i32 %128, i32 1)
%130 = load i32, i32* %7
%131 = icmp eq i32 %130, 0
br i1 %131, label %132, label %136
132: ; preds = %123
%133 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%134 = load i32, i32* %13
%135 = call i32 @draw_hangman(i8* %133, i32 %134, i32 2)
br label %136
136: ; preds = %132, %123
%137 = load i32, i32* %13
%138 = icmp sge i32 %137, 10
br i1 %138, label %142, label %139
139: ; preds = %136
%140 = load i32, i32* %15
%141 = icmp eq i32 %140, 1
br i1 %141, label %142, label %143
142: ; preds = %139, %136
store i32 1, i32* %12
br label %143
143: ; preds = %142, %139
br label %50
144: ; preds = %50
%145 = load i32, i32* %15
%146 = load i32, i32* %13
%147 = getelementptr inbounds [7 x i8], [7 x i8]* %10, i64 0, i64 0
%148 = call i32 @printextralines(i32 %145, i32 %146, i8* %147)
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 = [66 x i8] c"The character %c is already in the list, please enter a new one.\0A\00"
define i32 @play_hangman(i8* nocapture %0, i32 %1) {
%3 = alloca i8
%4 = alloca [7 x i8]
%5 = alloca [7 x i8]
%6 = alloca [64 x i8]
%7 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [7 x i8], [7 x i8]* %5, i64 0, i64 0
%9 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 0
%10 = icmp sgt i32 %1, 0
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = getelementptr inbounds [7 x i8], [7 x i8]* %5, i64 0, i64 0
%13 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 0
%14 = zext i32 %1 to i64
%15 = zext i32 %1 to i64
br label %16
16: ; preds = %2, %11
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %1)
%18 = call i32 @draw_hangman(i8* %7, i32 %1, i32 0)
%19 = getelementptr inbounds i8, i8* %0, i64 1
%20 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 1
%21 = getelementptr inbounds i8, i8* %0, i64 2
%22 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 2
%23 = getelementptr inbounds i8, i8* %0, i64 3
%24 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 3
%25 = getelementptr inbounds i8, i8* %0, i64 4
%26 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 4
%27 = getelementptr inbounds i8, i8* %0, i64 5
%28 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 5
%29 = getelementptr inbounds i8, i8* %0, i64 6
%30 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 6
br label %31
31: ; preds = %16, %140
%32 = phi i64 [ -1, %16 ], [ %35, %140 ]
%33 = phi i32 [ 0, %16 ], [ %134, %140 ]
%34 = phi i32 [ -2, %16 ], [ %133, %140 ]
%35 = add nsw i64 %32, 1
%36 = icmp slt i64 %32, 0
%37 = trunc i64 %35 to i32
%38 = shl i64 %35, 32
%39 = ashr exact i64 %38, 32
br label %42
40: ; preds = %56
%41 = icmp eq i32 %59, 0
br i1 %41, label %42, label %62
42: ; preds = %31, %40
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%44 = call i32 @gets(i8* %3)
br i1 %36, label %62, label %45
45: ; preds = %42, %56
%46 = phi i32 [ %59, %56 ], [ 1, %42 ]
%47 = phi i32 [ %60, %56 ], [ 0, %42 ]
%48 = load i8, i8* %3
%49 = sext i32 %47 to i64
%50 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 %49
%51 = load i8, i8* %50
%52 = icmp eq i8 %48, %51
br i1 %52, label %53, label %56
53: ; preds = %45
%54 = sext i8 %48 to i32
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.2, i64 0, i64 0), i32 %54)
br label %56
56: ; preds = %45, %53
%57 = phi i64 [ %49, %45 ], [ %39, %53 ]
%58 = phi i32 [ %47, %45 ], [ %37, %53 ]
%59 = phi i32 [ %46, %45 ], [ 0, %53 ]
%60 = add nsw i32 %58, 1
%61 = icmp slt i64 %57, %32
br i1 %61, label %45, label %40
62: ; preds = %42, %40
%63 = load i8, i8* %3
%64 = getelementptr inbounds [64 x i8], [64 x i8]* %6, i64 0, i64 %35
store i8 %63, i8* %64
%65 = load i8, i8* %0
%66 = icmp eq i8 %63, %65
br i1 %66, label %67, label %71
67: ; preds = %62
store i8 %63, i8* %7
store i8 63, i8* %0
%68 = add nsw i32 %34, 1
%69 = icmp slt i32 %68, %1
%70 = select i1 %69, i32 %33, i32 1
br label %71
71: ; preds = %67, %62
%72 = phi i32 [ 0, %62 ], [ 1, %67 ]
%73 = phi i32 [ %34, %62 ], [ %68, %67 ]
%74 = phi i32 [ %33, %62 ], [ %70, %67 ]
%75 = load i8, i8* %19
%76 = icmp eq i8 %63, %75
br i1 %76, label %77, label %81
77: ; preds = %71
store i8 %63, i8* %20
store i8 63, i8* %19
%78 = add nsw i32 %73, 1
%79 = icmp slt i32 %78, %1
%80 = select i1 %79, i32 %74, i32 1
br label %81
81: ; preds = %77, %71
%82 = phi i32 [ %72, %71 ], [ 1, %77 ]
%83 = phi i32 [ %73, %71 ], [ %78, %77 ]
%84 = phi i32 [ %74, %71 ], [ %80, %77 ]
%85 = load i8, i8* %21
%86 = icmp eq i8 %63, %85
br i1 %86, label %87, label %91
87: ; preds = %81
store i8 %63, i8* %22
store i8 63, i8* %21
%88 = add nsw i32 %83, 1
%89 = icmp slt i32 %88, %1
%90 = select i1 %89, i32 %84, i32 1
br label %91
91: ; preds = %87, %81
%92 = phi i32 [ %82, %81 ], [ 1, %87 ]
%93 = phi i32 [ %83, %81 ], [ %88, %87 ]
%94 = phi i32 [ %84, %81 ], [ %90, %87 ]
%95 = load i8, i8* %23
%96 = icmp eq i8 %63, %95
br i1 %96, label %97, label %101
97: ; preds = %91
store i8 %63, i8* %24
store i8 63, i8* %23
%98 = add nsw i32 %93, 1
%99 = icmp slt i32 %98, %1
%100 = select i1 %99, i32 %94, i32 1
br label %101
101: ; preds = %97, %91
%102 = phi i32 [ %92, %91 ], [ 1, %97 ]
%103 = phi i32 [ %93, %91 ], [ %98, %97 ]
%104 = phi i32 [ %94, %91 ], [ %100, %97 ]
%105 = load i8, i8* %25
%106 = icmp eq i8 %63, %105
br i1 %106, label %107, label %111
107: ; preds = %101
store i8 %63, i8* %26
store i8 63, i8* %25
%108 = add nsw i32 %103, 1
%109 = icmp slt i32 %108, %1
%110 = select i1 %109, i32 %104, i32 1
br label %111
111: ; preds = %107, %101
%112 = phi i32 [ %102, %101 ], [ 1, %107 ]
%113 = phi i32 [ %103, %101 ], [ %108, %107 ]
%114 = phi i32 [ %104, %101 ], [ %110, %107 ]
%115 = load i8, i8* %27
%116 = icmp eq i8 %63, %115
br i1 %116, label %117, label %121
117: ; preds = %111
store i8 %63, i8* %28
store i8 63, i8* %27
%118 = add nsw i32 %113, 1
%119 = icmp slt i32 %118, %1
%120 = select i1 %119, i32 %114, i32 1
br label %121
121: ; preds = %117, %111
%122 = phi i32 [ %112, %111 ], [ 1, %117 ]
%123 = phi i32 [ %113, %111 ], [ %118, %117 ]
%124 = phi i32 [ %114, %111 ], [ %120, %117 ]
%125 = load i8, i8* %29
%126 = icmp eq i8 %63, %125
br i1 %126, label %127, label %131
127: ; preds = %121
store i8 %63, i8* %30
store i8 63, i8* %29
%128 = add nsw i32 %123, 1
%129 = icmp slt i32 %128, %1
%130 = select i1 %129, i32 %124, i32 1
br label %131
131: ; preds = %127, %121
%132 = phi i32 [ %122, %121 ], [ 1, %127 ]
%133 = phi i32 [ %123, %121 ], [ %128, %127 ]
%134 = phi i32 [ %124, %121 ], [ %130, %127 ]
%135 = call i32 @draw_hangman(i8* %7, i32 %1, i32 0)
%136 = call i32 @draw_hangman(i8* %9, i32 %37, i32 1)
%137 = icmp eq i32 %132, 0
br i1 %137, label %138, label %140
138: ; preds = %131
%139 = call i32 @draw_hangman(i8* %9, i32 %37, i32 2)
br label %140
140: ; preds = %138, %131
%141 = icmp slt i64 %32, 9
%142 = icmp ne i32 %134, 1
%143 = select i1 %141, i1 %142, i1 false
br i1 %143, label %31, label %144
144: ; preds = %140
%145 = trunc i64 %35 to i32
%146 = call i32 @printextralines(i32 %134, i32 %145, i8* %8)
ret i32 0
}