#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 */
scalar_t__ check_login_data(char *, char *);
int /*<<< orphan*/ czysc();
int did_i_win(int **);
int dofileexist(char *);
int /*<<< orphan*/ empty(int, int **);
int /*<<< orphan*/ fill_randomly(int, int **);
int /*<<< orphan*/ flip_the_light(int, int, int **, int);
int getch();
int /*<<< orphan*/ gimme_hint(int **, int *);
scalar_t__ is_anybody_logged_in(char *);
int /*<<< orphan*/ print_hiscores();
int /*<<< orphan*/ print_login();
int /*<<< orphan*/ print_welcome(int, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ push_to_hiscores(char *, int);
int /*<<< orphan*/ register_user(char *, char *);
int /*<<< orphan*/ render(int, int **, int, int);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ vec_to_arr(int *, int **);
int wt(int *);
main() {
  int tablica[5][5];
  empty(5, tablica);
  char uzytkownik[64] = "Gość";
  int size = 5;
  int klawisz;
  int ruchy = 0;
  int tip = 1;
  int solve = 0;
  int kur_x = 0, kur_y = 0;
  int temp;
  char login[256];
  char password[256];
  int hint_v[25];
  int hint_a[5][5];
  int robocza[25];
  int min = 0;
  fill_randomly(size, tablica);
  gimme_hint(tablica, hint_v);
  min = wt(hint_v);
  print_welcome(tip, uzytkownik);
  render(size, tablica, 0, 0);
  while (klawisz = getch()) {
    czysc();
    if (klawisz == 119 || klawisz == 65) {
      kur_x = (kur_x > 0) ? kur_x - 1 : size - 1;
    }
    if (klawisz == 97 || klawisz == 68) {
      kur_y = (kur_y > 0) ? kur_y - 1 : size - 1;
    }
    if (klawisz == 115 || klawisz == 66) {
      kur_x = (kur_x < size - 1) ? kur_x + 1 : 0;
    }
    if (klawisz == 100 || klawisz == 67) {
      kur_y = (kur_y < size - 1) ? kur_y + 1 : 0;
    }
    if (klawisz == 32 || klawisz == 10) {
      flip_the_light(kur_x, kur_y, tablica, size);
      ruchy++;
    }
    if (klawisz == 104 || klawisz == 72) {
      tip = (tip == 0) ? 1 : 0;
    }
    if (klawisz == 98) {
      czysc();
      print_hiscores();
    }
    if (klawisz == 113 || klawisz == 81) {
      break;
    }
    if (klawisz == 63) {
      solve = (solve == 0) ? 1 : 0;
    }
    if (klawisz == 108 || klawisz == 76) {
      czysc();
      print_login();
      printf("\nLogin: ");
      scanf("%s", login);
      if ((temp = dofileexist(login)) != 0) {
        printf("\n\nUżytkownika nie było w bazie, \nrejestruję użytkownika o "
               "loginie: %s\nWpisz hasło jakie mam nadać użytkownikowi\nPo "
               "zarejestrowaniu uruchom grę ponownie\n\n",
               login);
      } else {
        printf("Użytkownik %s znajduje się w bazie - wpisz poprawne hasło:\n\n",
               login);
      }
      printf("\nHaslo: ");
      scanf("%s", password);
      if (temp != 0) {
        register_user(login, password);
        break;
      } else {
        if (check_login_data(login, password) == 0) {
          printf("Logowanie zakończone pomyślnie\n");
          strcpy(uzytkownik, login);
        } else {
          printf("Wprowadzono złe hasło\n");
        }
      }
      czysc();
    }
    print_welcome(tip, uzytkownik);
    render(size, tablica, kur_x, kur_y);
    if (solve == 1) {
      gimme_hint(tablica, hint_v);
      vec_to_arr(hint_v, hint_a);
      render(size, hint_a, kur_x, kur_y);
    }
    printf("\nIlość wykonanych ruchów: %d, minimalna ilosc ruchów do wygranej: "
           "%d\n",
           ruchy, min);
    if (did_i_win(tablica) != 1) {
      printf("\nJeszcze nie wygrałeś");
    } else {
      printf("\nWygrałeś\n\n");
      if (ruchy != min) {
        if (ruchy < min) {
          printf("\nSzczere gratulacje, komputer był gorszy od Ciebie w "
                 "szukaniu najszybszej metody\n");
        }
        if (ruchy > min) {
          printf("\nNajszybsza metoda nie została przez Ciebie użyta do "
                 "rozwiązania tej łamigłówki\n");
        }
      } else if (ruchy == min) {
        printf("\nWybrano dokładnie tą samą metodę co komputer ;)\n");
      }
      if (is_anybody_logged_in(uzytkownik) != 0) {
        printf("Zostałeś wpisany na listę najwyższych wyników jako %s z "
               "wynikiem %d punktów",
               uzytkownik, ruchy);
        push_to_hiscores(uzytkownik, ruchy);
      } else {
        printf("Nie byłeś zalogowany, twój wynik to %d, jednak nie zostanie on "
               "wpisany na listę najlepszych wyników",
               ruchy);
      }
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x440,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
mov    $0x5,%edi
call   1090 <empty@plt>
lea    -0xb0(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1070 <memset@plt>
movb   $0x47,-0xb0(%rbp)
movb   $0x6f,-0xaf(%rbp)
movb   $0xc5,-0xae(%rbp)
movb   $0x9b,-0xad(%rbp)
movb   $0xc4,-0xac(%rbp)
movb   $0x87,-0xab(%rbp)
movl   $0x5,-0xb4(%rbp)
movl   $0x0,-0xbc(%rbp)
movl   $0x1,-0xc0(%rbp)
movl   $0x0,-0xc4(%rbp)
movl   $0x0,-0xc8(%rbp)
movl   $0x0,-0xcc(%rbp)
movl   $0x0,-0x424(%rbp)
mov    -0xb4(%rbp),%edi
lea    -0x70(%rbp),%rsi
call   1080 <fill_randomly@plt>
lea    -0x70(%rbp),%rdi
lea    -0x340(%rbp),%rsi
call   1140 <gimme_hint@plt>
lea    -0x340(%rbp),%rdi
call   10f0 <wt@plt>
mov    %eax,-0x424(%rbp)
mov    -0xc0(%rbp),%edi
lea    -0xb0(%rbp),%rsi
call   10d0 <print_welcome@plt>
mov    -0xb4(%rbp),%edi
lea    -0x70(%rbp),%rsi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1060 <render@plt>
mov    $0x0,%al
call   1110 <getch@plt>
mov    %eax,-0xb8(%rbp)
cmp    $0x0,%eax
je     1895 <main+0x635>
mov    $0x0,%al
call   1170 <czysc@plt>
cmpl   $0x77,-0xb8(%rbp)
je     1390 <main+0x130>
cmpl   $0x41,-0xb8(%rbp)
jne    13cc <main+0x16c>
cmpl   $0x0,-0xc8(%rbp)
jle    13b1 <main+0x151>
mov    -0xc8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x428(%rbp)
jmp    13c0 <main+0x160>
mov    -0xb4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x428(%rbp)
mov    -0x428(%rbp),%eax
mov    %eax,-0xc8(%rbp)
cmpl   $0x61,-0xb8(%rbp)
je     13e6 <main+0x186>
cmpl   $0x44,-0xb8(%rbp)
jne    1422 <main+0x1c2>
cmpl   $0x0,-0xcc(%rbp)
jle    1407 <main+0x1a7>
mov    -0xcc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x42c(%rbp)
jmp    1416 <main+0x1b6>
mov    -0xb4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x42c(%rbp)
mov    -0x42c(%rbp),%eax
mov    %eax,-0xcc(%rbp)
cmpl   $0x73,-0xb8(%rbp)
je     143c <main+0x1dc>
cmpl   $0x42,-0xb8(%rbp)
jne    1480 <main+0x220>
mov    -0xc8(%rbp),%eax
mov    -0xb4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1467 <main+0x207>
mov    -0xc8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x430(%rbp)
jmp    1474 <main+0x214>
xor    %eax,%eax
mov    %eax,-0x430(%rbp)
jmp    1474 <main+0x214>
mov    -0x430(%rbp),%eax
mov    %eax,-0xc8(%rbp)
cmpl   $0x64,-0xb8(%rbp)
je     149a <main+0x23a>
cmpl   $0x43,-0xb8(%rbp)
jne    14de <main+0x27e>
mov    -0xcc(%rbp),%eax
mov    -0xb4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    14c5 <main+0x265>
mov    -0xcc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x434(%rbp)
jmp    14d2 <main+0x272>
xor    %eax,%eax
mov    %eax,-0x434(%rbp)
jmp    14d2 <main+0x272>
mov    -0x434(%rbp),%eax
mov    %eax,-0xcc(%rbp)
cmpl   $0x20,-0xb8(%rbp)
je     14f8 <main+0x298>
cmpl   $0xa,-0xb8(%rbp)
jne    1522 <main+0x2c2>
mov    -0xc8(%rbp),%edi
mov    -0xcc(%rbp),%esi
lea    -0x70(%rbp),%rdx
mov    -0xb4(%rbp),%ecx
call   1130 <flip_the_light@plt>
mov    -0xbc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbc(%rbp)
cmpl   $0x68,-0xb8(%rbp)
je     153c <main+0x2dc>
cmpl   $0x48,-0xb8(%rbp)
jne    1555 <main+0x2f5>
mov    -0xc0(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
mov    %eax,-0xc0(%rbp)
cmpl   $0x62,-0xb8(%rbp)
jne    1570 <main+0x310>
mov    $0x0,%al
call   1170 <czysc@plt>
mov    $0x0,%al
call   1180 <print_hiscores@plt>
cmpl   $0x71,-0xb8(%rbp)
je     158a <main+0x32a>
cmpl   $0x51,-0xb8(%rbp)
jne    158f <main+0x32f>
jmp    1895 <main+0x635>
cmpl   $0x3f,-0xb8(%rbp)
jne    15b5 <main+0x355>
mov    -0xc4(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
mov    %eax,-0xc4(%rbp)
cmpl   $0x6c,-0xb8(%rbp)
je     15cf <main+0x36f>
cmpl   $0x4c,-0xb8(%rbp)
jne    16eb <main+0x48b>
mov    $0x0,%al
call   1170 <czysc@plt>
mov    $0x0,%al
call   10b0 <print_login@plt>
lea    0xa1c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x1d0(%rbp),%rsi
lea    0xa10(%rip),%rdi
call   1100 <scanf@plt>
lea    -0x1d0(%rbp),%rdi
call   1150 <dofileexist@plt>
mov    %eax,-0xd0(%rbp)
cmp    $0x0,%eax
je     1633 <main+0x3d3>
lea    -0x1d0(%rbp),%rsi
lea    0x9e5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1648 <main+0x3e8>
lea    -0x1d0(%rbp),%rsi
lea    0xa6d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xa9f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x2d0(%rbp),%rsi
lea    0x9a5(%rip),%rdi
call   1100 <scanf@plt>
cmpl   $0x0,-0xd0(%rbp)
je     168e <main+0x42e>
lea    -0x1d0(%rbp),%rdi
lea    -0x2d0(%rbp),%rsi
call   10e0 <register_user@plt>
jmp    1895 <main+0x635>
lea    -0x1d0(%rbp),%rdi
lea    -0x2d0(%rbp),%rsi
call   1120 <check_login_data@plt>
cmp    $0x0,%rax
jne    16d1 <main+0x471>
lea    0xa45(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0xb0(%rbp),%rdi
lea    -0x1d0(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    16df <main+0x47f>
lea    0xa41(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    16e4 <main+0x484>
mov    $0x0,%al
call   1170 <czysc@plt>
mov    -0xc0(%rbp),%edi
lea    -0xb0(%rbp),%rsi
call   10d0 <print_welcome@plt>
mov    -0xb4(%rbp),%edi
lea    -0x70(%rbp),%rsi
mov    -0xc8(%rbp),%edx
mov    -0xcc(%rbp),%ecx
call   1060 <render@plt>
cmpl   $0x1,-0xc4(%rbp)
jne    1766 <main+0x506>
lea    -0x70(%rbp),%rdi
lea    -0x340(%rbp),%rsi
call   1140 <gimme_hint@plt>
lea    -0x340(%rbp),%rdi
lea    -0x3b0(%rbp),%rsi
call   10a0 <vec_to_arr@plt>
mov    -0xb4(%rbp),%edi
lea    -0x3b0(%rbp),%rsi
mov    -0xc8(%rbp),%edx
mov    -0xcc(%rbp),%ecx
call   1060 <render@plt>
mov    -0xbc(%rbp),%esi
mov    -0x424(%rbp),%edx
lea    0x9b9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x70(%rbp),%rdi
call   1160 <did_i_win@plt>
cmp    $0x1,%eax
je     17a5 <main+0x545>
lea    0x9e3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1890 <main+0x630>
lea    0x9e8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xbc(%rbp),%eax
cmp    -0x424(%rbp),%eax
je     180a <main+0x5aa>
mov    -0xbc(%rbp),%eax
cmp    -0x424(%rbp),%eax
jge    17e5 <main+0x585>
lea    0x9c4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xbc(%rbp),%eax
cmp    -0x424(%rbp),%eax
jle    1805 <main+0x5a5>
lea    0x9f7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    182f <main+0x5cf>
mov    -0xbc(%rbp),%eax
cmp    -0x424(%rbp),%eax
jne    182a <main+0x5ca>
lea    0xa29(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    182f <main+0x5cf>
lea    -0xb0(%rbp),%rdi
call   10c0 <is_anybody_logged_in@plt>
cmp    $0x0,%rax
je     1877 <main+0x617>
lea    -0xb0(%rbp),%rsi
mov    -0xbc(%rbp),%edx
lea    0xa29(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0xb0(%rbp),%rdi
mov    -0xbc(%rbp),%esi
call   1040 <push_to_hiscores@plt>
jmp    188b <main+0x62b>
mov    -0xbc(%rbp),%esi
lea    0xa50(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1890 <main+0x630>
jmp    1359 <main+0xf9>
mov    -0x4(%rbp),%eax
add    $0x440,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x398,%rsp
lea    0x50(%rsp),%r14
mov    $0x5,%edi
mov    %r14,%rsi
call   1090 <empty@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movl   $0x9bc56f47,0x10(%rsp)
9b
movw   $0x87c4,0x14(%rsp)
mov    $0x5,%edi
mov    %r14,%rsi
call   1080 <fill_randomly@plt>
lea    0xc0(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1140 <gimme_hint@plt>
mov    %rbx,%rdi
call   10f0 <wt@plt>
mov    %eax,0x4(%rsp)
movl   $0x1,0xc(%rsp)
lea    0x10(%rsp),%rsi
mov    $0x1,%edi
call   10d0 <print_welcome@plt>
mov    $0x5,%edi
mov    %r14,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
call   1070 <render@plt>
xor    %eax,%eax
call   1110 <getch@plt>
test   %eax,%eax
je     169b <main+0x43b>
mov    %eax,%r14d
lea    0x230(%rsp),%rbx
lea    0x130(%rsp),%rbp
xor    %r13d,%r13d
xor    %r12d,%r12d
xor    %r15d,%r15d
movl   $0x0,0x8(%rsp)
jmp    1370 <main+0x110>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0xdfa(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0x230(%rsp),%rbx
lea    0x130(%rsp),%rbp
xor    %eax,%eax
call   1110 <getch@plt>
mov    %eax,%r14d
test   %eax,%eax
je     169b <main+0x43b>
xor    %eax,%eax
call   1170 <czysc@plt>
cmp    $0x77,%r14d
je     1383 <main+0x123>
cmp    $0x41,%r14d
jne    1395 <main+0x135>
test   %r15d,%r15d
lea    -0x1(%r15),%eax
mov    $0x4,%ecx
cmovle %ecx,%eax
mov    %eax,%r15d
cmp    $0x61,%r14d
je     13a1 <main+0x141>
cmp    $0x44,%r14d
jne    13b4 <main+0x154>
test   %r12d,%r12d
lea    -0x1(%r12),%eax
mov    $0x4,%ecx
cmovle %ecx,%eax
mov    %eax,%r12d
cmp    $0x73,%r14d
je     13c0 <main+0x160>
cmp    $0x42,%r14d
jne    13d3 <main+0x173>
cmp    $0x4,%r15d
lea    0x1(%r15),%eax
mov    $0x0,%ecx
cmovge %ecx,%eax
mov    %eax,%r15d
cmp    $0x64,%r14d
je     13df <main+0x17f>
cmp    $0x43,%r14d
jne    13f3 <main+0x193>
cmp    $0x4,%r12d
lea    0x1(%r12),%eax
mov    $0x0,%ecx
cmovge %ecx,%eax
mov    %eax,%r12d
cmp    $0x20,%r14d
je     13ff <main+0x19f>
cmp    $0xa,%r14d
jne    1420 <main+0x1c0>
mov    %r15d,%edi
mov    %r12d,%esi
lea    0x50(%rsp),%rbp
mov    %rbp,%rdx
mov    $0x5,%ecx
call   1130 <flip_the_light@plt>
add    $0x1,%r13d
jmp    1535 <main+0x2d5>
mov    %r14d,%eax
and    $0xffffffdf,%eax
xor    %ecx,%ecx
mov    0xc(%rsp),%edx
test   %edx,%edx
sete   %cl
cmp    $0x48,%eax
cmove  %ecx,%edx
mov    %edx,0xc(%rsp)
cmp    $0x62,%r14d
jne    1454 <main+0x1f4>
xor    %eax,%eax
call   1170 <czysc@plt>
xor    %eax,%eax
call   1180 <print_hiscores@plt>
jmp    1530 <main+0x2d0>
cmp    $0x51,%eax
je     169b <main+0x43b>
xor    %ecx,%ecx
mov    0x8(%rsp),%edx
test   %edx,%edx
sete   %cl
cmp    $0x3f,%r14d
cmove  %ecx,%edx
mov    %edx,0x8(%rsp)
cmp    $0x4c,%eax
jne    1530 <main+0x2d0>
xor    %eax,%eax
call   1170 <czysc@plt>
xor    %eax,%eax
call   10b0 <print_login@plt>
lea    0xb6f(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbp,%r14
lea    0xb67(%rip),%rdi
mov    %rbx,%rsi
call   1100 <scanf@plt>
mov    %rbx,%rdi
call   1150 <dofileexist@plt>
mov    %eax,%ebp
test   %eax,%eax
lea    0xb4f(%rip),%rdi
lea    0xbea(%rip),%rax
cmove  %rax,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xc15(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xb22(%rip),%rdi
mov    %r14,%rsi
call   1100 <scanf@plt>
test   %ebp,%ebp
jne    1686 <main+0x426>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1120 <check_login_data@plt>
test   %rax,%rax
je     1655 <main+0x3f5>
lea    0xdec(%rip),%rdi
call   1040 <puts@plt>
mov    0x4(%rsp),%ebx
lea    0x50(%rsp),%rbp
lea    0x10(%rsp),%r14
jmp    167a <main+0x41a>
nopw   0x0(%rax,%rax,1)
lea    0x50(%rsp),%rbp
lea    0x10(%rsp),%r14
mov    0x4(%rsp),%ebx
mov    0xc(%rsp),%edi
mov    %r14,%rsi
call   10d0 <print_welcome@plt>
mov    $0x5,%edi
mov    %rbp,%rsi
mov    %r15d,%edx
mov    %r12d,%ecx
call   1070 <render@plt>
cmpl   $0x1,0x8(%rsp)
jne    15a1 <main+0x341>
mov    %rbp,%rdi
lea    0xc0(%rsp),%rbx
mov    %rbx,%rsi
call   1140 <gimme_hint@plt>
mov    %rbx,%rdi
lea    0x330(%rsp),%rbx
mov    %rbx,%rsi
call   10a0 <vec_to_arr@plt>
mov    $0x5,%edi
mov    %rbx,%rsi
mov    0x4(%rsp),%ebx
mov    %r15d,%edx
mov    %r12d,%ecx
call   1070 <render@plt>
lea    0xb4f(%rip),%rdi
mov    %r13d,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbp,%rdi
call   1160 <did_i_win@plt>
cmp    $0x1,%eax
jne    1340 <main+0xe0>
lea    0xc48(%rip),%rdi
call   1040 <puts@plt>
lea    0xc49(%rip),%rdi
cmp    %ebx,%r13d
lea    0x230(%rsp),%rbx
lea    0x130(%rsp),%rbp
je     1609 <main+0x3a9>
jge    15fb <main+0x39b>
lea    0xcb6(%rip),%rdi
call   1040 <puts@plt>
lea    0xc54(%rip),%rdi
cmp    0x4(%rsp),%r13d
jle    160e <main+0x3ae>
call   1040 <puts@plt>
mov    %r14,%rdi
call   10c0 <is_anybody_logged_in@plt>
test   %rax,%rax
je     163f <main+0x3df>
lea    0xb37(%rip),%rdi
mov    %r14,%rsi
mov    %r13d,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
mov    %r13d,%esi
call   1050 <push_to_hiscores@plt>
jmp    135e <main+0xfe>
lea    0xb65(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    135e <main+0xfe>
lea    0xcba(%rip),%rdi
call   1040 <puts@plt>
lea    0x10(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    0x4(%rsp),%ebx
lea    0x50(%rsp),%rbp
xor    %eax,%eax
call   1170 <czysc@plt>
jmp    153e <main+0x2de>
lea    0x230(%rsp),%rdi
lea    0x130(%rsp),%rsi
call   10e0 <register_user@plt>
xor    %eax,%eax
add    $0x398,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"\0ALogin: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [162 x i8] c"\0A\0AU\C5\BCytkownika nie by\C5\82o w bazie, \0Arejestruj\C4\99 u\C5\BCytkownika o loginie: %s\0AWpisz has\C5\82o jakie mam nada\C4\87 u\C5\BCytkownikowi\0APo zarejestrowaniu uruchom gr\C4\99 ponownie\0A\0A\00"
@.str.3 = [64 x i8] c"U\C5\BCytkownik %s znajduje si\C4\99 w bazie - wpisz poprawne has\C5\82o:\0A\0A\00"
@.str.4 = [9 x i8] c"\0AHaslo: \00"
@.str.5 = [34 x i8] c"Logowanie zako\C5\84czone pomy\C5\9Blnie\0A\00"
@.str.6 = [25 x i8] c"Wprowadzono z\C5\82e has\C5\82o\0A\00"
@.str.7 = [74 x i8] c"\0AIlo\C5\9B\C4\87 wykonanych ruch\C3\B3w: %d, minimalna ilosc ruch\C3\B3w do wygranej: %d\0A\00"
@.str.8 = [24 x i8] c"\0AJeszcze nie wygra\C5\82e\C5\9B\00"
@.str.9 = [14 x i8] c"\0AWygra\C5\82e\C5\9B\0A\0A\00"
@.str.10 = [83 x i8] c"\0ASzczere gratulacje, komputer by\C5\82 gorszy od Ciebie w szukaniu najszybszej metody\0A\00"
@.str.11 = [87 x i8] c"\0ANajszybsza metoda nie zosta\C5\82a przez Ciebie u\C5\BCyta do rozwi\C4\85zania tej \C5\82amig\C5\82\C3\B3wki\0A\00"
@.str.12 = [54 x i8] c"\0AWybrano dok\C5\82adnie t\C4\85 sam\C4\85 metod\C4\99 co komputer ;)\0A\00"
@.str.13 = [82 x i8] c"Zosta\C5\82e\C5\9B wpisany na list\C4\99 najwy\C5\BCszych wynik\C3\B3w jako %s z wynikiem %d punkt\C3\B3w\00"
@.str.14 = [105 x i8] c"Nie by\C5\82e\C5\9B zalogowany, tw\C3\B3j wynik to %d, jednak nie zostanie on wpisany na list\C4\99 najlepszych wynik\C3\B3w\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x [5 x i32]]
%3 = alloca [64 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca [256 x i8]
%13 = alloca [256 x i8]
%14 = alloca [25 x i32]
%15 = alloca [5 x [5 x i32]]
%16 = alloca [25 x i32]
%17 = alloca i32
store i32 0, i32* %1
%18 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 0
%19 = bitcast [5 x i32]* %18 to i32**
%20 = call i32 @empty(i32 5, i32** %19)
%21 = bitcast [64 x i8]* %3 to i8*
%22 = bitcast i8* %21 to [64 x i8]*
%23 = getelementptr inbounds [64 x i8], [64 x i8]* %22, i32 0, i32 0
store i8 71, i8* %23
%24 = getelementptr inbounds [64 x i8], [64 x i8]* %22, i32 0, i32 1
store i8 111, i8* %24
%25 = getelementptr inbounds [64 x i8], [64 x i8]* %22, i32 0, i32 2
store i8 -59, i8* %25
%26 = getelementptr inbounds [64 x i8], [64 x i8]* %22, i32 0, i32 3
store i8 -101, i8* %26
%27 = getelementptr inbounds [64 x i8], [64 x i8]* %22, i32 0, i32 4
store i8 -60, i8* %27
%28 = getelementptr inbounds [64 x i8], [64 x i8]* %22, i32 0, i32 5
store i8 -121, i8* %28
store i32 5, i32* %4
store i32 0, i32* %6
store i32 1, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %17
%29 = load i32, i32* %4
%30 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 0
%31 = bitcast [5 x i32]* %30 to i32**
%32 = call i32 @fill_randomly(i32 %29, i32** %31)
%33 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 0
%34 = bitcast [5 x i32]* %33 to i32**
%35 = getelementptr inbounds [25 x i32], [25 x i32]* %14, i64 0, i64 0
%36 = call i32 @gimme_hint(i32** %34, i32* %35)
%37 = getelementptr inbounds [25 x i32], [25 x i32]* %14, i64 0, i64 0
%38 = call i32 @wt(i32* %37)
store i32 %38, i32* %17
%39 = load i32, i32* %7
%40 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%41 = call i32 @print_welcome(i32 %39, i8* %40)
%42 = load i32, i32* %4
%43 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 0
%44 = bitcast [5 x i32]* %43 to i32**
%45 = call i32 @render(i32 %42, i32** %44, i32 0, i32 0)
br label %46
46: ; preds = %288, %0
%47 = call i32 (...) @getch()
store i32 %47, i32* %5
%48 = icmp ne i32 %47, 0
br i1 %48, label %49, label %289
49: ; preds = %46
%50 = call i32 (...) @czysc()
%51 = load i32, i32* %5
%52 = icmp eq i32 %51, 119
br i1 %52, label %56, label %53
53: ; preds = %49
%54 = load i32, i32* %5
%55 = icmp eq i32 %54, 65
br i1 %55, label %56, label %67
56: ; preds = %53, %49
%57 = load i32, i32* %9
%58 = icmp sgt i32 %57, 0
br i1 %58, label %59, label %62
59: ; preds = %56
%60 = load i32, i32* %9
%61 = sub nsw i32 %60, 1
br label %65
62: ; preds = %56
%63 = load i32, i32* %4
%64 = sub nsw i32 %63, 1
br label %65
65: ; preds = %62, %59
%66 = phi i32 [ %61, %59 ], [ %64, %62 ]
store i32 %66, i32* %9
br label %67
67: ; preds = %65, %53
%68 = load i32, i32* %5
%69 = icmp eq i32 %68, 97
br i1 %69, label %73, label %70
70: ; preds = %67
%71 = load i32, i32* %5
%72 = icmp eq i32 %71, 68
br i1 %72, label %73, label %84
73: ; preds = %70, %67
%74 = load i32, i32* %10
%75 = icmp sgt i32 %74, 0
br i1 %75, label %76, label %79
76: ; preds = %73
%77 = load i32, i32* %10
%78 = sub nsw i32 %77, 1
br label %82
79: ; preds = %73
%80 = load i32, i32* %4
%81 = sub nsw i32 %80, 1
br label %82
82: ; preds = %79, %76
%83 = phi i32 [ %78, %76 ], [ %81, %79 ]
store i32 %83, i32* %10
br label %84
84: ; preds = %82, %70
%85 = load i32, i32* %5
%86 = icmp eq i32 %85, 115
br i1 %86, label %90, label %87
87: ; preds = %84
%88 = load i32, i32* %5
%89 = icmp eq i32 %88, 66
br i1 %89, label %90, label %101
90: ; preds = %87, %84
%91 = load i32, i32* %9
%92 = load i32, i32* %4
%93 = sub nsw i32 %92, 1
%94 = icmp slt i32 %91, %93
br i1 %94, label %95, label %98
95: ; preds = %90
%96 = load i32, i32* %9
%97 = add nsw i32 %96, 1
br label %99
98: ; preds = %90
br label %99
99: ; preds = %98, %95
%100 = phi i32 [ %97, %95 ], [ 0, %98 ]
store i32 %100, i32* %9
br label %101
101: ; preds = %99, %87
%102 = load i32, i32* %5
%103 = icmp eq i32 %102, 100
br i1 %103, label %107, label %104
104: ; preds = %101
%105 = load i32, i32* %5
%106 = icmp eq i32 %105, 67
br i1 %106, label %107, label %118
107: ; preds = %104, %101
%108 = load i32, i32* %10
%109 = load i32, i32* %4
%110 = sub nsw i32 %109, 1
%111 = icmp slt i32 %108, %110
br i1 %111, label %112, label %115
112: ; preds = %107
%113 = load i32, i32* %10
%114 = add nsw i32 %113, 1
br label %116
115: ; preds = %107
br label %116
116: ; preds = %115, %112
%117 = phi i32 [ %114, %112 ], [ 0, %115 ]
store i32 %117, i32* %10
br label %118
118: ; preds = %116, %104
%119 = load i32, i32* %5
%120 = icmp eq i32 %119, 32
br i1 %120, label %124, label %121
121: ; preds = %118
%122 = load i32, i32* %5
%123 = icmp eq i32 %122, 10
br i1 %123, label %124, label %133
124: ; preds = %121, %118
%125 = load i32, i32* %9
%126 = load i32, i32* %10
%127 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 0
%128 = bitcast [5 x i32]* %127 to i32**
%129 = load i32, i32* %4
%130 = call i32 @flip_the_light(i32 %125, i32 %126, i32** %128, i32 %129)
%131 = load i32, i32* %6
%132 = add nsw i32 %131, 1
store i32 %132, i32* %6
br label %133
133: ; preds = %124, %121
%134 = load i32, i32* %5
%135 = icmp eq i32 %134, 104
br i1 %135, label %139, label %136
136: ; preds = %133
%137 = load i32, i32* %5
%138 = icmp eq i32 %137, 72
br i1 %138, label %139, label %144
139: ; preds = %136, %133
%140 = load i32, i32* %7
%141 = icmp eq i32 %140, 0
%142 = zext i1 %141 to i64
%143 = select i1 %141, i32 1, i32 0
store i32 %143, i32* %7
br label %144
144: ; preds = %139, %136
%145 = load i32, i32* %5
%146 = icmp eq i32 %145, 98
br i1 %146, label %147, label %150
147: ; preds = %144
%148 = call i32 (...) @czysc()
%149 = call i32 (...) @print_hiscores()
br label %150
150: ; preds = %147, %144
%151 = load i32, i32* %5
%152 = icmp eq i32 %151, 113
br i1 %152, label %156, label %153
153: ; preds = %150
%154 = load i32, i32* %5
%155 = icmp eq i32 %154, 81
br i1 %155, label %156, label %157
156: ; preds = %153, %150
br label %289
157: ; preds = %153
%158 = load i32, i32* %5
%159 = icmp eq i32 %158, 63
br i1 %159, label %160, label %165
160: ; preds = %157
%161 = load i32, i32* %8
%162 = icmp eq i32 %161, 0
%163 = zext i1 %162 to i64
%164 = select i1 %162, i32 1, i32 0
store i32 %164, i32* %8
br label %165
165: ; preds = %160, %157
%166 = load i32, i32* %5
%167 = icmp eq i32 %166, 108
br i1 %167, label %171, label %168
168: ; preds = %165
%169 = load i32, i32* %5
%170 = icmp eq i32 %169, 76
br i1 %170, label %171, label %211
171: ; preds = %168, %165
%172 = call i32 (...) @czysc()
%173 = call i32 (...) @print_login()
%174 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%175 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%176 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %175)
%177 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%178 = call i32 @dofileexist(i8* %177)
store i32 %178, i32* %11
%179 = icmp ne i32 %178, 0
br i1 %179, label %180, label %183
180: ; preds = %171
%181 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%182 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str.2, i64 0, i64 0), i8* %181)
br label %186
183: ; preds = %171
%184 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%185 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.3, i64 0, i64 0), i8* %184)
br label %186
186: ; preds = %183, %180
%187 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%188 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%189 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %188)
%190 = load i32, i32* %11
%191 = icmp ne i32 %190, 0
br i1 %191, label %192, label %196
192: ; preds = %186
%193 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%194 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%195 = call i32 @register_user(i8* %193, i8* %194)
br label %289
196: ; preds = %186
%197 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%198 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%199 = call i64 @check_login_data(i8* %197, i8* %198)
%200 = icmp eq i64 %199, 0
br i1 %200, label %201, label %206
201: ; preds = %196
%202 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
%203 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%204 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%205 = call i32 @strcpy(i8* %203, i8* %204)
br label %208
206: ; preds = %196
%207 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
br label %208
208: ; preds = %206, %201
br label %209
209: ; preds = %208
%210 = call i32 (...) @czysc()
br label %211
211: ; preds = %209, %168
%212 = load i32, i32* %7
%213 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%214 = call i32 @print_welcome(i32 %212, i8* %213)
%215 = load i32, i32* %4
%216 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 0
%217 = bitcast [5 x i32]* %216 to i32**
%218 = load i32, i32* %9
%219 = load i32, i32* %10
%220 = call i32 @render(i32 %215, i32** %217, i32 %218, i32 %219)
%221 = load i32, i32* %8
%222 = icmp eq i32 %221, 1
br i1 %222, label %223, label %238
223: ; preds = %211
%224 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 0
%225 = bitcast [5 x i32]* %224 to i32**
%226 = getelementptr inbounds [25 x i32], [25 x i32]* %14, i64 0, i64 0
%227 = call i32 @gimme_hint(i32** %225, i32* %226)
%228 = getelementptr inbounds [25 x i32], [25 x i32]* %14, i64 0, i64 0
%229 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %15, i64 0, i64 0
%230 = bitcast [5 x i32]* %229 to i32**
%231 = call i32 @vec_to_arr(i32* %228, i32** %230)
%232 = load i32, i32* %4
%233 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %15, i64 0, i64 0
%234 = bitcast [5 x i32]* %233 to i32**
%235 = load i32, i32* %9
%236 = load i32, i32* %10
%237 = call i32 @render(i32 %232, i32** %234, i32 %235, i32 %236)
br label %238
238: ; preds = %223, %211
%239 = load i32, i32* %6
%240 = load i32, i32* %17
%241 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.7, i64 0, i64 0), i32 %239, i32 %240)
%242 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %2, i64 0, i64 0
%243 = bitcast [5 x i32]* %242 to i32**
%244 = call i32 @did_i_win(i32** %243)
%245 = icmp ne i32 %244, 1
br i1 %245, label %246, label %248
246: ; preds = %238
%247 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
br label %288
248: ; preds = %238
%249 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%250 = load i32, i32* %6
%251 = load i32, i32* %17
%252 = icmp ne i32 %250, %251
br i1 %252, label %253, label %266
253: ; preds = %248
%254 = load i32, i32* %6
%255 = load i32, i32* %17
%256 = icmp slt i32 %254, %255
br i1 %256, label %257, label %259
257: ; preds = %253
%258 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.10, i64 0, i64 0))
br label %259
259: ; preds = %257, %253
%260 = load i32, i32* %6
%261 = load i32, i32* %17
%262 = icmp sgt i32 %260, %261
br i1 %262, label %263, label %265
263: ; preds = %259
%264 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.11, i64 0, i64 0))
br label %265
265: ; preds = %263, %259
br label %273
266: ; preds = %248
%267 = load i32, i32* %6
%268 = load i32, i32* %17
%269 = icmp eq i32 %267, %268
br i1 %269, label %270, label %272
270: ; preds = %266
%271 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.12, i64 0, i64 0))
br label %272
272: ; preds = %270, %266
br label %273
273: ; preds = %272, %265
%274 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%275 = call i64 @is_anybody_logged_in(i8* %274)
%276 = icmp ne i64 %275, 0
br i1 %276, label %277, label %284
277: ; preds = %273
%278 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%279 = load i32, i32* %6
%280 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.13, i64 0, i64 0), i8* %278, i32 %279)
%281 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%282 = load i32, i32* %6
%283 = call i32 @push_to_hiscores(i8* %281, i32 %282)
br label %287
284: ; preds = %273
%285 = load i32, i32* %6
%286 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str.14, i64 0, i64 0), i32 %285)
br label %287
287: ; preds = %284, %277
br label %288
288: ; preds = %287, %246
br label %46
289: ; preds = %192, %156, %46
%290 = load i32, i32* %1
ret i32 %290
}

LLVM IR (-O2):
@.str = [9 x i8] c"\0ALogin: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [162 x i8] c"\0A\0AU\C5\BCytkownika nie by\C5\82o w bazie, \0Arejestruj\C4\99 u\C5\BCytkownika o loginie: %s\0AWpisz has\C5\82o jakie mam nada\C4\87 u\C5\BCytkownikowi\0APo zarejestrowaniu uruchom gr\C4\99 ponownie\0A\0A\00"
@.str.3 = [64 x i8] c"U\C5\BCytkownik %s znajduje si\C4\99 w bazie - wpisz poprawne has\C5\82o:\0A\0A\00"
@.str.4 = [9 x i8] c"\0AHaslo: \00"
@.str.7 = [74 x i8] c"\0AIlo\C5\9B\C4\87 wykonanych ruch\C3\B3w: %d, minimalna ilosc ruch\C3\B3w do wygranej: %d\0A\00"
@.str.8 = [24 x i8] c"\0AJeszcze nie wygra\C5\82e\C5\9B\00"
@.str.13 = [82 x i8] c"Zosta\C5\82e\C5\9B wpisany na list\C4\99 najwy\C5\BCszych wynik\C3\B3w jako %s z wynikiem %d punkt\C3\B3w\00"
@.str.14 = [105 x i8] c"Nie by\C5\82e\C5\9B zalogowany, tw\C3\B3j wynik to %d, jednak nie zostanie on wpisany na list\C4\99 najlepszych wynik\C3\B3w\00"
@str = [13 x i8] c"\0AWygra\C5\82e\C5\9B\0A\00"
@str.15 = [53 x i8] c"\0AWybrano dok\C5\82adnie t\C4\85 sam\C4\85 metod\C4\99 co komputer ;)\00"
@str.16 = [86 x i8] c"\0ANajszybsza metoda nie zosta\C5\82a przez Ciebie u\C5\BCyta do rozwi\C4\85zania tej \C5\82amig\C5\82\C3\B3wki\00"
@str.17 = [82 x i8] c"\0ASzczere gratulacje, komputer by\C5\82 gorszy od Ciebie w szukaniu najszybszej metody\00"
@str.18 = [24 x i8] c"Wprowadzono z\C5\82e has\C5\82o\00"
@str.19 = [33 x i8] c"Logowanie zako\C5\84czone pomy\C5\9Blnie\00"
define i32 @main() {
%1 = alloca [5 x [5 x i32]]
%2 = alloca [64 x i8]
%3 = alloca [256 x i8]
%4 = alloca [256 x i8]
%5 = alloca [25 x i32]
%6 = alloca [5 x [5 x i32]]
%7 = bitcast [5 x [5 x i32]]* %1 to i8*
%8 = bitcast [5 x [5 x i32]]* %1 to i32**
%9 = call i32 @empty(i32 5, i32** %8)
%10 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
store i8 71, i8* %10
%11 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 1
store i8 111, i8* %11
%12 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 2
store i8 -59, i8* %12
%13 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 3
store i8 -101, i8* %13
%14 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 4
store i8 -60, i8* %14
%15 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 5
store i8 -121, i8* %15
%16 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%17 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%18 = bitcast [25 x i32]* %5 to i8*
%19 = bitcast [5 x [5 x i32]]* %6 to i8*
%20 = call i32 @fill_randomly(i32 5, i32** %8)
%21 = getelementptr inbounds [25 x i32], [25 x i32]* %5, i64 0, i64 0
%22 = call i32 @gimme_hint(i32** %8, i32* %21)
%23 = call i32 @wt(i32* %21)
%24 = call i32 @print_welcome(i32 1, i8* %10)
%25 = call i32 @render(i32 5, i32** %8, i32 0, i32 0)
%26 = call i32 (...) @getch()
%27 = icmp eq i32 %26, 0
br i1 %27, label %146, label %28
28: ; preds = %0
%29 = bitcast [5 x [5 x i32]]* %6 to i32**
br label %30
30: ; preds = %28, %143
%31 = phi i32 [ %26, %28 ], [ %144, %143 ]
%32 = phi i32 [ 0, %28 ], [ %109, %143 ]
%33 = phi i32 [ 1, %28 ], [ %108, %143 ]
%34 = phi i32 [ 0, %28 ], [ %61, %143 ]
%35 = phi i32 [ 0, %28 ], [ %55, %143 ]
%36 = phi i32 [ 0, %28 ], [ %107, %143 ]
%37 = call i32 (...) @czysc()
switch i32 %31, label %42 [
i32 119, label %38
i32 65, label %38
]
38: ; preds = %30, %30
%39 = icmp sgt i32 %35, 0
%40 = add nsw i32 %35, -1
%41 = select i1 %39, i32 %40, i32 4
br label %42
42: ; preds = %30, %38
%43 = phi i32 [ %41, %38 ], [ %35, %30 ]
switch i32 %31, label %48 [
i32 97, label %44
i32 68, label %44
]
44: ; preds = %42, %42
%45 = icmp sgt i32 %34, 0
%46 = add nsw i32 %34, -1
%47 = select i1 %45, i32 %46, i32 4
br label %48
48: ; preds = %42, %44
%49 = phi i32 [ %47, %44 ], [ %34, %42 ]
switch i32 %31, label %54 [
i32 115, label %50
i32 66, label %50
]
50: ; preds = %48, %48
%51 = icmp slt i32 %43, 4
%52 = add nsw i32 %43, 1
%53 = select i1 %51, i32 %52, i32 0
br label %54
54: ; preds = %48, %50
%55 = phi i32 [ %53, %50 ], [ %43, %48 ]
switch i32 %31, label %60 [
i32 100, label %56
i32 67, label %56
]
56: ; preds = %54, %54
%57 = icmp slt i32 %49, 4
%58 = add nsw i32 %49, 1
%59 = select i1 %57, i32 %58, i32 0
br label %60
60: ; preds = %54, %56
%61 = phi i32 [ %59, %56 ], [ %49, %54 ]
switch i32 %31, label %65 [
i32 32, label %62
i32 10, label %62
]
62: ; preds = %60, %60
%63 = call i32 @flip_the_light(i32 %55, i32 %61, i32** %8, i32 5)
%64 = add nsw i32 %32, 1
br label %106
65: ; preds = %60
%66 = and i32 %31, -33
%67 = icmp eq i32 %66, 72
%68 = icmp eq i32 %33, 0
%69 = zext i1 %68 to i32
%70 = select i1 %67, i32 %69, i32 %33
%71 = icmp eq i32 %31, 98
br i1 %71, label %72, label %75
72: ; preds = %65
%73 = call i32 (...) @czysc()
%74 = call i32 (...) @print_hiscores()
br label %106
75: ; preds = %65
%76 = icmp eq i32 %66, 81
br i1 %76, label %146, label %77
77: ; preds = %75
%78 = icmp eq i32 %31, 63
%79 = icmp eq i32 %36, 0
%80 = zext i1 %79 to i32
%81 = select i1 %78, i32 %80, i32 %36
%82 = icmp eq i32 %66, 76
br i1 %82, label %83, label %106
83: ; preds = %77
%84 = call i32 (...) @czysc()
%85 = call i32 (...) @print_login()
%86 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%87 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %16)
%88 = call i32 @dofileexist(i8* %16)
%89 = icmp eq i32 %88, 0
%90 = select i1 %89, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str.2, i64 0, i64 0)
%91 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %90, i8* %16)
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%93 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %17)
br i1 %89, label %96, label %94
94: ; preds = %83
%95 = call i32 @register_user(i8* %16, i8* %17)
br label %146
96: ; preds = %83
%97 = call i64 @check_login_data(i8* %16, i8* %17)
%98 = icmp eq i64 %97, 0
br i1 %98, label %99, label %102
99: ; preds = %96
%100 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.19, i64 0, i64 0))
%101 = call i32 @strcpy(i8* %10, i8* %16)
br label %104
102: ; preds = %96
%103 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.18, i64 0, i64 0))
br label %104
104: ; preds = %99, %102
%105 = call i32 (...) @czysc()
br label %106
106: ; preds = %62, %72, %77, %104
%107 = phi i32 [ %81, %77 ], [ %81, %104 ], [ %36, %72 ], [ %36, %62 ]
%108 = phi i32 [ %70, %77 ], [ %70, %104 ], [ %70, %72 ], [ %33, %62 ]
%109 = phi i32 [ %32, %77 ], [ %32, %104 ], [ %32, %72 ], [ %64, %62 ]
%110 = call i32 @print_welcome(i32 %108, i8* %10)
%111 = call i32 @render(i32 5, i32** %8, i32 %55, i32 %61)
%112 = icmp eq i32 %107, 1
br i1 %112, label %113, label %117
113: ; preds = %106
%114 = call i32 @gimme_hint(i32** %8, i32* %21)
%115 = call i32 @vec_to_arr(i32* %21, i32** %29)
%116 = call i32 @render(i32 5, i32** %29, i32 %55, i32 %61)
br label %117
117: ; preds = %113, %106
%118 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @.str.7, i64 0, i64 0), i32 %109, i32 %23)
%119 = call i32 @did_i_win(i32** %8)
%120 = icmp eq i32 %119, 1
br i1 %120, label %123, label %121
121: ; preds = %117
%122 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
br label %143
123: ; preds = %117
%124 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%125 = icmp eq i32 %109, %23
br i1 %125, label %132, label %126
126: ; preds = %123
%127 = icmp slt i32 %109, %23
br i1 %127, label %128, label %130
128: ; preds = %126
%129 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str.17, i64 0, i64 0))
br label %130
130: ; preds = %128, %126
%131 = icmp sgt i32 %109, %23
br i1 %131, label %132, label %135
132: ; preds = %123, %130
%133 = phi i8* [ getelementptr inbounds ([86 x i8], [86 x i8]* @str.16, i64 0, i64 0), %130 ], [ getelementptr inbounds ([53 x i8], [53 x i8]* @str.15, i64 0, i64 0), %123 ]
%134 = call i32 @puts(i8* dereferenceable(1) %133)
br label %135
135: ; preds = %132, %130
%136 = call i64 @is_anybody_logged_in(i8* %10)
%137 = icmp eq i64 %136, 0
br i1 %137, label %141, label %138
138: ; preds = %135
%139 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @.str.13, i64 0, i64 0), i8* %10, i32 %109)
%140 = call i32 @push_to_hiscores(i8* %10, i32 %109)
br label %143
141: ; preds = %135
%142 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([105 x i8], [105 x i8]* @.str.14, i64 0, i64 0), i32 %109)
br label %143
143: ; preds = %138, %141, %121
%144 = call i32 (...) @getch()
%145 = icmp eq i32 %144, 0
br i1 %145, label %146, label %30
146: ; preds = %143, %75, %0, %94
ret i32 0
}