#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 EXIT_SUCCESS;
int checkLowercase(char *);
int /*<<< orphan*/ printImage(int);
int /*<<< orphan*/ printIntro();
int /*<<< orphan*/ printf(char *, ...);
int rand();
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int strlen(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  printIntro();
  printf("How many words in the word bank? (Enter an integer)\n");
  int numOfWords = 0;
  scanf("%d", &numOfWords);
  char wordList[numOfWords][50];
  printf("\n");
  int counter = 0;
  while (counter < numOfWords) {
    printf("What is word %d?\n", (counter + 1));
    printf("(Maximum permitted word length is 50 letters)\n");
    printf("(Lowercase letters ONLY)\n");
    char inputString[50];
    scanf("%s", inputString);
    if (checkLowercase(inputString) == 1) {
      int counter2;
      for (counter2 = 0; counter2 < 50; counter2++) {
        wordList[counter][counter2] = inputString[counter2];
      }
      counter++;
      printf("\n");
    } else {
      printf("Invalid input. Try again.\n\n");
      continue;
    }
  }
  int replay = 1;
  while (replay == 1) {
    srand(time(NULL));
    int wordNum = (int)(rand() % numOfWords);
    char *word = &wordList[wordNum][0];
    int solvedStatus = 0;
    int mistakes = 0;
    int solvedArray[(int)strlen(word)];
    for (counter = 0; counter < strlen(word); counter++) {
      solvedArray[counter] = 0;
    }
    int checkArray[(int)strlen(word)];
    for (counter = 0; counter < strlen(word); counter++) {
      checkArray[counter] = 0;
    }
    printf("Let's Start!\n");
    while ((solvedStatus == 0) && (mistakes < 7)) {
      printf("=========================================\n");
      printf("The word contains %d letters.\n", (int)strlen(word));
      printf("Enter a letter: ");
      char letter[50];
      scanf(" %s", &letter[0]);
      printf("You entered: %c\n", letter[0]);
      int unsolvedLetters = 0;
      for (counter = 0; counter < strlen(word); counter++) {
        if (word[counter] == letter[0]) {
          checkArray[counter] = 1;
        } else {
          checkArray[counter] = 0;
          unsolvedLetters++;
        }
      }
      if (unsolvedLetters == strlen(word)) {
        mistakes++;
      }
      printf("Number of mistakes: %d\n", mistakes);
      printImage(mistakes);
      counter = 0;
      while (counter < strlen(word)) {
        if ((checkArray[counter] == 0) && (solvedArray[counter] == 0)) {
          solvedArray[counter] = 0;
        } else {
          solvedArray[counter] = 1;
        }
        counter++;
      }
      for (counter = 0; counter < strlen(word); counter++) {
        checkArray[counter] = 0;
      }
      int solvedLetters = 0;
      for (counter = 0; counter < strlen(word); counter++) {
        if (solvedArray[counter] == 1) {
          solvedLetters++;
        }
      }
      if (solvedLetters == strlen(word)) {
        solvedStatus = 1;
      }
      for (counter = 0; counter < strlen(word); counter++) {
        if (solvedArray[counter] == 0) {
          printf("_");
        } else if (solvedArray[counter] == 1) {
          printf("%c", word[counter]);
        }
      }
      printf("\n\n");
    }
    if (mistakes == 7) {
      printf("Correct word was: %s\n", word);
      printf("YOU LOSE!\n\n");
    } else {
      printf("YOU WIN!\n\n");
    }
    int decided = 0;
    char decision[50];
    while (decided == 0) {
      printf("Do you want to play again? (y/n)\n");
      scanf("%s", &decision[0]);
      if (decision[0] == 'y') {
        decided = 1;
        replay = 1;
        printf("\n\n");
      } else if (decision[0] == 'n') {
        decided = 1;
        replay = 0;
        printf("\n");
      } else {
        printf("Invalid input. Try again.\n\n");
      }
    }
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %al,-0x119(%rbp)
call   1030 <printIntro@plt>
mov    -0x119(%rbp),%al
lea    0xe3d(%rip),%rdi
call   1050 <printf@plt>
mov    -0x119(%rbp),%al
movl   $0x0,-0x14(%rbp)
lea    0xe59(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1080 <scanf@plt>
mov    -0x14(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
imul   $0x32,%rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x118(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
lea    0xf54(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    12f8 <main+0x168>
mov    -0x2c(%rbp),%esi
add    $0x1,%esi
lea    0xdfb(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xdff(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe20(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rsi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1080 <scanf@plt>
lea    -0x60(%rbp),%rdi
call   10a0 <checkLowercase@plt>
cmp    $0x1,%eax
jne    12e0 <main+0x150>
movl   $0x0,-0x64(%rbp)
cmpl   $0x32,-0x64(%rbp)
jge    12c4 <main+0x134>
mov    -0x118(%rbp),%rax
movslq -0x64(%rbp),%rcx
mov    -0x60(%rbp,%rcx,1),%dl
movslq -0x2c(%rbp),%rcx
imul   $0x32,%rcx,%rcx
add    %rcx,%rax
movslq -0x64(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    128b <main+0xfb>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    12f3 <main+0x163>
lea    0xdac(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1224 <main+0x94>
jmp    1224 <main+0x94>
movl   $0x1,-0x68(%rbp)
cmpl   $0x1,-0x68(%rbp)
jne    18e8 <main+0x758>
xor    %eax,%eax
mov    %eax,-0x12c(%rbp)
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
mov    -0x12c(%rbp),%eax
call   10b0 <rand@plt>
mov    -0x14(%rbp),%ecx
cltd
idiv   %ecx
mov    -0x118(%rbp),%rax
mov    %edx,-0x6c(%rbp)
movslq -0x6c(%rbp),%rcx
imul   $0x32,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x78(%rbp)
movl   $0x0,-0x7c(%rbp)
movl   $0x0,-0x80(%rbp)
mov    -0x78(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%eax
mov    %rsp,%rcx
mov    %rcx,-0x88(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x128(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x90(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x130(%rbp)
mov    -0x78(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x130(%rbp),%eax
cmp    %ecx,%eax
jge    13d8 <main+0x248>
mov    -0x128(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1396 <main+0x206>
mov    -0x78(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x138(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x98(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x13c(%rbp)
mov    -0x78(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x13c(%rbp),%eax
cmp    %ecx,%eax
jge    144f <main+0x2bf>
mov    -0x138(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    140d <main+0x27d>
lea    0xc59(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
cmpl   $0x0,-0x7c(%rbp)
mov    %al,-0x13d(%rbp)
jne    147c <main+0x2ec>
cmpl   $0x7,-0x80(%rbp)
setl   %al
mov    %al,-0x13d(%rbp)
mov    -0x13d(%rbp),%al
test   $0x1,%al
jne    148f <main+0x2ff>
jmp    17e2 <main+0x652>
lea    0xc27(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x78(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%esi
lea    0xc39(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xc4a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0xd0(%rbp),%rsi
lea    0xc46(%rip),%rdi
mov    $0x0,%al
call   1080 <scanf@plt>
movsbl -0xd0(%rbp),%esi
lea    0xc35(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xd4(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x144(%rbp)
mov    -0x78(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x144(%rbp),%eax
cmp    %ecx,%eax
jge    1587 <main+0x3f7>
mov    -0x78(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0xd0(%rbp),%ecx
cmp    %ecx,%eax
jne    1553 <main+0x3c3>
mov    -0x138(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
jmp    1574 <main+0x3e4>
mov    -0x138(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    1579 <main+0x3e9>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    14ff <main+0x36f>
mov    -0xd4(%rbp),%eax
mov    %eax,-0x148(%rbp)
mov    -0x78(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x148(%rbp),%eax
cmp    %ecx,%eax
jne    15b5 <main+0x425>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
mov    -0x80(%rbp),%esi
lea    0xb6e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x80(%rbp),%edi
call   1090 <printImage@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x14c(%rbp)
mov    -0x78(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x14c(%rbp),%eax
cmp    %ecx,%eax
jge    1658 <main+0x4c8>
mov    -0x138(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    1638 <main+0x4a8>
mov    -0x128(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    1638 <main+0x4a8>
mov    -0x128(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
jmp    164a <main+0x4ba>
mov    -0x128(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    15d5 <main+0x445>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x150(%rbp)
mov    -0x78(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x150(%rbp),%eax
cmp    %ecx,%eax
jge    16a1 <main+0x511>
mov    -0x138(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    165f <main+0x4cf>
movl   $0x0,-0xd8(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x154(%rbp)
mov    -0x78(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x154(%rbp),%eax
cmp    %ecx,%eax
jge    170b <main+0x57b>
mov    -0x128(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    16f8 <main+0x568>
mov    -0xd8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd8(%rbp)
jmp    16fd <main+0x56d>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    16b2 <main+0x522>
mov    -0xd8(%rbp),%eax
mov    %eax,-0x158(%rbp)
mov    -0x78(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x158(%rbp),%eax
cmp    %ecx,%eax
jne    1737 <main+0x5a7>
movl   $0x1,-0x7c(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x15c(%rbp)
mov    -0x78(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x15c(%rbp),%eax
cmp    %ecx,%eax
jge    17cf <main+0x63f>
mov    -0x128(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    1788 <main+0x5f8>
lea    0x9c9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    17bc <main+0x62c>
mov    -0x128(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    17b7 <main+0x627>
mov    -0x78(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0x997(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    17bc <main+0x62c>
jmp    17c1 <main+0x631>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    173e <main+0x5ae>
lea    0x993(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    145d <main+0x2cd>
cmpl   $0x7,-0x80(%rbp)
jne    1811 <main+0x681>
mov    -0x78(%rbp),%rsi
lea    0x953(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0x95b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    181f <main+0x68f>
lea    0x954(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xdc(%rbp)
cmpl   $0x0,-0xdc(%rbp)
jne    18d9 <main+0x749>
lea    0x93a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x110(%rbp),%rsi
lea    0x8c7(%rip),%rdi
mov    $0x0,%al
call   1080 <scanf@plt>
movsbl -0x110(%rbp),%eax
cmp    $0x79,%eax
jne    188d <main+0x6fd>
movl   $0x1,-0xdc(%rbp)
movl   $0x1,-0x68(%rbp)
lea    0x8e8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    18d4 <main+0x744>
movsbl -0x110(%rbp),%eax
cmp    $0x6e,%eax
jne    18c1 <main+0x731>
movl   $0x1,-0xdc(%rbp)
movl   $0x0,-0x68(%rbp)
lea    0x8b5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    18cf <main+0x73f>
lea    0x7cb(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    18d4 <main+0x744>
jmp    1829 <main+0x699>
mov    -0x88(%rbp),%rax
mov    %rax,%rsp
jmp    12ff <main+0x16f>
mov    0x26f1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
xor    %eax,%eax
call   1050 <printIntro@plt>
lea    0xeb9(%rip),%rdi
call   1040 <puts@plt>
movl   $0x0,-0x2c(%rbp)
lea    0xe1e(%rip),%rdi
lea    -0x2c(%rbp),%rsi
xor    %eax,%eax
call   10a0 <scanf@plt>
mov    %rsp,-0x48(%rbp)
mov    -0x2c(%rbp),%eax
mov    %rsp,%rcx
imul   $0x32,%rax,%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
mov    $0xa,%edi
call   1030 <putchar@plt>
cmpl   $0x0,-0x2c(%rbp)
jle    12f0 <main+0x140>
lea    0xf2f(%rip),%r12
lea    0xe17(%rip),%r13
lea    -0x90(%rbp),%rbx
xor    %r15d,%r15d
jmp    125c <main+0xac>
nopl   0x0(%rax,%rax,1)
lea    0xf29(%rip),%rdi
call   1040 <puts@plt>
mov    %r15d,%r14d
mov    %r14d,%r15d
cmp    -0x2c(%rbp),%r14d
jge    12f0 <main+0x140>
lea    0x1(%r15),%r14d
lea    0xd9c(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xeb1(%rip),%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
call   1040 <puts@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   10a0 <scanf@plt>
mov    %rbx,%rdi
call   10c0 <checkLowercase@plt>
cmp    $0x1,%eax
jne    1240 <main+0x90>
movslq %r15d,%rax
imul   $0x32,%rax,%rax
movzwl -0x60(%rbp),%ecx
mov    -0x40(%rbp),%rdx
mov    %cx,0x30(%rdx,%rax,1)
movaps -0x90(%rbp),%xmm0
movaps -0x80(%rbp),%xmm1
movaps -0x70(%rbp),%xmm2
movups %xmm2,0x20(%rdx,%rax,1)
movups %xmm1,0x10(%rdx,%rax,1)
movups %xmm0,(%rdx,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    124f <main+0x9f>
nop
lea    0xe16(%rip),%rdi
call   1040 <puts@plt>
mov    -0x50(%rbp),%rsp
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1080 <srand@plt>
xor    %eax,%eax
call   10d0 <rand@plt>
cltd
idivl  -0x2c(%rbp)
movslq %edx,%rax
imul   $0x32,%rax,%r15
add    -0x40(%rbp),%r15
mov    %r15,%rdi
call   1060 <strlen@plt>
mov    %rsp,-0x50(%rbp)
mov    %eax,%eax
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%r12
sub    %rax,%r12
mov    %r12,%rsp
mov    %r15,%rdi
call   1060 <strlen@plt>
test   %eax,%eax
jle    136b <main+0x1bb>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movl   $0x0,(%r12,%rbx,4)
add    $0x1,%rbx
mov    %r15,%rdi
call   1060 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1350 <main+0x1a0>
mov    %r15,%rdi
call   1060 <strlen@plt>
mov    %eax,%eax
mov    %rsp,%r14
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r14
mov    %r14,%rsp
mov    %r15,%rdi
call   1060 <strlen@plt>
test   %eax,%eax
jle    13bb <main+0x20b>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movl   $0x0,(%r14,%rbx,4)
add    $0x1,%rbx
mov    %r15,%rdi
call   1060 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     13a0 <main+0x1f0>
lea    0xcfa(%rip),%rdi
call   1040 <puts@plt>
movl   $0x0,-0x30(%rbp)
xchg   %ax,%ax
lea    0xd28(%rip),%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   1060 <strlen@plt>
lea    0xc2a(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xc39(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xc3c(%rip),%rdi
lea    -0x90(%rbp),%rsi
xor    %eax,%eax
call   10a0 <scanf@plt>
movsbl -0x90(%rbp),%esi
lea    0xc24(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r15,%rdi
call   1060 <strlen@plt>
mov    $0x0,%r13d
test   %eax,%eax
jle    147f <main+0x2cf>
xor    %ebx,%ebx
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%r15,%rbx,1),%eax
xor    %ecx,%ecx
xor    %edx,%edx
cmp    -0x90(%rbp),%al
setne  %cl
sete   %dl
add    %ecx,%r13d
mov    %edx,(%r14,%rbx,4)
add    $0x1,%rbx
mov    %r15,%rdi
call   1060 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1450 <main+0x2a0>
mov    %r15,%rdi
call   1060 <strlen@plt>
xor    %ecx,%ecx
cmp    %eax,%r13d
sete   %cl
mov    -0x30(%rbp),%ebx
add    %ecx,%ebx
lea    0xbbf(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %ebx,-0x30(%rbp)
mov    %ebx,%edi
call   10b0 <printImage@plt>
mov    %r15,%rdi
call   1060 <strlen@plt>
test   %eax,%eax
jle    1500 <main+0x350>
xor    %ebx,%ebx
jmp    14db <main+0x32b>
xchg   %ax,%ax
movl   $0x1,(%r12,%rbx,4)
add    $0x1,%rbx
mov    %r15,%rdi
call   1060 <strlen@plt>
cltq
cmp    %rax,%rbx
jge    1500 <main+0x350>
cmpl   $0x0,(%r14,%rbx,4)
jne    14c0 <main+0x310>
cmpl   $0x0,(%r12,%rbx,4)
jne    14c0 <main+0x310>
movl   $0x0,(%r12,%rbx,4)
jmp    14c8 <main+0x318>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
call   1060 <strlen@plt>
test   %eax,%eax
jle    152b <main+0x37b>
xor    %ebx,%ebx
xchg   %ax,%ax
movl   $0x0,(%r14,%rbx,4)
add    $0x1,%rbx
mov    %r15,%rdi
call   1060 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1510 <main+0x360>
mov    %r15,%rdi
call   1060 <strlen@plt>
test   %eax,%eax
jle    1570 <main+0x3c0>
xor    %ebx,%ebx
xor    %r13d,%r13d
nopl   0x0(%rax)
xor    %eax,%eax
cmpl   $0x1,(%r12,%rbx,4)
sete   %al
add    %eax,%r13d
add    $0x1,%rbx
mov    %r15,%rdi
call   1060 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1540 <main+0x390>
jmp    1573 <main+0x3c3>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %r13d,%r13d
mov    %r15,%rdi
call   1060 <strlen@plt>
mov    %eax,-0x34(%rbp)
mov    %r15,%rdi
call   1060 <strlen@plt>
test   %eax,%eax
jle    15d0 <main+0x420>
xor    %ebx,%ebx
jmp    15ad <main+0x3fd>
xchg   %ax,%ax
mov    $0x5f,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
mov    %r15,%rdi
call   1060 <strlen@plt>
cltq
cmp    %rax,%rbx
jge    15d0 <main+0x420>
mov    (%r12,%rbx,4),%eax
test   %eax,%eax
je     1590 <main+0x3e0>
cmp    $0x1,%eax
jne    159a <main+0x3ea>
movsbl (%r15,%rbx,1),%edi
jmp    1595 <main+0x3e5>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0xb26(%rip),%rdi
call   1040 <puts@plt>
cmp    -0x34(%rbp),%r13d
je     15ec <main+0x43c>
cmpl   $0x7,-0x30(%rbp)
jb     13d0 <main+0x220>
cmpl   $0x7,-0x30(%rbp)
jne    1610 <main+0x460>
lea    0xa79(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xaea(%rip),%rdi
jmp    1617 <main+0x467>
nopl   0x0(%rax)
lea    0xab2(%rip),%rdi
call   1040 <puts@plt>
lea    0xab0(%rip),%r14
lea    0xa1c(%rip),%r15
lea    -0x90(%rbp),%rbx
lea    0xb38(%rip),%r12
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   10a0 <scanf@plt>
movzbl -0x90(%rbp),%eax
cmp    $0x6e,%al
je     1672 <main+0x4c2>
cmp    $0x79,%al
je     12e0 <main+0x130>
mov    %r12,%rdi
call   1040 <puts@plt>
jmp    1640 <main+0x490>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x295d(%rip),%rax
mov    (%rax),%eax
mov    -0x48(%rbp),%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [53 x i8] c"How many words in the word bank? (Enter an integer)\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [18 x i8] c"What is word %d?\0A\00"
@.str.4 = [47 x i8] c"(Maximum permitted word length is 50 letters)\0A\00"
@.str.5 = [26 x i8] c"(Lowercase letters ONLY)\0A\00"
@.str.6 = [3 x i8] c"%s\00"
@.str.7 = [28 x i8] c"Invalid input. Try again.\0A\0A\00"
@.str.8 = [14 x i8] c"Let's Start!\0A\00"
@.str.9 = [43 x i8] c"=========================================\0A\00"
@.str.10 = [31 x i8] c"The word contains %d letters.\0A\00"
@.str.11 = [17 x i8] c"Enter a letter: \00"
@.str.12 = [4 x i8] c" %s\00"
@.str.13 = [17 x i8] c"You entered: %c\0A\00"
@.str.14 = [24 x i8] c"Number of mistakes: %d\0A\00"
@.str.15 = [2 x i8] c"_\00"
@.str.16 = [3 x i8] c"%c\00"
@.str.17 = [3 x i8] c"\0A\0A\00"
@.str.18 = [22 x i8] c"Correct word was: %s\0A\00"
@.str.19 = [12 x i8] c"YOU LOSE!\0A\0A\00"
@.str.20 = [11 x i8] c"YOU WIN!\0A\0A\00"
@.str.21 = [34 x i8] c"Do you want to play again? (y/n)\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
%10 = alloca [50 x i8]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i8*
%18 = alloca i64
%19 = alloca i64
%20 = alloca [50 x i8]
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca [50 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%25 = call i32 (...) @printIntro()
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %6
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%28 = load i32, i32* %6
%29 = zext i32 %28 to i64
%30 = call i8* @llvm.stacksave()
store i8* %30, i8** %7
%31 = alloca [50 x i8], i64 %29
store i64 %29, i64* %8
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %9
br label %33
33: ; preds = %72, %70, %2
%34 = load i32, i32* %9
%35 = load i32, i32* %6
%36 = icmp slt i32 %34, %35
br i1 %36, label %37, label %73
37: ; preds = %33
%38 = load i32, i32* %9
%39 = add nsw i32 %38, 1
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %39)
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0))
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
%43 = getelementptr inbounds [50 x i8], [50 x i8]* %10, i64 0, i64 0
%44 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %43)
%45 = getelementptr inbounds [50 x i8], [50 x i8]* %10, i64 0, i64 0
%46 = call i32 @checkLowercase(i8* %45)
%47 = icmp eq i32 %46, 1
br i1 %47, label %48, label %70
48: ; preds = %37
store i32 0, i32* %11
br label %49
49: ; preds = %63, %48
%50 = load i32, i32* %11
%51 = icmp slt i32 %50, 50
br i1 %51, label %52, label %66
52: ; preds = %49
%53 = load i32, i32* %11
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [50 x i8], [50 x i8]* %10, i64 0, i64 %54
%56 = load i8, i8* %55
%57 = load i32, i32* %9
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [50 x i8], [50 x i8]* %31, i64 %58
%60 = load i32, i32* %11
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [50 x i8], [50 x i8]* %59, i64 0, i64 %61
store i8 %56, i8* %62
br label %63
63: ; preds = %52
%64 = load i32, i32* %11
%65 = add nsw i32 %64, 1
store i32 %65, i32* %11
br label %49
66: ; preds = %49
%67 = load i32, i32* %9
%68 = add nsw i32 %67, 1
store i32 %68, i32* %9
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %72
70: ; preds = %37
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
br label %33
72: ; preds = %66
br label %33
73: ; preds = %33
store i32 1, i32* %12
br label %74
74: ; preds = %321, %73
%75 = load i32, i32* %12
%76 = icmp eq i32 %75, 1
br i1 %76, label %77, label %323
77: ; preds = %74
%78 = call i32 @time(i32* null)
%79 = call i32 @srand(i32 %78)
%80 = call i32 (...) @rand()
%81 = load i32, i32* %6
%82 = srem i32 %80, %81
store i32 %82, i32* %13
%83 = load i32, i32* %13
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [50 x i8], [50 x i8]* %31, i64 %84
%86 = getelementptr inbounds [50 x i8], [50 x i8]* %85, i64 0, i64 0
store i8* %86, i8** %14
store i32 0, i32* %15
store i32 0, i32* %16
%87 = load i8*, i8** %14
%88 = call i32 @strlen(i8* %87)
%89 = zext i32 %88 to i64
%90 = call i8* @llvm.stacksave()
store i8* %90, i8** %17
%91 = alloca i32, i64 %89
store i64 %89, i64* %18
store i32 0, i32* %9
br label %92
92: ; preds = %101, %77
%93 = load i32, i32* %9
%94 = load i8*, i8** %14
%95 = call i32 @strlen(i8* %94)
%96 = icmp slt i32 %93, %95
br i1 %96, label %97, label %104
97: ; preds = %92
%98 = load i32, i32* %9
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds i32, i32* %91, i64 %99
store i32 0, i32* %100
br label %101
101: ; preds = %97
%102 = load i32, i32* %9
%103 = add nsw i32 %102, 1
store i32 %103, i32* %9
br label %92
104: ; preds = %92
%105 = load i8*, i8** %14
%106 = call i32 @strlen(i8* %105)
%107 = zext i32 %106 to i64
%108 = alloca i32, i64 %107
store i64 %107, i64* %19
store i32 0, i32* %9
br label %109
109: ; preds = %118, %104
%110 = load i32, i32* %9
%111 = load i8*, i8** %14
%112 = call i32 @strlen(i8* %111)
%113 = icmp slt i32 %110, %112
br i1 %113, label %114, label %121
114: ; preds = %109
%115 = load i32, i32* %9
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds i32, i32* %108, i64 %116
store i32 0, i32* %117
br label %118
118: ; preds = %114
%119 = load i32, i32* %9
%120 = add nsw i32 %119, 1
store i32 %120, i32* %9
br label %109
121: ; preds = %109
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
br label %123
123: ; preds = %285, %121
%124 = load i32, i32* %15
%125 = icmp eq i32 %124, 0
br i1 %125, label %126, label %129
126: ; preds = %123
%127 = load i32, i32* %16
%128 = icmp slt i32 %127, 7
br label %129
129: ; preds = %126, %123
%130 = phi i1 [ false, %123 ], [ %128, %126 ]
br i1 %130, label %131, label %287
131: ; preds = %129
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.9, i64 0, i64 0))
%133 = load i8*, i8** %14
%134 = call i32 @strlen(i8* %133)
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0), i32 %134)
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
%137 = getelementptr inbounds [50 x i8], [50 x i8]* %20, i64 0, i64 0
%138 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8* %137)
%139 = getelementptr inbounds [50 x i8], [50 x i8]* %20, i64 0, i64 0
%140 = load i8, i8* %139
%141 = sext i8 %140 to i32
%142 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0), i32 %141)
store i32 0, i32* %21
store i32 0, i32* %9
br label %143
143: ; preds = %170, %131
%144 = load i32, i32* %9
%145 = load i8*, i8** %14
%146 = call i32 @strlen(i8* %145)
%147 = icmp slt i32 %144, %146
br i1 %147, label %148, label %173
148: ; preds = %143
%149 = load i8*, i8** %14
%150 = load i32, i32* %9
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds i8, i8* %149, i64 %151
%153 = load i8, i8* %152
%154 = sext i8 %153 to i32
%155 = getelementptr inbounds [50 x i8], [50 x i8]* %20, i64 0, i64 0
%156 = load i8, i8* %155
%157 = sext i8 %156 to i32
%158 = icmp eq i32 %154, %157
br i1 %158, label %159, label %163
159: ; preds = %148
%160 = load i32, i32* %9
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds i32, i32* %108, i64 %161
store i32 1, i32* %162
br label %169
163: ; preds = %148
%164 = load i32, i32* %9
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds i32, i32* %108, i64 %165
store i32 0, i32* %166
%167 = load i32, i32* %21
%168 = add nsw i32 %167, 1
store i32 %168, i32* %21
br label %169
169: ; preds = %163, %159
br label %170
170: ; preds = %169
%171 = load i32, i32* %9
%172 = add nsw i32 %171, 1
store i32 %172, i32* %9
br label %143
173: ; preds = %143
%174 = load i32, i32* %21
%175 = load i8*, i8** %14
%176 = call i32 @strlen(i8* %175)
%177 = icmp eq i32 %174, %176
br i1 %177, label %178, label %181
178: ; preds = %173
%179 = load i32, i32* %16
%180 = add nsw i32 %179, 1
store i32 %180, i32* %16
br label %181
181: ; preds = %178, %173
%182 = load i32, i32* %16
%183 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0), i32 %182)
%184 = load i32, i32* %16
%185 = call i32 @printImage(i32 %184)
store i32 0, i32* %9
br label %186
186: ; preds = %211, %181
%187 = load i32, i32* %9
%188 = load i8*, i8** %14
%189 = call i32 @strlen(i8* %188)
%190 = icmp slt i32 %187, %189
br i1 %190, label %191, label %214
191: ; preds = %186
%192 = load i32, i32* %9
%193 = sext i32 %192 to i64
%194 = getelementptr inbounds i32, i32* %108, i64 %193
%195 = load i32, i32* %194
%196 = icmp eq i32 %195, 0
br i1 %196, label %197, label %207
197: ; preds = %191
%198 = load i32, i32* %9
%199 = sext i32 %198 to i64
%200 = getelementptr inbounds i32, i32* %91, i64 %199
%201 = load i32, i32* %200
%202 = icmp eq i32 %201, 0
br i1 %202, label %203, label %207
203: ; preds = %197
%204 = load i32, i32* %9
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds i32, i32* %91, i64 %205
store i32 0, i32* %206
br label %211
207: ; preds = %197, %191
%208 = load i32, i32* %9
%209 = sext i32 %208 to i64
%210 = getelementptr inbounds i32, i32* %91, i64 %209
store i32 1, i32* %210
br label %211
211: ; preds = %207, %203
%212 = load i32, i32* %9
%213 = add nsw i32 %212, 1
store i32 %213, i32* %9
br label %186
214: ; preds = %186
store i32 0, i32* %9
br label %215
215: ; preds = %224, %214
%216 = load i32, i32* %9
%217 = load i8*, i8** %14
%218 = call i32 @strlen(i8* %217)
%219 = icmp slt i32 %216, %218
br i1 %219, label %220, label %227
220: ; preds = %215
%221 = load i32, i32* %9
%222 = sext i32 %221 to i64
%223 = getelementptr inbounds i32, i32* %108, i64 %222
store i32 0, i32* %223
br label %224
224: ; preds = %220
%225 = load i32, i32* %9
%226 = add nsw i32 %225, 1
store i32 %226, i32* %9
br label %215
227: ; preds = %215
store i32 0, i32* %22
store i32 0, i32* %9
br label %228
228: ; preds = %243, %227
%229 = load i32, i32* %9
%230 = load i8*, i8** %14
%231 = call i32 @strlen(i8* %230)
%232 = icmp slt i32 %229, %231
br i1 %232, label %233, label %246
233: ; preds = %228
%234 = load i32, i32* %9
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds i32, i32* %91, i64 %235
%237 = load i32, i32* %236
%238 = icmp eq i32 %237, 1
br i1 %238, label %239, label %242
239: ; preds = %233
%240 = load i32, i32* %22
%241 = add nsw i32 %240, 1
store i32 %241, i32* %22
br label %242
242: ; preds = %239, %233
br label %243
243: ; preds = %242
%244 = load i32, i32* %9
%245 = add nsw i32 %244, 1
store i32 %245, i32* %9
br label %228
246: ; preds = %228
%247 = load i32, i32* %22
%248 = load i8*, i8** %14
%249 = call i32 @strlen(i8* %248)
%250 = icmp eq i32 %247, %249
br i1 %250, label %251, label %252
251: ; preds = %246
store i32 1, i32* %15
br label %252
252: ; preds = %251, %246
store i32 0, i32* %9
br label %253
253: ; preds = %282, %252
%254 = load i32, i32* %9
%255 = load i8*, i8** %14
%256 = call i32 @strlen(i8* %255)
%257 = icmp slt i32 %254, %256
br i1 %257, label %258, label %285
258: ; preds = %253
%259 = load i32, i32* %9
%260 = sext i32 %259 to i64
%261 = getelementptr inbounds i32, i32* %91, i64 %260
%262 = load i32, i32* %261
%263 = icmp eq i32 %262, 0
br i1 %263, label %264, label %266
264: ; preds = %258
%265 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
br label %281
266: ; preds = %258
%267 = load i32, i32* %9
%268 = sext i32 %267 to i64
%269 = getelementptr inbounds i32, i32* %91, i64 %268
%270 = load i32, i32* %269
%271 = icmp eq i32 %270, 1
br i1 %271, label %272, label %280
272: ; preds = %266
%273 = load i8*, i8** %14
%274 = load i32, i32* %9
%275 = sext i32 %274 to i64
%276 = getelementptr inbounds i8, i8* %273, i64 %275
%277 = load i8, i8* %276
%278 = sext i8 %277 to i32
%279 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i32 %278)
br label %280
280: ; preds = %272, %266
br label %281
281: ; preds = %280, %264
br label %282
282: ; preds = %281
%283 = load i32, i32* %9
%284 = add nsw i32 %283, 1
store i32 %284, i32* %9
br label %253
285: ; preds = %253
%286 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0))
br label %123
287: ; preds = %129
%288 = load i32, i32* %16
%289 = icmp eq i32 %288, 7
br i1 %289, label %290, label %294
290: ; preds = %287
%291 = load i8*, i8** %14
%292 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.18, i64 0, i64 0), i8* %291)
%293 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0))
br label %296
294: ; preds = %287
%295 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.20, i64 0, i64 0))
br label %296
296: ; preds = %294, %290
store i32 0, i32* %23
br label %297
297: ; preds = %320, %296
%298 = load i32, i32* %23
%299 = icmp eq i32 %298, 0
br i1 %299, label %300, label %321
300: ; preds = %297
%301 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.21, i64 0, i64 0))
%302 = getelementptr inbounds [50 x i8], [50 x i8]* %24, i64 0, i64 0
%303 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %302)
%304 = getelementptr inbounds [50 x i8], [50 x i8]* %24, i64 0, i64 0
%305 = load i8, i8* %304
%306 = sext i8 %305 to i32
%307 = icmp eq i32 %306, 121
br i1 %307, label %308, label %310
308: ; preds = %300
store i32 1, i32* %23
store i32 1, i32* %12
%309 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i64 0, i64 0))
br label %320
310: ; preds = %300
%311 = getelementptr inbounds [50 x i8], [50 x i8]* %24, i64 0, i64 0
%312 = load i8, i8* %311
%313 = sext i8 %312 to i32
%314 = icmp eq i32 %313, 110
br i1 %314, label %315, label %317
315: ; preds = %310
store i32 1, i32* %23
store i32 0, i32* %12
%316 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %319
317: ; preds = %310
%318 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
br label %319
319: ; preds = %317, %315
br label %320
320: ; preds = %319, %308
br label %297
321: ; preds = %297
%322 = load i8*, i8** %17
br label %74
323: ; preds = %74
%324 = load i32, i32* @EXIT_SUCCESS
store i32 %324, i32* %3
%325 = load i8*, i8** %7
%326 = load i32, i32* %3
ret i32 %326
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.3 = [18 x i8] c"What is word %d?\0A\00"
@.str.6 = [3 x i8] c"%s\00"
@.str.10 = [31 x i8] c"The word contains %d letters.\0A\00"
@.str.11 = [17 x i8] c"Enter a letter: \00"
@.str.12 = [4 x i8] c" %s\00"
@.str.13 = [17 x i8] c"You entered: %c\0A\00"
@.str.14 = [24 x i8] c"Number of mistakes: %d\0A\00"
@.str.18 = [22 x i8] c"Correct word was: %s\0A\00"
@EXIT_SUCCESS = global i32 0
@str = [52 x i8] c"How many words in the word bank? (Enter an integer)\00"
@str.22 = [13 x i8] c"Let's Start!\00"
@str.23 = [10 x i8] c"YOU WIN!\0A\00"
@str.24 = [33 x i8] c"Do you want to play again? (y/n)\00"
@str.27 = [11 x i8] c"YOU LOSE!\0A\00"
@str.28 = [42 x i8] c"=========================================\00"
@str.29 = [2 x i8] c"\0A\00"
@str.30 = [46 x i8] c"(Maximum permitted word length is 50 letters)\00"
@str.31 = [25 x i8] c"(Lowercase letters ONLY)\00"
@str.32 = [27 x i8] c"Invalid input. Try again.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca [50 x i8]
%5 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
%6 = alloca [50 x i8]
%7 = alloca [50 x i8]
%8 = tail call i32 (...) @printIntro()
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str, i64 0, i64 0))
%10 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%12 = load i32, i32* %3
%13 = zext i32 %12 to i64
%14 = call i8* @llvm.stacksave()
%15 = alloca [50 x i8], i64 %13
%16 = call i32 @putchar(i32 10)
%17 = load i32, i32* %3
%18 = icmp sgt i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %2
%20 = getelementptr inbounds [50 x i8], [50 x i8]* %4, i64 0, i64 0
br label %24
21: ; preds = %39, %2
%22 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%23 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
br label %43
24: ; preds = %19, %39
%25 = phi i32 [ 0, %19 ], [ %40, %39 ]
%26 = add nsw i32 %25, 1
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %26)
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.30, i64 0, i64 0))
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.31, i64 0, i64 0))
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %20)
%31 = call i32 @checkLowercase(i8* %20)
%32 = icmp eq i32 %31, 1
br i1 %32, label %33, label %37
33: ; preds = %24
%34 = sext i32 %25 to i64
%35 = getelementptr [50 x i8], [50 x i8]* %15, i64 %34, i64 0
%36 = call i32 @putchar(i32 10)
br label %39
37: ; preds = %24
%38 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.32, i64 0, i64 0))
br label %39
39: ; preds = %33, %37
%40 = phi i32 [ %26, %33 ], [ %25, %37 ]
%41 = load i32, i32* %3
%42 = icmp slt i32 %40, %41
br i1 %42, label %24, label %21
43: ; preds = %198, %21
%44 = call i32 @time(i32* null)
%45 = call i32 @srand(i32 %44)
%46 = call i32 (...) @rand()
%47 = load i32, i32* %3
%48 = srem i32 %46, %47
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [50 x i8], [50 x i8]* %15, i64 %49, i64 0
%51 = call i32 @strlen(i8* %50)
%52 = zext i32 %51 to i64
%53 = call i8* @llvm.stacksave()
%54 = alloca i32, i64 %52
%55 = call i32 @strlen(i8* %50)
%56 = icmp sgt i32 %55, 0
br i1 %56, label %57, label %64
57: ; preds = %43, %57
%58 = phi i64 [ %60, %57 ], [ 0, %43 ]
%59 = getelementptr inbounds i32, i32* %54, i64 %58
store i32 0, i32* %59
%60 = add nuw nsw i64 %58, 1
%61 = call i32 @strlen(i8* %50)
%62 = sext i32 %61 to i64
%63 = icmp slt i64 %60, %62
br i1 %63, label %57, label %64
64: ; preds = %57, %43
%65 = call i32 @strlen(i8* %50)
%66 = zext i32 %65 to i64
%67 = alloca i32, i64 %66
%68 = call i32 @strlen(i8* %50)
%69 = icmp sgt i32 %68, 0
br i1 %69, label %70, label %77
70: ; preds = %64, %70
%71 = phi i64 [ %73, %70 ], [ 0, %64 ]
%72 = getelementptr inbounds i32, i32* %67, i64 %71
store i32 0, i32* %72
%73 = add nuw nsw i64 %71, 1
%74 = call i32 @strlen(i8* %50)
%75 = sext i32 %74 to i64
%76 = icmp slt i64 %73, %75
br i1 %76, label %70, label %77
77: ; preds = %70, %64
%78 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.22, i64 0, i64 0))
br label %79
79: ; preds = %77, %181
%80 = phi i32 [ 0, %77 ], [ %112, %181 ]
%81 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.28, i64 0, i64 0))
%82 = call i32 @strlen(i8* %50)
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0), i32 %82)
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
%85 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i8* %22)
%86 = load i8, i8* %22
%87 = sext i8 %86 to i32
%88 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0), i32 %87)
%89 = call i32 @strlen(i8* %50)
%90 = icmp sgt i32 %89, 0
br i1 %90, label %91, label %107
91: ; preds = %79, %91
%92 = phi i64 [ %103, %91 ], [ 0, %79 ]
%93 = phi i32 [ %101, %91 ], [ 0, %79 ]
%94 = getelementptr inbounds [50 x i8], [50 x i8]* %15, i64 %49, i64 %92
%95 = load i8, i8* %94
%96 = load i8, i8* %22
%97 = icmp eq i8 %95, %96
%98 = zext i1 %97 to i32
%99 = xor i1 %97, true
%100 = zext i1 %99 to i32
%101 = add nuw nsw i32 %93, %100
%102 = getelementptr inbounds i32, i32* %67, i64 %92
store i32 %98, i32* %102
%103 = add nuw nsw i64 %92, 1
%104 = call i32 @strlen(i8* %50)
%105 = sext i32 %104 to i64
%106 = icmp slt i64 %103, %105
br i1 %106, label %91, label %107
107: ; preds = %91, %79
%108 = phi i32 [ 0, %79 ], [ %101, %91 ]
%109 = call i32 @strlen(i8* %50)
%110 = icmp eq i32 %108, %109
%111 = zext i1 %110 to i32
%112 = add nuw nsw i32 %80, %111
%113 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0), i32 %112)
%114 = call i32 @printImage(i32 %112)
%115 = call i32 @strlen(i8* %50)
%116 = icmp sgt i32 %115, 0
br i1 %116, label %120, label %117
117: ; preds = %132, %107
%118 = call i32 @strlen(i8* %50)
%119 = icmp sgt i32 %118, 0
br i1 %119, label %140, label %137
120: ; preds = %107, %132
%121 = phi i64 [ %133, %132 ], [ 0, %107 ]
%122 = getelementptr inbounds i32, i32* %67, i64 %121
%123 = load i32, i32* %122
%124 = icmp eq i32 %123, 0
br i1 %124, label %125, label %130
125: ; preds = %120
%126 = getelementptr inbounds i32, i32* %54, i64 %121
%127 = load i32, i32* %126
%128 = icmp eq i32 %127, 0
br i1 %128, label %129, label %130
129: ; preds = %125
store i32 0, i32* %126
br label %132
130: ; preds = %125, %120
%131 = getelementptr inbounds i32, i32* %54, i64 %121
store i32 1, i32* %131
br label %132
132: ; preds = %130, %129
%133 = add nuw nsw i64 %121, 1
%134 = call i32 @strlen(i8* %50)
%135 = sext i32 %134 to i64
%136 = icmp slt i64 %133, %135
br i1 %136, label %120, label %117
137: ; preds = %140, %117
%138 = call i32 @strlen(i8* %50)
%139 = icmp sgt i32 %138, 0
br i1 %139, label %147, label %159
140: ; preds = %117, %140
%141 = phi i64 [ %143, %140 ], [ 0, %117 ]
%142 = getelementptr inbounds i32, i32* %67, i64 %141
store i32 0, i32* %142
%143 = add nuw nsw i64 %141, 1
%144 = call i32 @strlen(i8* %50)
%145 = sext i32 %144 to i64
%146 = icmp slt i64 %143, %145
br i1 %146, label %140, label %137
147: ; preds = %137, %147
%148 = phi i64 [ %155, %147 ], [ 0, %137 ]
%149 = phi i32 [ %154, %147 ], [ 0, %137 ]
%150 = getelementptr inbounds i32, i32* %54, i64 %148
%151 = load i32, i32* %150
%152 = icmp eq i32 %151, 1
%153 = zext i1 %152 to i32
%154 = add nuw nsw i32 %149, %153
%155 = add nuw nsw i64 %148, 1
%156 = call i32 @strlen(i8* %50)
%157 = sext i32 %156 to i64
%158 = icmp slt i64 %155, %157
br i1 %158, label %147, label %159
159: ; preds = %147, %137
%160 = phi i32 [ 0, %137 ], [ %154, %147 ]
%161 = call i32 @strlen(i8* %50)
%162 = icmp ne i32 %160, %161
%163 = call i32 @strlen(i8* %50)
%164 = icmp sgt i32 %163, 0
br i1 %164, label %165, label %181
165: ; preds = %159, %176
%166 = phi i64 [ %177, %176 ], [ 0, %159 ]
%167 = getelementptr inbounds i32, i32* %54, i64 %166
%168 = load i32, i32* %167
switch i32 %168, label %176 [
i32 0, label %173
i32 1, label %169
]
169: ; preds = %165
%170 = getelementptr inbounds [50 x i8], [50 x i8]* %15, i64 %49, i64 %166
%171 = load i8, i8* %170
%172 = sext i8 %171 to i32
br label %173
173: ; preds = %165, %169
%174 = phi i32 [ %172, %169 ], [ 95, %165 ]
%175 = call i32 @putchar(i32 %174)
br label %176
176: ; preds = %173, %165
%177 = add nuw nsw i64 %166, 1
%178 = call i32 @strlen(i8* %50)
%179 = sext i32 %178 to i64
%180 = icmp slt i64 %177, %179
br i1 %180, label %165, label %181
181: ; preds = %176, %159
%182 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.29, i64 0, i64 0))
%183 = icmp ult i32 %112, 7
%184 = and i1 %162, %183
br i1 %184, label %79, label %185
185: ; preds = %181
%186 = icmp eq i32 %112, 7
br i1 %186, label %187, label %189
187: ; preds = %185
%188 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.18, i64 0, i64 0), i8* %50)
br label %189
189: ; preds = %185, %187
%190 = phi i8* [ getelementptr inbounds ([11 x i8], [11 x i8]* @str.27, i64 0, i64 0), %187 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @str.23, i64 0, i64 0), %185 ]
%191 = call i32 @puts(i8* dereferenceable(1) %190)
br label %192
192: ; preds = %196, %189
%193 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.24, i64 0, i64 0))
%194 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %23)
%195 = load i8, i8* %23
switch i8 %195, label %196 [
i8 121, label %198
i8 110, label %200
]
196: ; preds = %192
%197 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.32, i64 0, i64 0))
br label %192
198: ; preds = %192
%199 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.29, i64 0, i64 0))
br label %43
200: ; preds = %192
%201 = call i32 @putchar(i32 10)
%202 = load i32, i32* @EXIT_SUCCESS
ret i32 %202
}