#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*/ printf(char *, ...);
void printStatus(unsigned int guessesLeft, char *currentGuess,
                 char *guessedChars) {
  printf("Word: %s\n", currentGuess);
  printf("Tries Left: %d\n", guessesLeft);
  printf("Guessed Letters: %s\n\n", guessedChars);
  printf("The Gallow\n\n");
  switch (guessesLeft) {
  case 10:
    printf("\n\n\n\n\n\n\n");
    break;
  case 9:
    printf("\n\n\n\n\n   \n_______________\n\n");
    break;
  case 8:
    printf("\n\n\n  |\n  |\n  |\n________________\n\n");
    break;
  case 7:
    printf("  |\n  |\n  |\n  |\n  |\n  |\n________________\n\n");
    break;
  case 6:
    printf(
        "  |--         \n  |\n  |\n  |\n  |\n  |\n  |\n________________\n\n");
    break;
  case 5:
    printf("  |------         \n  |\n  |\n  |\n  |\n  |\n  "
           "|\n________________\n\n");
    break;
  case 4:
    printf("  |------         \n  |     |\n  |\n  |\n  |\n  |\n  "
           "|\n________________\n\n");
    break;
  case 3:
    printf("  |------         \n  |     |\n  |     0\n  |\n  |\n  |\n  "
           "|\n________________\n\n");
    break;
  case 2:
    printf("  |------         \n  |     |\n  |     0\n  |    /|\\\n  |\n  |\n  "
           "|\n________________\n\n");
    break;
  case 1:
    printf("  |------         \n  |     |\n  |     0\n  |    /|\\\n  |     |\n "
           " |\n  |\n________________\n\n");
    break;
  case 0:
    printf("  |------         \n  |     |\n  |     0\n  |    /|\\\n  |     |\n "
           " |    / \\\n  |\n________________\n\n");
    break;
  }
}


