#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*/ printCoordinates(int, int, int, int, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ txtToArray(char *, char *);
scalar_t__ wordSearch(int, int, int, int, char *, char *);
int main(int argc, char const *argv[]) {
  char *wordBank[] = {"FEBRUARY", "AUGUST",   "JUNE",  "JANUARY",
                      "DECEMBER", "NOVEMBER", "APRIL", "SEPTEMBER",
                      "JULY",     "MARCH",    "MAY",   "OCTOBER"};
  char puzzle[2500];
  txtToArray("puzzle.txt", puzzle);
  for (int z = 0; z < 12; z++) {
    for (int i = 0; i < 50; i++) {
      for (int j = 0; j < 50; j++) {
        if (wordSearch(i, j, 0, 1, wordBank[z], puzzle)) {
          printf("\nFound: %s\n", wordBank[z]);
          printf("Coordinates:\n");
          printCoordinates(i, j, 0, 1, wordBank[z]);
        }
        if (wordSearch(i, j, 1, 0, wordBank[z], puzzle)) {
          printf("Found: %s\n", wordBank[z]);
          printf("Coordinates:\n");
          printCoordinates(i, j, 1, 0, wordBank[z]);
        }
        if (wordSearch(i, j, 1, 1, wordBank[z], puzzle)) {
          printf("\nFound: %s\n", wordBank[z]);
          printf("Coordinates:\n");
          printCoordinates(i, j, 1, 1, wordBank[z]);
        }
        if (wordSearch(i, j, 0, -1, wordBank[z], puzzle)) {
          printf("\nFound: %s\n", wordBank[z]);
          printf("Coordinates:\n");
          printCoordinates(i, j, 0, -1, wordBank[z]);
        }
        if (wordSearch(i, j, -1, 0, wordBank[z], puzzle)) {
          printf("\nFound: %s\n", wordBank[z]);
          printf("Coordinates:\n");
          printCoordinates(i, j, -1, 0, wordBank[z]);
        }
        if (wordSearch(i, j, -1, -1, wordBank[z], puzzle)) {
          printf("\nFound: %s\n", wordBank[z]);
          printf("Coordinates:\n");
          printCoordinates(i, j, -1, -1, wordBank[z]);
        }
        if (wordSearch(i, j, -1, 1, wordBank[z], puzzle)) {
          printf("\nFound: %s\n", wordBank[z]);
          printf("Coordinates:\n");
          printCoordinates(i, j, -1, 1, wordBank[z]);
        }
        if (wordSearch(i, j, 1, -1, wordBank[z], puzzle)) {
          printf("\nFound: %s\n", wordBank[z]);
          printf("Coordinates:\n");
          printCoordinates(i, j, 1, -1, wordBank[z]);
        }
      }
    }
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x70(%rbp),%rdi
lea    0x2c4c(%rip),%rsi
mov    $0x60,%edx
call   1060 <memcpy@plt>
lea    -0xa40(%rbp),%rsi
lea    0xeca(%rip),%rdi
call   1050 <txtToArray@plt>
movl   $0x0,-0xa44(%rbp)
cmpl   $0xc,-0xa44(%rbp)
jge    1635 <main+0x4e5>
movl   $0x0,-0xa48(%rbp)
cmpl   $0x32,-0xa48(%rbp)
jge    161c <main+0x4cc>
movl   $0x0,-0xa4c(%rbp)
cmpl   $0x32,-0xa4c(%rbp)
jge    1603 <main+0x4b3>
mov    -0xa48(%rbp),%edi
mov    -0xa4c(%rbp),%esi
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%r8
lea    -0xa40(%rbp),%r9
xor    %edx,%edx
mov    $0x1,%ecx
call   1030 <wordSearch@plt>
cmp    $0x0,%rax
je     1257 <main+0x107>
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%rsi
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe41(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xa48(%rbp),%edi
mov    -0xa4c(%rbp),%esi
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%r8
xor    %edx,%edx
mov    $0x1,%ecx
call   1070 <printCoordinates@plt>
mov    -0xa48(%rbp),%edi
mov    -0xa4c(%rbp),%esi
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%r8
lea    -0xa40(%rbp),%r9
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <wordSearch@plt>
cmp    $0x0,%rax
je     12d8 <main+0x188>
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%rsi
lea    0xdc3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdc0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xa48(%rbp),%edi
mov    -0xa4c(%rbp),%esi
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%r8
mov    $0x1,%edx
xor    %ecx,%ecx
call   1070 <printCoordinates@plt>
mov    -0xa48(%rbp),%edi
mov    -0xa4c(%rbp),%esi
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%r8
lea    -0xa40(%rbp),%r9
mov    $0x1,%ecx
mov    %ecx,%edx
call   1030 <wordSearch@plt>
cmp    $0x0,%rax
je     1359 <main+0x209>
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%rsi
lea    0xd41(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd3f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xa48(%rbp),%edi
mov    -0xa4c(%rbp),%esi
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%r8
mov    $0x1,%ecx
mov    %ecx,%edx
call   1070 <printCoordinates@plt>
mov    -0xa48(%rbp),%edi
mov    -0xa4c(%rbp),%esi
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%r8
lea    -0xa40(%rbp),%r9
xor    %edx,%edx
mov    $0xffffffff,%ecx
call   1030 <wordSearch@plt>
cmp    $0x0,%rax
je     13da <main+0x28a>
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%rsi
lea    0xcc0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xcbe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xa48(%rbp),%edi
mov    -0xa4c(%rbp),%esi
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%r8
xor    %edx,%edx
mov    $0xffffffff,%ecx
call   1070 <printCoordinates@plt>
mov    -0xa48(%rbp),%edi
mov    -0xa4c(%rbp),%esi
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%r8
lea    -0xa40(%rbp),%r9
mov    $0xffffffff,%edx
xor    %ecx,%ecx
call   1030 <wordSearch@plt>
cmp    $0x0,%rax
je     145b <main+0x30b>
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%rsi
lea    0xc3f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc3d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xa48(%rbp),%edi
mov    -0xa4c(%rbp),%esi
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%r8
mov    $0xffffffff,%edx
xor    %ecx,%ecx
call   1070 <printCoordinates@plt>
mov    -0xa48(%rbp),%edi
mov    -0xa4c(%rbp),%esi
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%r8
lea    -0xa40(%rbp),%r9
mov    $0xffffffff,%ecx
mov    %ecx,%edx
call   1030 <wordSearch@plt>
cmp    $0x0,%rax
je     14dc <main+0x38c>
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%rsi
lea    0xbbe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xbbc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xa48(%rbp),%edi
mov    -0xa4c(%rbp),%esi
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%r8
mov    $0xffffffff,%ecx
mov    %ecx,%edx
call   1070 <printCoordinates@plt>
mov    -0xa48(%rbp),%edi
mov    -0xa4c(%rbp),%esi
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%r8
lea    -0xa40(%rbp),%r9
mov    $0xffffffff,%edx
mov    $0x1,%ecx
call   1030 <wordSearch@plt>
cmp    $0x0,%rax
je     1563 <main+0x413>
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%rsi
lea    0xb3a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xb38(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xa48(%rbp),%edi
mov    -0xa4c(%rbp),%esi
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%r8
mov    $0xffffffff,%edx
mov    $0x1,%ecx
call   1070 <printCoordinates@plt>
mov    -0xa48(%rbp),%edi
mov    -0xa4c(%rbp),%esi
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%r8
lea    -0xa40(%rbp),%r9
mov    $0x1,%edx
mov    $0xffffffff,%ecx
call   1030 <wordSearch@plt>
cmp    $0x0,%rax
je     15ea <main+0x49a>
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%rsi
lea    0xab3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xab1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xa48(%rbp),%edi
mov    -0xa4c(%rbp),%esi
movslq -0xa44(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%r8
mov    $0x1,%edx
mov    $0xffffffff,%ecx
call   1070 <printCoordinates@plt>
jmp    15ef <main+0x49f>
mov    -0xa4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4c(%rbp)
jmp    11c9 <main+0x79>
jmp    1608 <main+0x4b8>
mov    -0xa48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa48(%rbp)
jmp    11b2 <main+0x62>
jmp    1621 <main+0x4d1>
mov    -0xa44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa44(%rbp)
jmp    119b <main+0x4b>
lea    0xa3d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xa50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x9d8,%rsp
lea    0xede(%rip),%rdi
lea    0x10(%rsp),%r13
mov    %r13,%rsi
call   1070 <txtToArray@plt>
lea    0xed5(%rip),%r14
lea    0xeda(%rip),%r15
xor    %ecx,%ecx
jmp    11b3 <main+0x53>
nopw   0x0(%rax,%rax,1)
mov    0x8(%rsp),%rcx
add    $0x1,%rcx
cmp    $0xc,%rcx
je     1437 <main+0x2d7>
lea    0x2c06(%rip),%rax
mov    %rcx,0x8(%rsp)
mov    (%rax,%rcx,8),%rbx
xor    %ebp,%ebp
jmp    11d8 <main+0x78>
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebp
cmp    $0x32,%ebp
je     11a0 <main+0x40>
xor    %r12d,%r12d
jmp    11ea <main+0x8a>
nopl   (%rax)
add    $0x1,%r12d
cmp    $0x32,%r12d
je     11d0 <main+0x70>
mov    %ebp,%edi
mov    %r12d,%esi
xor    %edx,%edx
mov    $0x1,%ecx
mov    %rbx,%r8
mov    %r13,%r9
call   1050 <wordSearch@plt>
test   %rax,%rax
je     122f <main+0xcf>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %ebp,%edi
mov    %r12d,%esi
xor    %edx,%edx
mov    $0x1,%ecx
mov    %rbx,%r8
call   1080 <printCoordinates@plt>
mov    %ebp,%edi
mov    %r12d,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    %rbx,%r8
mov    %r13,%r9
call   1050 <wordSearch@plt>
test   %rax,%rax
je     1278 <main+0x118>
lea    0xe10(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %ebp,%edi
mov    %r12d,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    %rbx,%r8
call   1080 <printCoordinates@plt>
mov    %ebp,%edi
mov    %r12d,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
mov    %rbx,%r8
mov    %r13,%r9
call   1050 <wordSearch@plt>
test   %rax,%rax
je     12c3 <main+0x163>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %ebp,%edi
mov    %r12d,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
mov    %rbx,%r8
call   1080 <printCoordinates@plt>
mov    %ebp,%edi
mov    %r12d,%esi
xor    %edx,%edx
mov    $0xffffffff,%ecx
mov    %rbx,%r8
mov    %r13,%r9
call   1050 <wordSearch@plt>
test   %rax,%rax
je     1308 <main+0x1a8>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %ebp,%edi
mov    %r12d,%esi
xor    %edx,%edx
mov    $0xffffffff,%ecx
mov    %rbx,%r8
call   1080 <printCoordinates@plt>
mov    %ebp,%edi
mov    %r12d,%esi
mov    $0xffffffff,%edx
xor    %ecx,%ecx
mov    %rbx,%r8
mov    %r13,%r9
call   1050 <wordSearch@plt>
test   %rax,%rax
je     134d <main+0x1ed>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %ebp,%edi
mov    %r12d,%esi
mov    $0xffffffff,%edx
xor    %ecx,%ecx
mov    %rbx,%r8
call   1080 <printCoordinates@plt>
mov    %ebp,%edi
mov    %r12d,%esi
mov    $0xffffffff,%edx
mov    $0xffffffff,%ecx
mov    %rbx,%r8
mov    %r13,%r9
call   1050 <wordSearch@plt>
test   %rax,%rax
je     1398 <main+0x238>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %ebp,%edi
mov    %r12d,%esi
mov    $0xffffffff,%edx
mov    $0xffffffff,%ecx
mov    %rbx,%r8
call   1080 <printCoordinates@plt>
mov    %ebp,%edi
mov    %r12d,%esi
mov    $0xffffffff,%edx
mov    $0x1,%ecx
mov    %rbx,%r8
mov    %r13,%r9
call   1050 <wordSearch@plt>
test   %rax,%rax
je     13e3 <main+0x283>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %ebp,%edi
mov    %r12d,%esi
mov    $0xffffffff,%edx
mov    $0x1,%ecx
mov    %rbx,%r8
call   1080 <printCoordinates@plt>
mov    %ebp,%edi
mov    %r12d,%esi
mov    $0x1,%edx
mov    $0xffffffff,%ecx
mov    %rbx,%r8
mov    %r13,%r9
call   1050 <wordSearch@plt>
test   %rax,%rax
je     11e0 <main+0x80>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %ebp,%edi
mov    %r12d,%esi
mov    $0x1,%edx
mov    $0xffffffff,%ecx
mov    %rbx,%r8
call   1080 <printCoordinates@plt>
jmp    11e0 <main+0x80>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x9d8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"FEBRUARY\00"
@.str.1 = [7 x i8] c"AUGUST\00"
@.str.2 = [5 x i8] c"JUNE\00"
@.str.3 = [8 x i8] c"JANUARY\00"
@.str.4 = [9 x i8] c"DECEMBER\00"
@.str.5 = [9 x i8] c"NOVEMBER\00"
@.str.6 = [6 x i8] c"APRIL\00"
@.str.7 = [10 x i8] c"SEPTEMBER\00"
@.str.8 = [5 x i8] c"JULY\00"
@.str.9 = [6 x i8] c"MARCH\00"
@.str.10 = [4 x i8] c"MAY\00"
@.str.11 = [8 x i8] c"OCTOBER\00"
@__const.main.wordBank = [12 x i8*] [i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i32 0, i32 0)]
@.str.12 = [11 x i8] c"puzzle.txt\00"
@.str.13 = [12 x i8] c"\0AFound: %s\0A\00"
@.str.14 = [14 x i8] c"Coordinates:\0A\00"
@.str.15 = [11 x i8] c"Found: %s\0A\00"
@.str.16 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [12 x i8*]
%7 = alloca [2500 x i8]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = bitcast [12 x i8*]* %6 to i8*
%12 = getelementptr inbounds [2500 x i8], [2500 x i8]* %7, i64 0, i64 0
%13 = call i32 @txtToArray(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i8* %12)
store i32 0, i32* %8
br label %14
14: ; preds = %226, %2
%15 = load i32, i32* %8
%16 = icmp slt i32 %15, 12
br i1 %16, label %17, label %229
17: ; preds = %14
store i32 0, i32* %9
br label %18
18: ; preds = %222, %17
%19 = load i32, i32* %9
%20 = icmp slt i32 %19, 50
br i1 %20, label %21, label %225
21: ; preds = %18
store i32 0, i32* %10
br label %22
22: ; preds = %218, %21
%23 = load i32, i32* %10
%24 = icmp slt i32 %23, 50
br i1 %24, label %25, label %221
25: ; preds = %22
%26 = load i32, i32* %9
%27 = load i32, i32* %10
%28 = load i32, i32* %8
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %29
%31 = load i8*, i8** %30
%32 = getelementptr inbounds [2500 x i8], [2500 x i8]* %7, i64 0, i64 0
%33 = call i64 @wordSearch(i32 %26, i32 %27, i32 0, i32 1, i8* %31, i8* %32)
%34 = icmp ne i64 %33, 0
br i1 %34, label %35, label %49
35: ; preds = %25
%36 = load i32, i32* %8
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %37
%39 = load i8*, i8** %38
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %39)
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%42 = load i32, i32* %9
%43 = load i32, i32* %10
%44 = load i32, i32* %8
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %45
%47 = load i8*, i8** %46
%48 = call i32 @printCoordinates(i32 %42, i32 %43, i32 0, i32 1, i8* %47)
br label %49
49: ; preds = %35, %25
%50 = load i32, i32* %9
%51 = load i32, i32* %10
%52 = load i32, i32* %8
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %53
%55 = load i8*, i8** %54
%56 = getelementptr inbounds [2500 x i8], [2500 x i8]* %7, i64 0, i64 0
%57 = call i64 @wordSearch(i32 %50, i32 %51, i32 1, i32 0, i8* %55, i8* %56)
%58 = icmp ne i64 %57, 0
br i1 %58, label %59, label %73
59: ; preds = %49
%60 = load i32, i32* %8
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %61
%63 = load i8*, i8** %62
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0), i8* %63)
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%66 = load i32, i32* %9
%67 = load i32, i32* %10
%68 = load i32, i32* %8
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %69
%71 = load i8*, i8** %70
%72 = call i32 @printCoordinates(i32 %66, i32 %67, i32 1, i32 0, i8* %71)
br label %73
73: ; preds = %59, %49
%74 = load i32, i32* %9
%75 = load i32, i32* %10
%76 = load i32, i32* %8
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %77
%79 = load i8*, i8** %78
%80 = getelementptr inbounds [2500 x i8], [2500 x i8]* %7, i64 0, i64 0
%81 = call i64 @wordSearch(i32 %74, i32 %75, i32 1, i32 1, i8* %79, i8* %80)
%82 = icmp ne i64 %81, 0
br i1 %82, label %83, label %97
83: ; preds = %73
%84 = load i32, i32* %8
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %85
%87 = load i8*, i8** %86
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %87)
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%90 = load i32, i32* %9
%91 = load i32, i32* %10
%92 = load i32, i32* %8
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %93
%95 = load i8*, i8** %94
%96 = call i32 @printCoordinates(i32 %90, i32 %91, i32 1, i32 1, i8* %95)
br label %97
97: ; preds = %83, %73
%98 = load i32, i32* %9
%99 = load i32, i32* %10
%100 = load i32, i32* %8
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %101
%103 = load i8*, i8** %102
%104 = getelementptr inbounds [2500 x i8], [2500 x i8]* %7, i64 0, i64 0
%105 = call i64 @wordSearch(i32 %98, i32 %99, i32 0, i32 -1, i8* %103, i8* %104)
%106 = icmp ne i64 %105, 0
br i1 %106, label %107, label %121
107: ; preds = %97
%108 = load i32, i32* %8
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %109
%111 = load i8*, i8** %110
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %111)
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%114 = load i32, i32* %9
%115 = load i32, i32* %10
%116 = load i32, i32* %8
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %117
%119 = load i8*, i8** %118
%120 = call i32 @printCoordinates(i32 %114, i32 %115, i32 0, i32 -1, i8* %119)
br label %121
121: ; preds = %107, %97
%122 = load i32, i32* %9
%123 = load i32, i32* %10
%124 = load i32, i32* %8
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %125
%127 = load i8*, i8** %126
%128 = getelementptr inbounds [2500 x i8], [2500 x i8]* %7, i64 0, i64 0
%129 = call i64 @wordSearch(i32 %122, i32 %123, i32 -1, i32 0, i8* %127, i8* %128)
%130 = icmp ne i64 %129, 0
br i1 %130, label %131, label %145
131: ; preds = %121
%132 = load i32, i32* %8
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %133
%135 = load i8*, i8** %134
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %135)
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%138 = load i32, i32* %9
%139 = load i32, i32* %10
%140 = load i32, i32* %8
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %141
%143 = load i8*, i8** %142
%144 = call i32 @printCoordinates(i32 %138, i32 %139, i32 -1, i32 0, i8* %143)
br label %145
145: ; preds = %131, %121
%146 = load i32, i32* %9
%147 = load i32, i32* %10
%148 = load i32, i32* %8
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %149
%151 = load i8*, i8** %150
%152 = getelementptr inbounds [2500 x i8], [2500 x i8]* %7, i64 0, i64 0
%153 = call i64 @wordSearch(i32 %146, i32 %147, i32 -1, i32 -1, i8* %151, i8* %152)
%154 = icmp ne i64 %153, 0
br i1 %154, label %155, label %169
155: ; preds = %145
%156 = load i32, i32* %8
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %157
%159 = load i8*, i8** %158
%160 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %159)
%161 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%162 = load i32, i32* %9
%163 = load i32, i32* %10
%164 = load i32, i32* %8
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %165
%167 = load i8*, i8** %166
%168 = call i32 @printCoordinates(i32 %162, i32 %163, i32 -1, i32 -1, i8* %167)
br label %169
169: ; preds = %155, %145
%170 = load i32, i32* %9
%171 = load i32, i32* %10
%172 = load i32, i32* %8
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %173
%175 = load i8*, i8** %174
%176 = getelementptr inbounds [2500 x i8], [2500 x i8]* %7, i64 0, i64 0
%177 = call i64 @wordSearch(i32 %170, i32 %171, i32 -1, i32 1, i8* %175, i8* %176)
%178 = icmp ne i64 %177, 0
br i1 %178, label %179, label %193
179: ; preds = %169
%180 = load i32, i32* %8
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %181
%183 = load i8*, i8** %182
%184 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %183)
%185 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%186 = load i32, i32* %9
%187 = load i32, i32* %10
%188 = load i32, i32* %8
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %189
%191 = load i8*, i8** %190
%192 = call i32 @printCoordinates(i32 %186, i32 %187, i32 -1, i32 1, i8* %191)
br label %193
193: ; preds = %179, %169
%194 = load i32, i32* %9
%195 = load i32, i32* %10
%196 = load i32, i32* %8
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %197
%199 = load i8*, i8** %198
%200 = getelementptr inbounds [2500 x i8], [2500 x i8]* %7, i64 0, i64 0
%201 = call i64 @wordSearch(i32 %194, i32 %195, i32 1, i32 -1, i8* %199, i8* %200)
%202 = icmp ne i64 %201, 0
br i1 %202, label %203, label %217
203: ; preds = %193
%204 = load i32, i32* %8
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %205
%207 = load i8*, i8** %206
%208 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %207)
%209 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%210 = load i32, i32* %9
%211 = load i32, i32* %10
%212 = load i32, i32* %8
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds [12 x i8*], [12 x i8*]* %6, i64 0, i64 %213
%215 = load i8*, i8** %214
%216 = call i32 @printCoordinates(i32 %210, i32 %211, i32 1, i32 -1, i8* %215)
br label %217
217: ; preds = %203, %193
br label %218
218: ; preds = %217
%219 = load i32, i32* %10
%220 = add nsw i32 %219, 1
store i32 %220, i32* %10
br label %22
221: ; preds = %22
br label %222
222: ; preds = %221
%223 = load i32, i32* %9
%224 = add nsw i32 %223, 1
store i32 %224, i32* %9
br label %18
225: ; preds = %18
br label %226
226: ; preds = %225
%227 = load i32, i32* %8
%228 = add nsw i32 %227, 1
store i32 %228, i32* %8
br label %14
229: ; preds = %14
%230 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"FEBRUARY\00"
@.str.1 = [7 x i8] c"AUGUST\00"
@.str.2 = [5 x i8] c"JUNE\00"
@.str.3 = [8 x i8] c"JANUARY\00"
@.str.4 = [9 x i8] c"DECEMBER\00"
@.str.5 = [9 x i8] c"NOVEMBER\00"
@.str.6 = [6 x i8] c"APRIL\00"
@.str.7 = [10 x i8] c"SEPTEMBER\00"
@.str.8 = [5 x i8] c"JULY\00"
@.str.9 = [6 x i8] c"MARCH\00"
@.str.10 = [4 x i8] c"MAY\00"
@.str.11 = [8 x i8] c"OCTOBER\00"
@__const.main.wordBank = [12 x i8*] [i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i32 0, i32 0)]
@.str.12 = [11 x i8] c"puzzle.txt\00"
@.str.13 = [12 x i8] c"\0AFound: %s\0A\00"
@.str.15 = [11 x i8] c"Found: %s\0A\00"
@str.23 = [13 x i8] c"Coordinates:\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [2500 x i8]
%4 = getelementptr inbounds [2500 x i8], [2500 x i8]* %3, i64 0, i64 0
%5 = call i32 @txtToArray(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i8* %4)
br label %6
6: ; preds = %2, %14
%7 = phi i64 [ 0, %2 ], [ %15, %14 ]
%8 = getelementptr inbounds [12 x i8*], [12 x i8*]* @__const.main.wordBank, i64 0, i64 %7
%9 = load i8*, i8** %8
br label %12
10: ; preds = %14
%11 = call i32 @putchar(i32 10)
ret i32 0
12: ; preds = %6, %17
%13 = phi i32 [ 0, %6 ], [ %18, %17 ]
br label %20
14: ; preds = %17
%15 = add nuw nsw i64 %7, 1
%16 = icmp eq i64 %15, 12
br i1 %16, label %10, label %6
17: ; preds = %77
%18 = add nuw nsw i32 %13, 1
%19 = icmp eq i32 %18, 50
br i1 %19, label %14, label %12
20: ; preds = %12, %77
%21 = phi i32 [ 0, %12 ], [ %78, %77 ]
%22 = call i64 @wordSearch(i32 %13, i32 %21, i32 0, i32 1, i8* %9, i8* %4)
%23 = icmp eq i64 %22, 0
br i1 %23, label %28, label %24
24: ; preds = %20
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %9)
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.23, i64 0, i64 0))
%27 = call i32 @printCoordinates(i32 %13, i32 %21, i32 0, i32 1, i8* %9)
br label %28
28: ; preds = %24, %20
%29 = call i64 @wordSearch(i32 %13, i32 %21, i32 1, i32 0, i8* %9, i8* %4)
%30 = icmp eq i64 %29, 0
br i1 %30, label %35, label %31
31: ; preds = %28
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0), i8* %9)
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.23, i64 0, i64 0))
%34 = call i32 @printCoordinates(i32 %13, i32 %21, i32 1, i32 0, i8* %9)
br label %35
35: ; preds = %31, %28
%36 = call i64 @wordSearch(i32 %13, i32 %21, i32 1, i32 1, i8* %9, i8* %4)
%37 = icmp eq i64 %36, 0
br i1 %37, label %42, label %38
38: ; preds = %35
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %9)
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.23, i64 0, i64 0))
%41 = call i32 @printCoordinates(i32 %13, i32 %21, i32 1, i32 1, i8* %9)
br label %42
42: ; preds = %38, %35
%43 = call i64 @wordSearch(i32 %13, i32 %21, i32 0, i32 -1, i8* %9, i8* %4)
%44 = icmp eq i64 %43, 0
br i1 %44, label %49, label %45
45: ; preds = %42
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %9)
%47 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.23, i64 0, i64 0))
%48 = call i32 @printCoordinates(i32 %13, i32 %21, i32 0, i32 -1, i8* %9)
br label %49
49: ; preds = %45, %42
%50 = call i64 @wordSearch(i32 %13, i32 %21, i32 -1, i32 0, i8* %9, i8* %4)
%51 = icmp eq i64 %50, 0
br i1 %51, label %56, label %52
52: ; preds = %49
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %9)
%54 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.23, i64 0, i64 0))
%55 = call i32 @printCoordinates(i32 %13, i32 %21, i32 -1, i32 0, i8* %9)
br label %56
56: ; preds = %52, %49
%57 = call i64 @wordSearch(i32 %13, i32 %21, i32 -1, i32 -1, i8* %9, i8* %4)
%58 = icmp eq i64 %57, 0
br i1 %58, label %63, label %59
59: ; preds = %56
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %9)
%61 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.23, i64 0, i64 0))
%62 = call i32 @printCoordinates(i32 %13, i32 %21, i32 -1, i32 -1, i8* %9)
br label %63
63: ; preds = %59, %56
%64 = call i64 @wordSearch(i32 %13, i32 %21, i32 -1, i32 1, i8* %9, i8* %4)
%65 = icmp eq i64 %64, 0
br i1 %65, label %70, label %66
66: ; preds = %63
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %9)
%68 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.23, i64 0, i64 0))
%69 = call i32 @printCoordinates(i32 %13, i32 %21, i32 -1, i32 1, i8* %9)
br label %70
70: ; preds = %66, %63
%71 = call i64 @wordSearch(i32 %13, i32 %21, i32 1, i32 -1, i8* %9, i8* %4)
%72 = icmp eq i64 %71, 0
br i1 %72, label %77, label %73
73: ; preds = %70
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i8* %9)
%75 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.23, i64 0, i64 0))
%76 = call i32 @printCoordinates(i32 %13, i32 %21, i32 1, i32 -1, i8* %9)
br label %77
77: ; preds = %70, %73
%78 = add nuw nsw i32 %21, 1
%79 = icmp eq i32 %78, 50
br i1 %79, label %17, label %20
}