#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*/ getMonths(char *);
int /*<<< orphan*/ getPuzzle(char *);
int getchar();
int /*<<< orphan*/ printPuzzle(char *, int, int, int **);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strcpy(char *, char *);
int verifySelection(int *, char *, char **);
int main() {
  int c;
  int i, j;
  int x, y;
  x = y = 0;
  int selection[8][2];
  for (i = 0; i < 8; ++i)
    selection[i][0] = -1;
  int selection_index = 0;
  char puzzle[50][50];
  char *ppuzzle = &(puzzle[0][0]);
  getPuzzle(ppuzzle);
  printPuzzle(ppuzzle, x, y, selection);
  char months[12][10];
  char *pmonths = &(months[0][0]);
  getMonths(pmonths);
  int monthsFound[12];
  for (i = 0; i < 12; ++i)
    monthsFound[i] = 0;
  char message[200];
  char help[] = "\nINSTRUCTIONS\nPress enter after this keys:\n  h: show "
                "help\n  wasd: movement\n  ' ': select letter\n  c: clear "
                "selection\n  v: verify selection\n\n";
  strcpy(message, help);
  do {
    printPuzzle(ppuzzle, x, y, selection);
    printf("%s", message);
    strcpy(message, "");
    printf("Selection: ");
    for (i = 0; i < 8; ++i)
      if (selection[i][0] == -1)
        printf("_");
      else
        printf("%c", puzzle[selection[i][1]][selection[i][0]]);
    printf("\n");
    printf("Months found: ");
    for (i = 0, j = 0; i < 12; ++i) {
      if (monthsFound[i]) {
        printf("%s ", months[i]);
        ++j;
      }
    }
    if (j < 12)
      printf("(%d/12)\n", j);
    else
      printf("(%d/12 :D)\n", j);
    switch (c) {
    case 'w':
      if (y > 0)
        y--;
      break;
    case 'a':
      if (x > 0)
        x--;
      break;
    case 's':
      if (y < 49)
        y++;
      break;
    case 'd':
      if (x < 49)
        x++;
      break;
    case ' ':
      if (selection_index <= 7) {
        if (x == selection[selection_index - 1][0] - 1 ||
            x == selection[selection_index - 1][0] + 1 ||
            x == selection[selection_index - 1][0] || selection_index == 0) {
          if (y == selection[selection_index - 1][1] - 1 ||
              y == selection[selection_index - 1][1] + 1 ||
              y == selection[selection_index - 1][1] || selection_index == 0) {
            selection[selection_index][0] = x;
            selection[selection_index][1] = y;
            ++selection_index;
          } else {
            strcpy(message, "\x1b[31mYou have to select letters that are next "
                            "to each other.\n\x1b[0m");
          }
        } else {
          strcpy(message, "\x1b[31mYou have to select letters that are next to "
                          "each other.\n\x1b[0m");
        }
      }
      break;
    case 'c':
      for (i = 0; i < 8; ++i)
        selection[i][0] = -1;
      selection_index = 0;
      break;
    case 'v':
      i = verifySelection(&(selection[0][0]), ppuzzle, months);
      if (i >= 0)
        monthsFound[i] = 1;
      break;
    case 'h':
      strcpy(message, help);
      break;
    }
  } while ((c = getchar()) != 'q');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc60,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    11cb <main+0x4b>
movslq -0xc(%rbp),%rax
movl   $0xffffffff,-0x60(%rbp,%rax,8)
ff
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11a7 <main+0x27>
movl   $0x0,-0x64(%rbp)
lea    -0xa30(%rbp),%rax
mov    %rax,-0xa38(%rbp)
mov    -0xa38(%rbp),%rdi
call   1030 <getPuzzle@plt>
mov    -0xa38(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    -0x60(%rbp),%rcx
call   1090 <printPuzzle@plt>
lea    -0xab0(%rbp),%rax
mov    %rax,-0xab8(%rbp)
mov    -0xab8(%rbp),%rdi
call   10a0 <getMonths@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0xc,-0xc(%rbp)
jge    124a <main+0xca>
movslq -0xc(%rbp),%rax
movl   $0x0,-0xaf0(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1223 <main+0xa3>
lea    -0xc50(%rbp),%rdi
lea    0xda8(%rip),%rsi
mov    $0x8d,%edx
call   1080 <memcpy@plt>
lea    -0xbc0(%rbp),%rdi
lea    -0xc50(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0xa38(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    -0x60(%rbp),%rcx
call   1090 <printPuzzle@plt>
lea    -0xbc0(%rbp),%rsi
lea    0xdf4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0xbc0(%rbp),%rdi
lea    0xe0e(%rip),%rsi
call   1040 <strcpy@plt>
lea    0xdd6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    1339 <main+0x1b9>
movslq -0xc(%rbp),%rax
cmpl   $0xffffffff,-0x60(%rbp,%rax,8)
jne    12f4 <main+0x174>
lea    0xdb4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1326 <main+0x1a6>
movslq -0xc(%rbp),%rax
movslq -0x5c(%rbp,%rax,8),%rcx
lea    -0xa30(%rbp),%rax
imul   $0x32,%rcx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
movslq -0x60(%rbp,%rcx,8),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xd7f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    132b <main+0x1ab>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12c8 <main+0x148>
lea    0xd7b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd53(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0xc,-0xc(%rbp)
jge    13bb <main+0x23b>
movslq -0xc(%rbp),%rax
cmpl   $0x0,-0xaf0(%rbp,%rax,4)
je     13a8 <main+0x228>
movslq -0xc(%rbp),%rax
lea    -0xab0(%rbp),%rsi
imul   $0xa,%rax,%rax
add    %rax,%rsi
lea    0xd18(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    13ad <main+0x22d>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1363 <main+0x1e3>
cmpl   $0xc,-0x10(%rbp)
jge    13db <main+0x25b>
mov    -0x10(%rbp),%esi
lea    0xce5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    13ec <main+0x26c>
mov    -0x10(%rbp),%esi
lea    0xcd8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc54(%rbp)
sub    $0x20,%eax
je     14ef <main+0x36f>
jmp    1403 <main+0x283>
mov    -0xc54(%rbp),%eax
sub    $0x61,%eax
je     14a7 <main+0x327>
jmp    1417 <main+0x297>
mov    -0xc54(%rbp),%eax
sub    $0x63,%eax
je     15fe <main+0x47e>
jmp    142b <main+0x2ab>
mov    -0xc54(%rbp),%eax
sub    $0x64,%eax
je     14d7 <main+0x357>
jmp    143f <main+0x2bf>
mov    -0xc54(%rbp),%eax
sub    $0x68,%eax
je     166d <main+0x4ed>
jmp    1453 <main+0x2d3>
mov    -0xc54(%rbp),%eax
sub    $0x73,%eax
je     14bf <main+0x33f>
jmp    1467 <main+0x2e7>
mov    -0xc54(%rbp),%eax
sub    $0x76,%eax
je     1635 <main+0x4b5>
jmp    147b <main+0x2fb>
mov    -0xc54(%rbp),%eax
sub    $0x77,%eax
jne    1680 <main+0x500>
jmp    148f <main+0x30f>
cmpl   $0x0,-0x18(%rbp)
jle    14a2 <main+0x322>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    1680 <main+0x500>
cmpl   $0x0,-0x14(%rbp)
jle    14ba <main+0x33a>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1680 <main+0x500>
cmpl   $0x31,-0x18(%rbp)
jge    14d2 <main+0x352>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1680 <main+0x500>
cmpl   $0x31,-0x14(%rbp)
jge    14ea <main+0x36a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1680 <main+0x500>
cmpl   $0x7,-0x64(%rbp)
jg     15f9 <main+0x479>
mov    -0x14(%rbp),%eax
mov    -0x64(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    -0x60(%rbp,%rcx,8),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     154f <main+0x3cf>
mov    -0x14(%rbp),%eax
mov    -0x64(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    -0x60(%rbp,%rcx,8),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
je     154f <main+0x3cf>
mov    -0x14(%rbp),%eax
mov    -0x64(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
cmp    -0x60(%rbp,%rcx,8),%eax
je     154f <main+0x3cf>
cmpl   $0x0,-0x64(%rbp)
jne    15e1 <main+0x461>
mov    -0x18(%rbp),%eax
mov    -0x64(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    -0x5c(%rbp,%rcx,8),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     15a5 <main+0x425>
mov    -0x18(%rbp),%eax
mov    -0x64(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    -0x5c(%rbp,%rcx,8),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
je     15a5 <main+0x425>
mov    -0x18(%rbp),%eax
mov    -0x64(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
cmp    -0x5c(%rbp,%rcx,8),%eax
je     15a5 <main+0x425>
cmpl   $0x0,-0x64(%rbp)
jne    15c9 <main+0x449>
mov    -0x14(%rbp),%ecx
movslq -0x64(%rbp),%rax
mov    %ecx,-0x60(%rbp,%rax,8)
mov    -0x18(%rbp),%ecx
movslq -0x64(%rbp),%rax
mov    %ecx,-0x5c(%rbp,%rax,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    15dc <main+0x45c>
lea    -0xbc0(%rbp),%rdi
lea    0xaf2(%rip),%rsi
call   1040 <strcpy@plt>
jmp    15f4 <main+0x474>
lea    -0xbc0(%rbp),%rdi
lea    0xada(%rip),%rsi
call   1040 <strcpy@plt>
jmp    15f9 <main+0x479>
jmp    1680 <main+0x500>
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    1629 <main+0x4a9>
movslq -0xc(%rbp),%rax
movl   $0xffffffff,-0x60(%rbp,%rax,8)
ff
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1605 <main+0x485>
movl   $0x0,-0x64(%rbp)
jmp    1680 <main+0x500>
lea    -0x60(%rbp),%rdi
mov    -0xa38(%rbp),%rsi
lea    -0xab0(%rbp),%rdx
call   1060 <verifySelection@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1668 <main+0x4e8>
movslq -0xc(%rbp),%rax
movl   $0x1,-0xaf0(%rbp,%rax,4)
jmp    1680 <main+0x500>
lea    -0xbc0(%rbp),%rdi
lea    -0xc50(%rbp),%rsi
call   1040 <strcpy@plt>
jmp    1685 <main+0x505>
mov    $0x0,%al
call   1070 <getchar@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x71,%eax
jne    1275 <main+0xf5>
xor    %eax,%eax
add    $0xc60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc28,%rsp
movl   $0xffffffff,0x10(%rsp)
ff
movl   $0xffffffff,0x18(%rsp)
ff
movl   $0xffffffff,0x20(%rsp)
ff
movl   $0xffffffff,0x28(%rsp)
ff
movl   $0xffffffff,0x30(%rsp)
ff
movl   $0xffffffff,0x38(%rsp)
ff
movl   $0xffffffff,0x40(%rsp)
ff
movl   $0xffffffff,0x48(%rsp)
ff
lea    0x260(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <getPuzzle@plt>
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   10a0 <printPuzzle@plt>
lea    0x80(%rsp),%rdi
call   10b0 <getMonths@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
lea    0xe38(%rip),%rsi
lea    0x1d0(%rsp),%rbx
mov    $0x8d,%edx
mov    %rbx,%rdi
call   1090 <memcpy@plt>
lea    0x100(%rsp),%rdi
mov    %rbx,%rsi
call   1050 <strcpy@plt>
lea    0xeb7(%rip),%rbp
xor    %r15d,%r15d
xor    %r12d,%r12d
movl   $0x0,0xc(%rsp)
jmp    12c3 <main+0x133>
movl   $0xffffffff,0x10(%rsp)
ff
movl   $0xffffffff,0x18(%rsp)
ff
movl   $0xffffffff,0x20(%rsp)
ff
movl   $0xffffffff,0x28(%rsp)
ff
movl   $0xffffffff,0x30(%rsp)
ff
movl   $0xffffffff,0x38(%rsp)
ff
movl   $0xffffffff,0x40(%rsp)
ff
movl   $0xffffffff,0x48(%rsp)
ff
movl   $0x0,0xc(%rsp)
nopl   0x0(%rax)
xor    %eax,%eax
call   1080 <getchar@plt>
mov    %eax,%r14d
cmp    $0x71,%eax
je     1753 <main+0x5c3>
lea    0x260(%rsp),%rdi
mov    %r15d,%esi
mov    %r12d,%edx
lea    0x10(%rsp),%rcx
call   10a0 <printPuzzle@plt>
lea    0xe0b(%rip),%rdi
lea    0x100(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
lea    0xe19(%rip),%rsi
call   1050 <strcpy@plt>
lea    0xde6(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movslq 0x10(%rsp),%rax
mov    $0x5f,%ebx
mov    $0x5f,%edi
cmp    $0xffffffffffffffff,%rax
je     133d <main+0x1ad>
movslq 0x14(%rsp),%rcx
imul   $0x32,%rcx,%rcx
add    %rsp,%rcx
add    $0x260,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
movslq 0x18(%rsp),%rax
cmp    $0xffffffffffffffff,%rax
je     1364 <main+0x1d4>
movslq 0x1c(%rsp),%rcx
imul   $0x32,%rcx,%rcx
add    %rsp,%rcx
add    $0x260,%rcx
movsbl (%rax,%rcx,1),%ebx
mov    %ebx,%edi
call   1030 <putchar@plt>
movslq 0x20(%rsp),%rax
mov    $0x5f,%ebx
mov    $0x5f,%edi
cmp    $0xffffffffffffffff,%rax
je     1397 <main+0x207>
movslq 0x24(%rsp),%rcx
imul   $0x32,%rcx,%rcx
add    %rsp,%rcx
add    $0x260,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
movslq 0x28(%rsp),%rax
cmp    $0xffffffffffffffff,%rax
je     13be <main+0x22e>
movslq 0x2c(%rsp),%rcx
imul   $0x32,%rcx,%rcx
add    %rsp,%rcx
add    $0x260,%rcx
movsbl (%rax,%rcx,1),%ebx
mov    %ebx,%edi
call   1030 <putchar@plt>
movslq 0x30(%rsp),%rax
mov    $0x5f,%ebx
mov    $0x5f,%edi
cmp    $0xffffffffffffffff,%rax
je     13f1 <main+0x261>
movslq 0x34(%rsp),%rcx
imul   $0x32,%rcx,%rcx
add    %rsp,%rcx
add    $0x260,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
movslq 0x38(%rsp),%rax
cmp    $0xffffffffffffffff,%rax
je     1418 <main+0x288>
movslq 0x3c(%rsp),%rcx
imul   $0x32,%rcx,%rcx
add    %rsp,%rcx
add    $0x260,%rcx
movsbl (%rax,%rcx,1),%ebx
mov    %ebx,%edi
call   1030 <putchar@plt>
movslq 0x40(%rsp),%rax
mov    $0x5f,%ebx
mov    $0x5f,%edi
cmp    $0xffffffffffffffff,%rax
je     144b <main+0x2bb>
movslq 0x44(%rsp),%rcx
imul   $0x32,%rcx,%rcx
add    %rsp,%rcx
add    $0x260,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
movslq 0x48(%rsp),%rax
cmp    $0xffffffffffffffff,%rax
je     1472 <main+0x2e2>
movslq 0x4c(%rsp),%rcx
imul   $0x32,%rcx,%rcx
add    %rsp,%rcx
add    $0x260,%rcx
movsbl (%rax,%rcx,1),%ebx
mov    %ebx,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %r13d,%r13d
lea    0xc6f(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
cmpl   $0x0,0x50(%rsp)
je     14b3 <main+0x323>
mov    %rbp,%rdi
lea    0x80(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x1,%r13d
cmpl   $0x0,0x54(%rsp)
je     14d0 <main+0x340>
mov    %rbp,%rdi
lea    0x8a(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r13d
cmpl   $0x0,0x58(%rsp)
je     14ed <main+0x35d>
mov    %rbp,%rdi
lea    0x94(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r13d
cmpl   $0x0,0x5c(%rsp)
je     150a <main+0x37a>
mov    %rbp,%rdi
lea    0x9e(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r13d
cmpl   $0x0,0x60(%rsp)
je     1527 <main+0x397>
mov    %rbp,%rdi
lea    0xa8(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r13d
cmpl   $0x0,0x64(%rsp)
je     1544 <main+0x3b4>
mov    %rbp,%rdi
lea    0xb2(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r13d
cmpl   $0x0,0x68(%rsp)
je     1561 <main+0x3d1>
mov    %rbp,%rdi
lea    0xbc(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r13d
cmpl   $0x0,0x6c(%rsp)
je     157e <main+0x3ee>
mov    %rbp,%rdi
lea    0xc6(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r13d
cmpl   $0x0,0x70(%rsp)
je     159b <main+0x40b>
mov    %rbp,%rdi
lea    0xd0(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r13d
cmpl   $0x0,0x74(%rsp)
je     15b8 <main+0x428>
mov    %rbp,%rdi
lea    0xda(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r13d
cmpl   $0x0,0x78(%rsp)
je     15d5 <main+0x445>
mov    %rbp,%rdi
lea    0xe4(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%r13d
cmpl   $0x0,0x7c(%rsp)
je     15fb <main+0x46b>
mov    %rbp,%rdi
lea    0xee(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x1(%r13),%esi
cmp    $0xa,%r13d
ja     1610 <main+0x480>
mov    %esi,%r13d
lea    0xb0d(%rip),%rdi
mov    %r13d,%esi
jmp    1617 <main+0x487>
nopw   0x0(%rax,%rax,1)
lea    0xb01(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    -0x61(%r14),%eax
cmp    $0x16,%eax
ja     1647 <main+0x4b7>
lea    0x9d2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xor    %eax,%eax
test   %r15d,%r15d
setg   %al
sub    %eax,%r15d
jmp    12b0 <main+0x120>
cmp    $0x20,%r14d
jne    12b0 <main+0x120>
mov    0xc(%rsp),%esi
cmp    $0x7,%esi
jg     12b0 <main+0x120>
movslq %esi,%rax
mov    0x8(%rsp,%rax,8),%ecx
lea    -0x1(%rcx),%edx
cmp    %edx,%r15d
je     167e <main+0x4ee>
lea    0x1(%rcx),%edx
cmp    %edx,%r15d
je     167e <main+0x4ee>
cmp    %ecx,%r15d
je     167e <main+0x4ee>
test   %esi,%esi
jne    16af <main+0x51f>
lea    -0x1(%rax),%rcx
mov    0x14(%rsp,%rcx,8),%ecx
lea    -0x1(%rcx),%edx
cmp    %edx,%r12d
je     173d <main+0x5ad>
lea    0x1(%rcx),%edx
cmp    %edx,%r12d
je     173d <main+0x5ad>
cmp    %ecx,%r12d
je     173d <main+0x5ad>
test   %esi,%esi
je     173d <main+0x5ad>
lea    0x100(%rsp),%rdi
lea    0xa66(%rip),%rsi
jmp    16e1 <main+0x551>
xor    %eax,%eax
cmp    $0x31,%r15d
setl   %al
add    %eax,%r15d
jmp    12b0 <main+0x120>
lea    0x100(%rsp),%rdi
lea    0x1d0(%rsp),%rsi
call   1050 <strcpy@plt>
jmp    12b0 <main+0x120>
xor    %eax,%eax
cmp    $0x31,%r12d
setl   %al
add    %eax,%r12d
jmp    12b0 <main+0x120>
lea    0x10(%rsp),%rdi
lea    0x260(%rsp),%rsi
lea    0x80(%rsp),%rdx
call   1070 <verifySelection@plt>
test   %eax,%eax
js     12b0 <main+0x120>
mov    %eax,%eax
movl   $0x1,0x50(%rsp,%rax,4)
jmp    12b0 <main+0x120>
xor    %eax,%eax
test   %r12d,%r12d
setg   %al
sub    %eax,%r12d
jmp    12b0 <main+0x120>
mov    %r15d,0x10(%rsp,%rax,8)
mov    %r12d,0x14(%rsp,%rax,8)
add    $0x1,%esi
mov    %esi,0xc(%rsp)
jmp    12b0 <main+0x120>
xor    %eax,%eax
add    $0xc28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.help = [141 x i8] c"\0AINSTRUCTIONS\0APress enter after this keys:\0A h: show help\0A wasd: movement\0A ' ': select letter\0A c: clear selection\0A v: verify selection\0A\0A\00"
@.str = [3 x i8] c"%s\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [12 x i8] c"Selection: \00"
@.str.3 = [2 x i8] c"_\00"
@.str.4 = [3 x i8] c"%c\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [15 x i8] c"Months found: \00"
@.str.7 = [4 x i8] c"%s \00"
@.str.8 = [9 x i8] c"(%d/12)\0A\00"
@.str.9 = [12 x i8] c"(%d/12 :D)\0A\00"
@.str.10 = [66 x i8] c"\1B[31mYou have to select letters that are next to each other.\0A\1B[0m\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [8 x [2 x i32]]
%8 = alloca i32
%9 = alloca [50 x [50 x i8]]
%10 = alloca i8*
%11 = alloca [12 x [10 x i8]]
%12 = alloca i8*
%13 = alloca [12 x i32]
%14 = alloca [200 x i8]
%15 = alloca [141 x i8]
store i32 0, i32* %1
store i32 0, i32* %6
store i32 0, i32* %5
store i32 0, i32* %3
br label %16
16: ; preds = %24, %0
%17 = load i32, i32* %3
%18 = icmp slt i32 %17, 8
br i1 %18, label %19, label %27
19: ; preds = %16
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %7, i64 0, i64 %21
%23 = getelementptr inbounds [2 x i32], [2 x i32]* %22, i64 0, i64 0
store i32 -1, i32* %23
br label %24
24: ; preds = %19
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %16
27: ; preds = %16
store i32 0, i32* %8
%28 = getelementptr inbounds [50 x [50 x i8]], [50 x [50 x i8]]* %9, i64 0, i64 0
%29 = getelementptr inbounds [50 x i8], [50 x i8]* %28, i64 0, i64 0
store i8* %29, i8** %10
%30 = load i8*, i8** %10
%31 = call i32 @getPuzzle(i8* %30)
%32 = load i8*, i8** %10
%33 = load i32, i32* %5
%34 = load i32, i32* %6
%35 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %7, i64 0, i64 0
%36 = bitcast [2 x i32]* %35 to i32**
%37 = call i32 @printPuzzle(i8* %32, i32 %33, i32 %34, i32** %36)
%38 = getelementptr inbounds [12 x [10 x i8]], [12 x [10 x i8]]* %11, i64 0, i64 0
%39 = getelementptr inbounds [10 x i8], [10 x i8]* %38, i64 0, i64 0
store i8* %39, i8** %12
%40 = load i8*, i8** %12
%41 = call i32 @getMonths(i8* %40)
store i32 0, i32* %3
br label %42
42: ; preds = %49, %27
%43 = load i32, i32* %3
%44 = icmp slt i32 %43, 12
br i1 %44, label %45, label %52
45: ; preds = %42
%46 = load i32, i32* %3
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [12 x i32], [12 x i32]* %13, i64 0, i64 %47
store i32 0, i32* %48
br label %49
49: ; preds = %45
%50 = load i32, i32* %3
%51 = add nsw i32 %50, 1
store i32 %51, i32* %3
br label %42
52: ; preds = %42
%53 = bitcast [141 x i8]* %15 to i8*
%54 = getelementptr inbounds [200 x i8], [200 x i8]* %14, i64 0, i64 0
%55 = getelementptr inbounds [141 x i8], [141 x i8]* %15, i64 0, i64 0
%56 = call i32 @strcpy(i8* %54, i8* %55)
br label %57
57: ; preds = %287, %52
%58 = load i8*, i8** %10
%59 = load i32, i32* %5
%60 = load i32, i32* %6
%61 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %7, i64 0, i64 0
%62 = bitcast [2 x i32]* %61 to i32**
%63 = call i32 @printPuzzle(i8* %58, i32 %59, i32 %60, i32** %62)
%64 = getelementptr inbounds [200 x i8], [200 x i8]* %14, i64 0, i64 0
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %64)
%66 = getelementptr inbounds [200 x i8], [200 x i8]* %14, i64 0, i64 0
%67 = call i32 @strcpy(i8* %66, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %3
br label %69
69: ; preds = %100, %57
%70 = load i32, i32* %3
%71 = icmp slt i32 %70, 8
br i1 %71, label %72, label %103
72: ; preds = %69
%73 = load i32, i32* %3
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %7, i64 0, i64 %74
%76 = getelementptr inbounds [2 x i32], [2 x i32]* %75, i64 0, i64 0
%77 = load i32, i32* %76
%78 = icmp eq i32 %77, -1
br i1 %78, label %79, label %81
79: ; preds = %72
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %99
81: ; preds = %72
%82 = load i32, i32* %3
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %7, i64 0, i64 %83
%85 = getelementptr inbounds [2 x i32], [2 x i32]* %84, i64 0, i64 1
%86 = load i32, i32* %85
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [50 x [50 x i8]], [50 x [50 x i8]]* %9, i64 0, i64 %87
%89 = load i32, i32* %3
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %7, i64 0, i64 %90
%92 = getelementptr inbounds [2 x i32], [2 x i32]* %91, i64 0, i64 0
%93 = load i32, i32* %92
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [50 x i8], [50 x i8]* %88, i64 0, i64 %94
%96 = load i8, i8* %95
%97 = sext i8 %96 to i32
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %97)
br label %99
99: ; preds = %81, %79
br label %100
100: ; preds = %99
%101 = load i32, i32* %3
%102 = add nsw i32 %101, 1
store i32 %102, i32* %3
br label %69
103: ; preds = %69
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %3
store i32 0, i32* %4
br label %106
106: ; preds = %124, %103
%107 = load i32, i32* %3
%108 = icmp slt i32 %107, 12
br i1 %108, label %109, label %127
109: ; preds = %106
%110 = load i32, i32* %3
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [12 x i32], [12 x i32]* %13, i64 0, i64 %111
%113 = load i32, i32* %112
%114 = icmp ne i32 %113, 0
br i1 %114, label %115, label %123
115: ; preds = %109
%116 = load i32, i32* %3
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds [12 x [10 x i8]], [12 x [10 x i8]]* %11, i64 0, i64 %117
%119 = getelementptr inbounds [10 x i8], [10 x i8]* %118, i64 0, i64 0
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %119)
%121 = load i32, i32* %4
%122 = add nsw i32 %121, 1
store i32 %122, i32* %4
br label %123
123: ; preds = %115, %109
br label %124
124: ; preds = %123
%125 = load i32, i32* %3
%126 = add nsw i32 %125, 1
store i32 %126, i32* %3
br label %106
127: ; preds = %106
%128 = load i32, i32* %4
%129 = icmp slt i32 %128, 12
br i1 %129, label %130, label %133
130: ; preds = %127
%131 = load i32, i32* %4
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %131)
br label %136
133: ; preds = %127
%134 = load i32, i32* %4
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i32 %134)
br label %136
136: ; preds = %133, %130
%137 = load i32, i32* %2
switch i32 %137, label %286 [
i32 119, label %138
i32 97, label %145
i32 115, label %152
i32 100, label %159
i32 32, label %166
i32 99, label %255
i32 118, label %268
i32 104, label %282
]
138: ; preds = %136
%139 = load i32, i32* %6
%140 = icmp sgt i32 %139, 0
br i1 %140, label %141, label %144
141: ; preds = %138
%142 = load i32, i32* %6
%143 = add nsw i32 %142, -1
store i32 %143, i32* %6
br label %144
144: ; preds = %141, %138
br label %286
145: ; preds = %136
%146 = load i32, i32* %5
%147 = icmp sgt i32 %146, 0
br i1 %147, label %148, label %151
148: ; preds = %145
%149 = load i32, i32* %5
%150 = add nsw i32 %149, -1
store i32 %150, i32* %5
br label %151
151: ; preds = %148, %145
br label %286
152: ; preds = %136
%153 = load i32, i32* %6
%154 = icmp slt i32 %153, 49
br i1 %154, label %155, label %158
155: ; preds = %152
%156 = load i32, i32* %6
%157 = add nsw i32 %156, 1
store i32 %157, i32* %6
br label %158
158: ; preds = %155, %152
br label %286
159: ; preds = %136
%160 = load i32, i32* %5
%161 = icmp slt i32 %160, 49
br i1 %161, label %162, label %165
162: ; preds = %159
%163 = load i32, i32* %5
%164 = add nsw i32 %163, 1
store i32 %164, i32* %5
br label %165
165: ; preds = %162, %159
br label %286
166: ; preds = %136
%167 = load i32, i32* %8
%168 = icmp sle i32 %167, 7
br i1 %168, label %169, label %254
169: ; preds = %166
%170 = load i32, i32* %5
%171 = load i32, i32* %8
%172 = sub nsw i32 %171, 1
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %7, i64 0, i64 %173
%175 = getelementptr inbounds [2 x i32], [2 x i32]* %174, i64 0, i64 0
%176 = load i32, i32* %175
%177 = sub nsw i32 %176, 1
%178 = icmp eq i32 %170, %177
br i1 %178, label %201, label %179
179: ; preds = %169
%180 = load i32, i32* %5
%181 = load i32, i32* %8
%182 = sub nsw i32 %181, 1
%183 = sext i32 %182 to i64
%184 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %7, i64 0, i64 %183
%185 = getelementptr inbounds [2 x i32], [2 x i32]* %184, i64 0, i64 0
%186 = load i32, i32* %185
%187 = add nsw i32 %186, 1
%188 = icmp eq i32 %180, %187
br i1 %188, label %201, label %189
189: ; preds = %179
%190 = load i32, i32* %5
%191 = load i32, i32* %8
%192 = sub nsw i32 %191, 1
%193 = sext i32 %192 to i64
%194 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %7, i64 0, i64 %193
%195 = getelementptr inbounds [2 x i32], [2 x i32]* %194, i64 0, i64 0
%196 = load i32, i32* %195
%197 = icmp eq i32 %190, %196
br i1 %197, label %201, label %198
198: ; preds = %189
%199 = load i32, i32* %8
%200 = icmp eq i32 %199, 0
br i1 %200, label %201, label %250
201: ; preds = %198, %189, %179, %169
%202 = load i32, i32* %6
%203 = load i32, i32* %8
%204 = sub nsw i32 %203, 1
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %7, i64 0, i64 %205
%207 = getelementptr inbounds [2 x i32], [2 x i32]* %206, i64 0, i64 1
%208 = load i32, i32* %207
%209 = sub nsw i32 %208, 1
%210 = icmp eq i32 %202, %209
br i1 %210, label %233, label %211
211: ; preds = %201
%212 = load i32, i32* %6
%213 = load i32, i32* %8
%214 = sub nsw i32 %213, 1
%215 = sext i32 %214 to i64
%216 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %7, i64 0, i64 %215
%217 = getelementptr inbounds [2 x i32], [2 x i32]* %216, i64 0, i64 1
%218 = load i32, i32* %217
%219 = add nsw i32 %218, 1
%220 = icmp eq i32 %212, %219
br i1 %220, label %233, label %221
221: ; preds = %211
%222 = load i32, i32* %6
%223 = load i32, i32* %8
%224 = sub nsw i32 %223, 1
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %7, i64 0, i64 %225
%227 = getelementptr inbounds [2 x i32], [2 x i32]* %226, i64 0, i64 1
%228 = load i32, i32* %227
%229 = icmp eq i32 %222, %228
br i1 %229, label %233, label %230
230: ; preds = %221
%231 = load i32, i32* %8
%232 = icmp eq i32 %231, 0
br i1 %232, label %233, label %246
233: ; preds = %230, %221, %211, %201
%234 = load i32, i32* %5
%235 = load i32, i32* %8
%236 = sext i32 %235 to i64
%237 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %7, i64 0, i64 %236
%238 = getelementptr inbounds [2 x i32], [2 x i32]* %237, i64 0, i64 0
store i32 %234, i32* %238
%239 = load i32, i32* %6
%240 = load i32, i32* %8
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %7, i64 0, i64 %241
%243 = getelementptr inbounds [2 x i32], [2 x i32]* %242, i64 0, i64 1
store i32 %239, i32* %243
%244 = load i32, i32* %8
%245 = add nsw i32 %244, 1
store i32 %245, i32* %8
br label %249
246: ; preds = %230
%247 = getelementptr inbounds [200 x i8], [200 x i8]* %14, i64 0, i64 0
%248 = call i32 @strcpy(i8* %247, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.10, i64 0, i64 0))
br label %249
249: ; preds = %246, %233
br label %253
250: ; preds = %198
%251 = getelementptr inbounds [200 x i8], [200 x i8]* %14, i64 0, i64 0
%252 = call i32 @strcpy(i8* %251, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.10, i64 0, i64 0))
br label %253
253: ; preds = %250, %249
br label %254
254: ; preds = %253, %166
br label %286
255: ; preds = %136
store i32 0, i32* %3
br label %256
256: ; preds = %264, %255
%257 = load i32, i32* %3
%258 = icmp slt i32 %257, 8
br i1 %258, label %259, label %267
259: ; preds = %256
%260 = load i32, i32* %3
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %7, i64 0, i64 %261
%263 = getelementptr inbounds [2 x i32], [2 x i32]* %262, i64 0, i64 0
store i32 -1, i32* %263
br label %264
264: ; preds = %259
%265 = load i32, i32* %3
%266 = add nsw i32 %265, 1
store i32 %266, i32* %3
br label %256
267: ; preds = %256
store i32 0, i32* %8
br label %286
268: ; preds = %136
%269 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %7, i64 0, i64 0
%270 = getelementptr inbounds [2 x i32], [2 x i32]* %269, i64 0, i64 0
%271 = load i8*, i8** %10
%272 = getelementptr inbounds [12 x [10 x i8]], [12 x [10 x i8]]* %11, i64 0, i64 0
%273 = bitcast [10 x i8]* %272 to i8**
%274 = call i32 @verifySelection(i32* %270, i8* %271, i8** %273)
store i32 %274, i32* %3
%275 = load i32, i32* %3
%276 = icmp sge i32 %275, 0
br i1 %276, label %277, label %281
277: ; preds = %268
%278 = load i32, i32* %3
%279 = sext i32 %278 to i64
%280 = getelementptr inbounds [12 x i32], [12 x i32]* %13, i64 0, i64 %279
store i32 1, i32* %280
br label %281
281: ; preds = %277, %268
br label %286
282: ; preds = %136
%283 = getelementptr inbounds [200 x i8], [200 x i8]* %14, i64 0, i64 0
%284 = getelementptr inbounds [141 x i8], [141 x i8]* %15, i64 0, i64 0
%285 = call i32 @strcpy(i8* %283, i8* %284)
br label %286
286: ; preds = %136, %282, %281, %267, %254, %165, %158, %151, %144
br label %287
287: ; preds = %286
%288 = call i32 (...) @getchar()
store i32 %288, i32* %2
%289 = icmp ne i32 %288, 113
br i1 %289, label %57, label %290
290: ; preds = %287
ret i32 0
}

LLVM IR (-O2):
@__const.main.help = [141 x i8] c"\0AINSTRUCTIONS\0APress enter after this keys:\0A h: show help\0A wasd: movement\0A ' ': select letter\0A c: clear selection\0A v: verify selection\0A\0A\00"
@.str = [3 x i8] c"%s\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [12 x i8] c"Selection: \00"
@.str.6 = [15 x i8] c"Months found: \00"
@.str.7 = [4 x i8] c"%s \00"
@.str.8 = [9 x i8] c"(%d/12)\0A\00"
@.str.9 = [12 x i8] c"(%d/12 :D)\0A\00"
@.str.10 = [66 x i8] c"\1B[31mYou have to select letters that are next to each other.\0A\1B[0m\00"
define i32 @main() {
%1 = alloca [8 x [2 x i32]]
%2 = alloca [50 x [50 x i8]]
%3 = alloca [12 x [10 x i8]]
%4 = alloca [12 x i32]
%5 = bitcast [12 x i32]* %4 to i8*
%6 = alloca [200 x i8]
%7 = alloca [141 x i8]
%8 = bitcast [8 x [2 x i32]]* %1 to i8*
%9 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 0, i64 0
store i32 -1, i32* %9
%10 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 1, i64 0
store i32 -1, i32* %10
%11 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 2, i64 0
store i32 -1, i32* %11
%12 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 3, i64 0
store i32 -1, i32* %12
%13 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 4, i64 0
store i32 -1, i32* %13
%14 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 5, i64 0
store i32 -1, i32* %14
%15 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 6, i64 0
store i32 -1, i32* %15
%16 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 7, i64 0
store i32 -1, i32* %16
%17 = getelementptr inbounds [50 x [50 x i8]], [50 x [50 x i8]]* %2, i64 0, i64 0, i64 0
%18 = call i32 @getPuzzle(i8* %17)
%19 = bitcast [8 x [2 x i32]]* %1 to i32**
%20 = call i32 @printPuzzle(i8* %17, i32 0, i32 0, i32** %19)
%21 = getelementptr inbounds [12 x [10 x i8]], [12 x [10 x i8]]* %3, i64 0, i64 0, i64 0
%22 = call i32 @getMonths(i8* %21)
%23 = getelementptr inbounds [200 x i8], [200 x i8]* %6, i64 0, i64 0
%24 = getelementptr inbounds [141 x i8], [141 x i8]* %7, i64 0, i64 0
%25 = call i32 @strcpy(i8* %23, i8* %24)
%26 = bitcast [12 x [10 x i8]]* %3 to i8**
%27 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 0, i64 1
%28 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 1, i64 1
%29 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 2, i64 1
%30 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 3, i64 1
%31 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 4, i64 1
%32 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 5, i64 1
%33 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 6, i64 1
%34 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 7, i64 1
%35 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 0
%36 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 1
%37 = getelementptr inbounds [12 x [10 x i8]], [12 x [10 x i8]]* %3, i64 0, i64 1, i64 0
%38 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 2
%39 = getelementptr inbounds [12 x [10 x i8]], [12 x [10 x i8]]* %3, i64 0, i64 2, i64 0
%40 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 3
%41 = getelementptr inbounds [12 x [10 x i8]], [12 x [10 x i8]]* %3, i64 0, i64 3, i64 0
%42 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 4
%43 = getelementptr inbounds [12 x [10 x i8]], [12 x [10 x i8]]* %3, i64 0, i64 4, i64 0
%44 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 5
%45 = getelementptr inbounds [12 x [10 x i8]], [12 x [10 x i8]]* %3, i64 0, i64 5, i64 0
%46 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 6
%47 = getelementptr inbounds [12 x [10 x i8]], [12 x [10 x i8]]* %3, i64 0, i64 6, i64 0
%48 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 7
%49 = getelementptr inbounds [12 x [10 x i8]], [12 x [10 x i8]]* %3, i64 0, i64 7, i64 0
%50 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 8
%51 = getelementptr inbounds [12 x [10 x i8]], [12 x [10 x i8]]* %3, i64 0, i64 8, i64 0
%52 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 9
%53 = getelementptr inbounds [12 x [10 x i8]], [12 x [10 x i8]]* %3, i64 0, i64 9, i64 0
%54 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 10
%55 = getelementptr inbounds [12 x [10 x i8]], [12 x [10 x i8]]* %3, i64 0, i64 10, i64 0
%56 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 11
%57 = getelementptr inbounds [12 x [10 x i8]], [12 x [10 x i8]]* %3, i64 0, i64 11, i64 0
br label %58
58: ; preds = %315, %0
%59 = phi i32 [ 0, %0 ], [ %316, %315 ]
%60 = phi i32 [ 0, %0 ], [ %317, %315 ]
%61 = phi i32 [ 0, %0 ], [ %318, %315 ]
%62 = phi i32 [ undef, %0 ], [ %319, %315 ]
%63 = call i32 @printPuzzle(i8* %17, i32 %59, i32 %60, i32** %19)
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %23)
%65 = call i32 @strcpy(i8* %23, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%67 = load i32, i32* %9
%68 = icmp eq i32 %67, -1
br i1 %68, label %76, label %69
69: ; preds = %58
%70 = load i32, i32* %27
%71 = sext i32 %70 to i64
%72 = sext i32 %67 to i64
%73 = getelementptr inbounds [50 x [50 x i8]], [50 x [50 x i8]]* %2, i64 0, i64 %71, i64 %72
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
br label %76
76: ; preds = %58, %69
%77 = phi i32 [ %75, %69 ], [ 95, %58 ]
%78 = call i32 @putchar(i32 %77)
%79 = load i32, i32* %10
%80 = icmp eq i32 %79, -1
br i1 %80, label %88, label %81
81: ; preds = %76
%82 = load i32, i32* %28
%83 = sext i32 %82 to i64
%84 = sext i32 %79 to i64
%85 = getelementptr inbounds [50 x [50 x i8]], [50 x [50 x i8]]* %2, i64 0, i64 %83, i64 %84
%86 = load i8, i8* %85
%87 = sext i8 %86 to i32
br label %88
88: ; preds = %76, %81
%89 = phi i32 [ %87, %81 ], [ 95, %76 ]
%90 = call i32 @putchar(i32 %89)
%91 = load i32, i32* %11
%92 = icmp eq i32 %91, -1
br i1 %92, label %100, label %93
93: ; preds = %88
%94 = load i32, i32* %29
%95 = sext i32 %94 to i64
%96 = sext i32 %91 to i64
%97 = getelementptr inbounds [50 x [50 x i8]], [50 x [50 x i8]]* %2, i64 0, i64 %95, i64 %96
%98 = load i8, i8* %97
%99 = sext i8 %98 to i32
br label %100
100: ; preds = %88, %93
%101 = phi i32 [ %99, %93 ], [ 95, %88 ]
%102 = call i32 @putchar(i32 %101)
%103 = load i32, i32* %12
%104 = icmp eq i32 %103, -1
br i1 %104, label %112, label %105
105: ; preds = %100
%106 = load i32, i32* %30
%107 = sext i32 %106 to i64
%108 = sext i32 %103 to i64
%109 = getelementptr inbounds [50 x [50 x i8]], [50 x [50 x i8]]* %2, i64 0, i64 %107, i64 %108
%110 = load i8, i8* %109
%111 = sext i8 %110 to i32
br label %112
112: ; preds = %100, %105
%113 = phi i32 [ %111, %105 ], [ 95, %100 ]
%114 = call i32 @putchar(i32 %113)
%115 = load i32, i32* %13
%116 = icmp eq i32 %115, -1
br i1 %116, label %124, label %117
117: ; preds = %112
%118 = load i32, i32* %31
%119 = sext i32 %118 to i64
%120 = sext i32 %115 to i64
%121 = getelementptr inbounds [50 x [50 x i8]], [50 x [50 x i8]]* %2, i64 0, i64 %119, i64 %120
%122 = load i8, i8* %121
%123 = sext i8 %122 to i32
br label %124
124: ; preds = %112, %117
%125 = phi i32 [ %123, %117 ], [ 95, %112 ]
%126 = call i32 @putchar(i32 %125)
%127 = load i32, i32* %14
%128 = icmp eq i32 %127, -1
br i1 %128, label %136, label %129
129: ; preds = %124
%130 = load i32, i32* %32
%131 = sext i32 %130 to i64
%132 = sext i32 %127 to i64
%133 = getelementptr inbounds [50 x [50 x i8]], [50 x [50 x i8]]* %2, i64 0, i64 %131, i64 %132
%134 = load i8, i8* %133
%135 = sext i8 %134 to i32
br label %136
136: ; preds = %124, %129
%137 = phi i32 [ %135, %129 ], [ 95, %124 ]
%138 = call i32 @putchar(i32 %137)
%139 = load i32, i32* %15
%140 = icmp eq i32 %139, -1
br i1 %140, label %148, label %141
141: ; preds = %136
%142 = load i32, i32* %33
%143 = sext i32 %142 to i64
%144 = sext i32 %139 to i64
%145 = getelementptr inbounds [50 x [50 x i8]], [50 x [50 x i8]]* %2, i64 0, i64 %143, i64 %144
%146 = load i8, i8* %145
%147 = sext i8 %146 to i32
br label %148
148: ; preds = %136, %141
%149 = phi i32 [ %147, %141 ], [ 95, %136 ]
%150 = call i32 @putchar(i32 %149)
%151 = load i32, i32* %16
%152 = icmp eq i32 %151, -1
br i1 %152, label %160, label %153
153: ; preds = %148
%154 = load i32, i32* %34
%155 = sext i32 %154 to i64
%156 = sext i32 %151 to i64
%157 = getelementptr inbounds [50 x [50 x i8]], [50 x [50 x i8]]* %2, i64 0, i64 %155, i64 %156
%158 = load i8, i8* %157
%159 = sext i8 %158 to i32
br label %160
160: ; preds = %148, %153
%161 = phi i32 [ %159, %153 ], [ 95, %148 ]
%162 = call i32 @putchar(i32 %161)
%163 = call i32 @putchar(i32 10)
%164 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
%165 = load i32, i32* %35
%166 = icmp eq i32 %165, 0
br i1 %166, label %169, label %167
167: ; preds = %160
%168 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %21)
br label %169
169: ; preds = %160, %167
%170 = phi i32 [ 1, %167 ], [ 0, %160 ]
%171 = load i32, i32* %36
%172 = icmp eq i32 %171, 0
br i1 %172, label %176, label %173
173: ; preds = %169
%174 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %37)
%175 = add nuw nsw i32 %170, 1
br label %176
176: ; preds = %173, %169
%177 = phi i32 [ %175, %173 ], [ %170, %169 ]
%178 = load i32, i32* %38
%179 = icmp eq i32 %178, 0
br i1 %179, label %183, label %180
180: ; preds = %176
%181 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %39)
%182 = add nuw nsw i32 %177, 1
br label %183
183: ; preds = %180, %176
%184 = phi i32 [ %182, %180 ], [ %177, %176 ]
%185 = load i32, i32* %40
%186 = icmp eq i32 %185, 0
br i1 %186, label %190, label %187
187: ; preds = %183
%188 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %41)
%189 = add nuw nsw i32 %184, 1
br label %190
190: ; preds = %187, %183
%191 = phi i32 [ %189, %187 ], [ %184, %183 ]
%192 = load i32, i32* %42
%193 = icmp eq i32 %192, 0
br i1 %193, label %197, label %194
194: ; preds = %190
%195 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %43)
%196 = add nuw nsw i32 %191, 1
br label %197
197: ; preds = %194, %190
%198 = phi i32 [ %196, %194 ], [ %191, %190 ]
%199 = load i32, i32* %44
%200 = icmp eq i32 %199, 0
br i1 %200, label %204, label %201
201: ; preds = %197
%202 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %45)
%203 = add nuw nsw i32 %198, 1
br label %204
204: ; preds = %201, %197
%205 = phi i32 [ %203, %201 ], [ %198, %197 ]
%206 = load i32, i32* %46
%207 = icmp eq i32 %206, 0
br i1 %207, label %211, label %208
208: ; preds = %204
%209 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %47)
%210 = add nuw nsw i32 %205, 1
br label %211
211: ; preds = %208, %204
%212 = phi i32 [ %210, %208 ], [ %205, %204 ]
%213 = load i32, i32* %48
%214 = icmp eq i32 %213, 0
br i1 %214, label %218, label %215
215: ; preds = %211
%216 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %49)
%217 = add nuw nsw i32 %212, 1
br label %218
218: ; preds = %215, %211
%219 = phi i32 [ %217, %215 ], [ %212, %211 ]
%220 = load i32, i32* %50
%221 = icmp eq i32 %220, 0
br i1 %221, label %225, label %222
222: ; preds = %218
%223 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %51)
%224 = add nuw nsw i32 %219, 1
br label %225
225: ; preds = %222, %218
%226 = phi i32 [ %224, %222 ], [ %219, %218 ]
%227 = load i32, i32* %52
%228 = icmp eq i32 %227, 0
br i1 %228, label %232, label %229
229: ; preds = %225
%230 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %53)
%231 = add nuw nsw i32 %226, 1
br label %232
232: ; preds = %229, %225
%233 = phi i32 [ %231, %229 ], [ %226, %225 ]
%234 = load i32, i32* %54
%235 = icmp eq i32 %234, 0
br i1 %235, label %239, label %236
236: ; preds = %232
%237 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %55)
%238 = add nuw nsw i32 %233, 1
br label %239
239: ; preds = %236, %232
%240 = phi i32 [ %238, %236 ], [ %233, %232 ]
%241 = load i32, i32* %56
%242 = icmp eq i32 %241, 0
br i1 %242, label %247, label %243
243: ; preds = %239
%244 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %57)
%245 = add nuw nsw i32 %240, 1
%246 = icmp ult i32 %240, 11
br i1 %246, label %247, label %250
247: ; preds = %239, %243
%248 = phi i32 [ %245, %243 ], [ %240, %239 ]
%249 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i32 %248)
br label %252
250: ; preds = %243
%251 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i32 %245)
br label %252
252: ; preds = %250, %247
switch i32 %62, label %315 [
i32 119, label %254
i32 97, label %258
i32 115, label %262
i32 100, label %266
i32 32, label %270
i32 99, label %253
i32 118, label %307
i32 104, label %313
]
253: ; preds = %252
store i32 -1, i32* %9
store i32 -1, i32* %10
store i32 -1, i32* %11
store i32 -1, i32* %12
store i32 -1, i32* %13
store i32 -1, i32* %14
store i32 -1, i32* %15
store i32 -1, i32* %16
br label %315
254: ; preds = %252
%255 = icmp sgt i32 %60, 0
%256 = sext i1 %255 to i32
%257 = add nsw i32 %60, %256
br label %315
258: ; preds = %252
%259 = icmp sgt i32 %59, 0
%260 = sext i1 %259 to i32
%261 = add nsw i32 %59, %260
br label %315
262: ; preds = %252
%263 = icmp slt i32 %60, 49
%264 = zext i1 %263 to i32
%265 = add nsw i32 %60, %264
br label %315
266: ; preds = %252
%267 = icmp slt i32 %59, 49
%268 = zext i1 %267 to i32
%269 = add nsw i32 %59, %268
br label %315
270: ; preds = %252
%271 = icmp slt i32 %61, 8
br i1 %271, label %272, label %315
272: ; preds = %270
%273 = add nsw i32 %61, -1
%274 = sext i32 %273 to i64
%275 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 %274, i64 0
%276 = load i32, i32* %275
%277 = add nsw i32 %276, -1
%278 = icmp eq i32 %59, %277
%279 = add nsw i32 %276, 1
%280 = icmp eq i32 %59, %279
%281 = select i1 %278, i1 true, i1 %280
br i1 %281, label %286, label %282
282: ; preds = %272
%283 = icmp eq i32 %59, %276
%284 = icmp eq i32 %61, 0
%285 = select i1 %283, i1 true, i1 %284
br i1 %285, label %286, label %305
286: ; preds = %282, %272
%287 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 %274, i64 1
%288 = load i32, i32* %287
%289 = add nsw i32 %288, -1
%290 = icmp eq i32 %60, %289
%291 = add nsw i32 %288, 1
%292 = icmp eq i32 %60, %291
%293 = select i1 %290, i1 true, i1 %292
br i1 %293, label %298, label %294
294: ; preds = %286
%295 = icmp eq i32 %60, %288
%296 = icmp eq i32 %61, 0
%297 = select i1 %295, i1 true, i1 %296
br i1 %297, label %298, label %303
298: ; preds = %294, %286
%299 = sext i32 %61 to i64
%300 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 %299, i64 0
store i32 %59, i32* %300
%301 = getelementptr inbounds [8 x [2 x i32]], [8 x [2 x i32]]* %1, i64 0, i64 %299, i64 1
store i32 %60, i32* %301
%302 = add nsw i32 %61, 1
br label %315
303: ; preds = %294
%304 = call i32 @strcpy(i8* %23, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.10, i64 0, i64 0))
br label %315
305: ; preds = %282
%306 = call i32 @strcpy(i8* %23, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.10, i64 0, i64 0))
br label %315
307: ; preds = %252
%308 = call i32 @verifySelection(i32* %9, i8* %17, i8** %26)
%309 = icmp sgt i32 %308, -1
br i1 %309, label %310, label %315
310: ; preds = %307
%311 = zext i32 %308 to i64
%312 = getelementptr inbounds [12 x i32], [12 x i32]* %4, i64 0, i64 %311
store i32 1, i32* %312
br label %315
313: ; preds = %252
%314 = call i32 @strcpy(i8* %23, i8* %24)
br label %315
315: ; preds = %253, %266, %262, %258, %254, %313, %252, %305, %303, %298, %270, %310, %307
%316 = phi i32 [ %59, %252 ], [ %59, %313 ], [ %59, %310 ], [ %59, %307 ], [ %59, %298 ], [ %59, %303 ], [ %59, %305 ], [ %59, %270 ], [ %59, %254 ], [ %261, %258 ], [ %59, %262 ], [ %269, %266 ], [ %59, %253 ]
%317 = phi i32 [ %60, %252 ], [ %60, %313 ], [ %60, %310 ], [ %60, %307 ], [ %60, %298 ], [ %60, %303 ], [ %60, %305 ], [ %60, %270 ], [ %257, %254 ], [ %60, %258 ], [ %265, %262 ], [ %60, %266 ], [ %60, %253 ]
%318 = phi i32 [ %61, %252 ], [ %61, %313 ], [ %61, %310 ], [ %61, %307 ], [ %302, %298 ], [ %61, %303 ], [ %61, %305 ], [ %61, %270 ], [ %61, %254 ], [ %61, %258 ], [ %61, %262 ], [ %61, %266 ], [ 0, %253 ]
%319 = call i32 (...) @getchar()
%320 = icmp eq i32 %319, 113
br i1 %320, label %321, label %58
321: ; preds = %315
ret i32 0
}