x86 assembly (clang, -O0):
<printStatus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xefe(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x21(%rbp)
call   1030 <printf@plt>
mov    -0x21(%rbp),%al
mov    -0x4(%rbp),%esi
lea    0xef1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x21(%rbp),%al
mov    -0x18(%rbp),%rsi
lea    0xeee(%rip),%rdi
call   1030 <printf@plt>
mov    -0x21(%rbp),%al
lea    0xef5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    %rax,-0x20(%rbp)
sub    $0xa,%rax
ja     125d <printStatus+0x14d>
mov    -0x20(%rbp),%rax
lea    0xe78(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    125d <printStatus+0x14d>
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    125d <printStatus+0x14d>
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    125d <printStatus+0x14d>
lea    0xf2a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    125d <printStatus+0x14d>
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    125d <printStatus+0x14d>
lea    0xef1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    125d <printStatus+0x14d>
lea    0xf1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    125d <printStatus+0x14d>
lea    0xf4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    125d <printStatus+0x14d>
lea    0xf84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    125d <printStatus+0x14d>
lea    0xfc2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    125d <printStatus+0x14d>
lea    0x1006(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printStatus>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %edi,%ebx
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecc(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecc(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
cmp    $0xa,%ebx
ja     1186 <printStatus+0x66>
movslq %ebx,%rax
lea    0x1111(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Word: %s\0A\00"
@.str.1 = [16 x i8] c"Tries Left: %d\0A\00"
@.str.2 = [22 x i8] c"Guessed Letters: %s\0A\0A\00"
@.str.3 = [13 x i8] c"The Gallow\0A\0A\00"
@.str.4 = [8 x i8] c"\0A\0A\0A\0A\0A\0A\0A\00"
@.str.5 = [27 x i8] c"\0A\0A\0A\0A\0A \0A_______________\0A\0A\00"
@.str.6 = [34 x i8] c"\0A\0A\0A |\0A |\0A |\0A________________\0A\0A\00"
@.str.7 = [43 x i8] c" |\0A |\0A |\0A |\0A |\0A |\0A________________\0A\0A\00"
@.str.8 = [58 x i8] c" |-- \0A |\0A |\0A |\0A |\0A |\0A |\0A________________\0A\0A\00"
@.str.9 = [62 x i8] c" |------ \0A |\0A |\0A |\0A |\0A |\0A |\0A________________\0A\0A\00"
@.str.10 = [68 x i8] c" |------ \0A | |\0A |\0A |\0A |\0A |\0A |\0A________________\0A\0A\00"
@.str.11 = [74 x i8] c" |------ \0A | |\0A | 0\0A |\0A |\0A |\0A |\0A________________\0A\0A\00"
@.str.12 = [81 x i8] c" |------ \0A | |\0A | 0\0A | /|\\\0A |\0A |\0A |\0A________________\0A\0A\00"
@.str.13 = [87 x i8] c" |------ \0A | |\0A | 0\0A | /|\\\0A | |\0A |\0A |\0A________________\0A\0A\00"
@.str.14 = [94 x i8] c" |------ \0A | |\0A | 0\0A | /|\\\0A | |\0A | / \\\0A |\0A________________\0A\0A\00"
define void @printStatus(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i32, i32* %4
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i8*, i8** %6
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %11)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%14 = load i32, i32* %4
switch i32 %14, label %37 [
i32 10, label %15
i32 9, label %17
i32 8, label %19
i32 7, label %21
i32 6, label %23
i32 5, label %25
i32 4, label %27
i32 3, label %29
i32 2, label %31
i32 1, label %33
i32 0, label %35
]
15: ; preds = %3
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %37
17: ; preds = %3
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
br label %37
19: ; preds = %3
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0))
br label %37
21: ; preds = %3
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0))
br label %37
23: ; preds = %3
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.8, i64 0, i64 0))
br label %37
25: ; preds = %3
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.9, i64 0, i64 0))
br label %37
27: ; preds = %3
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.10, i64 0, i64 0))
br label %37
29: ; preds = %3
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.11, i64 0, i64 0))
br label %37
31: ; preds = %3
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.12, i64 0, i64 0))
br label %37
33: ; preds = %3
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.13, i64 0, i64 0))
br label %37
35: ; preds = %3
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.14, i64 0, i64 0))
br label %37
37: ; preds = %3, %35, %33, %31, %29, %27, %25, %23, %21, %19, %17, %15
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"Word: %s\0A\00"
@.str.1 = [16 x i8] c"Tries Left: %d\0A\00"
@.str.2 = [22 x i8] c"Guessed Letters: %s\0A\0A\00"
@str = [12 x i8] c"The Gallow\0A\00"
@str.15 = [93 x i8] c" |------ \0A | |\0A | 0\0A | /|\\\0A | |\0A | / \\\0A |\0A________________\0A\00"
@str.16 = [86 x i8] c" |------ \0A | |\0A | 0\0A | /|\\\0A | |\0A |\0A |\0A________________\0A\00"
@str.17 = [80 x i8] c" |------ \0A | |\0A | 0\0A | /|\\\0A |\0A |\0A |\0A________________\0A\00"
@str.18 = [73 x i8] c" |------ \0A | |\0A | 0\0A |\0A |\0A |\0A |\0A________________\0A\00"
@str.19 = [67 x i8] c" |------ \0A | |\0A |\0A |\0A |\0A |\0A |\0A________________\0A\00"
@str.20 = [61 x i8] c" |------ \0A |\0A |\0A |\0A |\0A |\0A |\0A________________\0A\00"
@str.21 = [57 x i8] c" |-- \0A |\0A |\0A |\0A |\0A |\0A |\0A________________\0A\00"
@str.22 = [42 x i8] c" |\0A |\0A |\0A |\0A |\0A |\0A________________\0A\00"
@str.23 = [33 x i8] c"\0A\0A\0A |\0A |\0A |\0A________________\0A\00"
@str.24 = [26 x i8] c"\0A\0A\0A\0A\0A \0A_______________\0A\00"
@str.25 = [7 x i8] c"\0A\0A\0A\0A\0A\0A\00"
@reltable.printStatus = [11 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([93 x i8]* @str.15 to i64), i64 ptrtoint ([11 x i32]* @reltable.printStatus to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([86 x i8]* @str.16 to i64), i64 ptrtoint ([11 x i32]* @reltable.printStatus to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([80 x i8]* @str.17 to i64), i64 ptrtoint ([11 x i32]* @reltable.printStatus to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([73 x i8]* @str.18 to i64), i64 ptrtoint ([11 x i32]* @reltable.printStatus to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([67 x i8]* @str.19 to i64), i64 ptrtoint ([11 x i32]* @reltable.printStatus to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([61 x i8]* @str.20 to i64), i64 ptrtoint ([11 x i32]* @reltable.printStatus to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([57 x i8]* @str.21 to i64), i64 ptrtoint ([11 x i32]* @reltable.printStatus to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([42 x i8]* @str.22 to i64), i64 ptrtoint ([11 x i32]* @reltable.printStatus to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([33 x i8]* @str.23 to i64), i64 ptrtoint ([11 x i32]* @reltable.printStatus to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @str.24 to i64), i64 ptrtoint ([11 x i32]* @reltable.printStatus to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @str.25 to i64), i64 ptrtoint ([11 x i32]* @reltable.printStatus to i64)) to i32)]
define void @printStatus(i32 %0, i8* %1, i8* %2) {
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %1)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%8 = icmp ult i32 %0, 11
br i1 %8, label %9, label %14
9: ; preds = %3
%10 = sext i32 %0 to i64
%11 = shl i64 %10, 2
%12 = call i8* @llvm.load.relative.i64(i8* bitcast ([11 x i32]* @reltable.printStatus to i8*), i64 %11)
%13 = tail call i32 @puts(i8* dereferenceable(1) %12)
br label %14
14: ; preds = %3, %9
ret void
}