#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 */
typedef int time_t;

/* Variables and functions */
int /*<<< orphan*/ COLOR_BLACK;
int /*<<< orphan*/ COLOR_BLUE;
int /*<<< orphan*/ COLOR_GREEN;
int /*<<< orphan*/ COLOR_MAGENTA;
int /*<<< orphan*/ COLOR_PAIR(int);
int /*<<< orphan*/ COLOR_RED;
int /*<<< orphan*/ COLOR_YELLOW;
int /*<<< orphan*/ addch(char);
int /*<<< orphan*/ attroff(int /*<<< orphan*/);
int /*<<< orphan*/ attron(int /*<<< orphan*/);
int /*<<< orphan*/ clear();
int ctime(int *);
int /*<<< orphan*/ init_pair(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ move(int, int);
int /*<<< orphan*/ printw(char *, ...);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ start_color();
int time(int /*<<< orphan*/ *);
void printare_harta(int harta[][30], int level, int punctaj,
                    time_t start_time) {
  start_color();
  init_pair(1, COLOR_YELLOW, COLOR_BLACK);
  init_pair(2, COLOR_RED, COLOR_BLACK);
  init_pair(3, COLOR_BLUE, COLOR_BLACK);
  init_pair(4, COLOR_BLUE, COLOR_BLACK);
  init_pair(5, COLOR_MAGENTA, COLOR_BLACK);
  init_pair(6, COLOR_MAGENTA, COLOR_BLACK);
  init_pair(7, COLOR_GREEN, COLOR_BLACK);
  clear();
  int i, j, a = 0;
  time_t current_time;
  current_time = time(NULL);
  for (i = 3; i <= 21; i++) {
    for (j = 1; j <= 12; j++) {
      if (i == 21) {
        move(i, j);
        addch('-');
      } else if ((j == 1) || (j == 12)) {
        move(i, j);
        addch('|');
      } else if (harta[i][j] == 1) {
        move(i, j);
        attron(COLOR_PAIR(1));
        addch('@');
        attroff(COLOR_PAIR(1));
      } else if (harta[i][j] == 2) {
        move(i, j);
        attron(COLOR_PAIR(2));
        addch('@');
        attroff(COLOR_PAIR(2));
      } else if (harta[i][j] == 3) {
        move(i, j);
        attron(COLOR_PAIR(3));
        addch('@');
        attroff(COLOR_PAIR(3));
      } else if (harta[i][j] == 4) {
        move(i, j);
        attron(COLOR_PAIR(4));
        addch('@');
        attroff(COLOR_PAIR(4));
      } else if (harta[i][j] == 5) {
        move(i, j);
        attron(COLOR_PAIR(5));
        addch('@');
        attroff(COLOR_PAIR(5));
      } else if (harta[i][j] == 6) {
        move(i, j);
        attron(COLOR_PAIR(6));
        addch('@');
        attroff(COLOR_PAIR(6));
      } else if (harta[i][j] == 7) {
        move(i, j);
        attron(COLOR_PAIR(7));
        addch('@');
        attroff(COLOR_PAIR(7));
      } else {
        move(i, j);
        addch(' ');
      }
    }
  }
  a = current_time - start_time;
  move(3, 20);
  printw("Made by");
  move(4, 20);
  printw("Dimcica Tudor");
  move(5, 20);
  printw("AKA Tedy");
  move(6, 20);
  printw("311 CC");
  move(14, 20);
  printw("Timp scurs: %d secunde", a);
  move(16, 20);
  printw("Punctaj: %d", punctaj);
  move(13, 20);
  printw("%s", ctime(&current_time));
  move(15, 20);
  printw("Nivel: %d", level);
  refresh();
}


x86 assembly (clang, -O0):
<printare_harta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    $0x0,%al
call   1060 <start_color@plt>
mov    0x2de5(%rip),%rax
mov    (%rax),%esi
mov    0x2dfc(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
call   1050 <init_pair@plt>
mov    0x2db9(%rip),%rax
mov    (%rax),%esi
mov    0x2de0(%rip),%rax
mov    (%rax),%edx
mov    $0x2,%edi
call   1050 <init_pair@plt>
mov    0x2da5(%rip),%rax
mov    (%rax),%esi
mov    0x2dc4(%rip),%rax
mov    (%rax),%edx
mov    $0x3,%edi
call   1050 <init_pair@plt>
mov    0x2d89(%rip),%rax
mov    (%rax),%esi
mov    0x2da8(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%edi
call   1050 <init_pair@plt>
mov    0x2d7d(%rip),%rax
mov    (%rax),%esi
mov    0x2d8c(%rip),%rax
mov    (%rax),%edx
mov    $0x5,%edi
call   1050 <init_pair@plt>
mov    0x2d61(%rip),%rax
mov    (%rax),%esi
mov    0x2d70(%rip),%rax
mov    (%rax),%edx
mov    $0x6,%edi
call   1050 <init_pair@plt>
mov    0x2d55(%rip),%rax
mov    (%rax),%esi
mov    0x2d54(%rip),%rax
mov    (%rax),%edx
mov    $0x7,%edi
call   1050 <init_pair@plt>
mov    $0x0,%al
call   10d0 <clear@plt>
movl   $0x0,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1090 <time@plt>
mov    %eax,-0x24(%rbp)
movl   $0x3,-0x18(%rbp)
cmpl   $0x15,-0x18(%rbp)
jg     1600 <printare_harta+0x440>
movl   $0x1,-0x1c(%rbp)
cmpl   $0xc,-0x1c(%rbp)
jg     15ed <printare_harta+0x42d>
cmpl   $0x15,-0x18(%rbp)
jne    1300 <printare_harta+0x140>
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   10e0 <move@plt>
mov    $0x2d,%edi
call   10b0 <addch@plt>
jmp    15da <printare_harta+0x41a>
cmpl   $0x1,-0x1c(%rbp)
je     1314 <printare_harta+0x154>
cmpl   $0xc,-0x1c(%rbp)
jne    132e <printare_harta+0x16e>
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   10e0 <move@plt>
mov    $0x7c,%edi
call   10b0 <addch@plt>
jmp    15d5 <printare_harta+0x415>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1387 <printare_harta+0x1c7>
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   10e0 <move@plt>
mov    $0x1,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1070 <attron@plt>
mov    $0x40,%edi
call   10b0 <addch@plt>
mov    $0x1,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
jmp    15d0 <printare_harta+0x410>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
cmpl   $0x2,(%rax,%rcx,4)
jne    13e0 <printare_harta+0x220>
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   10e0 <move@plt>
mov    $0x2,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1070 <attron@plt>
mov    $0x40,%edi
call   10b0 <addch@plt>
mov    $0x2,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
jmp    15cb <printare_harta+0x40b>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
cmpl   $0x3,(%rax,%rcx,4)
jne    1439 <printare_harta+0x279>
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   10e0 <move@plt>
mov    $0x3,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1070 <attron@plt>
mov    $0x40,%edi
call   10b0 <addch@plt>
mov    $0x3,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
jmp    15c6 <printare_harta+0x406>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
cmpl   $0x4,(%rax,%rcx,4)
jne    1492 <printare_harta+0x2d2>
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   10e0 <move@plt>
mov    $0x4,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1070 <attron@plt>
mov    $0x40,%edi
call   10b0 <addch@plt>
mov    $0x4,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
jmp    15c1 <printare_harta+0x401>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
cmpl   $0x5,(%rax,%rcx,4)
jne    14eb <printare_harta+0x32b>
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   10e0 <move@plt>
mov    $0x5,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1070 <attron@plt>
mov    $0x40,%edi
call   10b0 <addch@plt>
mov    $0x5,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
jmp    15bc <printare_harta+0x3fc>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
cmpl   $0x6,(%rax,%rcx,4)
jne    1544 <printare_harta+0x384>
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   10e0 <move@plt>
mov    $0x6,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1070 <attron@plt>
mov    $0x40,%edi
call   10b0 <addch@plt>
mov    $0x6,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
jmp    15b7 <printare_harta+0x3f7>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x78,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
cmpl   $0x7,(%rax,%rcx,4)
jne    159d <printare_harta+0x3dd>
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   10e0 <move@plt>
mov    $0x7,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1070 <attron@plt>
mov    $0x40,%edi
call   10b0 <addch@plt>
mov    $0x7,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
jmp    15b2 <printare_harta+0x3f2>
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   10e0 <move@plt>
mov    $0x20,%edi
call   10b0 <addch@plt>
jmp    15b7 <printare_harta+0x3f7>
jmp    15bc <printare_harta+0x3fc>
jmp    15c1 <printare_harta+0x401>
jmp    15c6 <printare_harta+0x406>
jmp    15cb <printare_harta+0x40b>
jmp    15d0 <printare_harta+0x410>
jmp    15d5 <printare_harta+0x415>
jmp    15da <printare_harta+0x41a>
jmp    15df <printare_harta+0x41f>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12d2 <printare_harta+0x112>
jmp    15f2 <printare_harta+0x432>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    12c1 <printare_harta+0x101>
mov    -0x24(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    $0x3,%edi
mov    $0x14,%esi
call   10e0 <move@plt>
lea    0x9e1(%rip),%rdi
mov    $0x0,%al
call   1080 <printw@plt>
mov    $0x4,%edi
mov    $0x14,%esi
call   10e0 <move@plt>
lea    0x9cc(%rip),%rdi
mov    $0x0,%al
call   1080 <printw@plt>
mov    $0x5,%edi
mov    $0x14,%esi
call   10e0 <move@plt>
lea    0x9bd(%rip),%rdi
mov    $0x0,%al
call   1080 <printw@plt>
mov    $0x6,%edi
mov    $0x14,%esi
call   10e0 <move@plt>
lea    0x9a9(%rip),%rdi
mov    $0x0,%al
call   1080 <printw@plt>
mov    $0xe,%edi
mov    $0x14,%esi
call   10e0 <move@plt>
mov    -0x20(%rbp),%esi
lea    0x990(%rip),%rdi
mov    $0x0,%al
call   1080 <printw@plt>
mov    $0x10,%edi
mov    $0x14,%esi
call   10e0 <move@plt>
mov    -0x10(%rbp),%esi
lea    0x987(%rip),%rdi
mov    $0x0,%al
call   1080 <printw@plt>
mov    $0xd,%edi
mov    $0x14,%esi
call   10e0 <move@plt>
lea    -0x24(%rbp),%rdi
call   1040 <ctime@plt>
mov    %eax,%esi
lea    0x96b(%rip),%rdi
mov    $0x0,%al
call   1080 <printw@plt>
mov    $0xf,%edi
mov    $0x14,%esi
call   10e0 <move@plt>
mov    -0xc(%rbp),%esi
lea    0x94e(%rip),%rdi
mov    $0x0,%al
call   1080 <printw@plt>
mov    $0x0,%al
call   10c0 <refresh@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printare_harta>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %ecx,%r12d
mov    %edx,0xc(%rsp)
mov    %esi,0x10(%rsp)
mov    %rdi,%rbp
xor    %eax,%eax
call   1060 <start_color@plt>
mov    0x2dde(%rip),%rax
mov    (%rax),%esi
mov    0x2df5(%rip),%rbx
mov    (%rbx),%edx
mov    $0x1,%edi
call   1050 <init_pair@plt>
mov    0x2db2(%rip),%rax
mov    (%rax),%esi
mov    (%rbx),%edx
mov    $0x2,%edi
call   1050 <init_pair@plt>
mov    0x2da5(%rip),%r14
mov    (%r14),%esi
mov    (%rbx),%edx
mov    $0x3,%edi
call   1050 <init_pair@plt>
mov    (%r14),%esi
mov    (%rbx),%edx
mov    $0x4,%edi
call   1050 <init_pair@plt>
mov    0x2d90(%rip),%r14
mov    (%r14),%esi
mov    (%rbx),%edx
mov    $0x5,%edi
call   1050 <init_pair@plt>
mov    (%r14),%esi
mov    (%rbx),%edx
mov    $0x6,%edi
call   1050 <init_pair@plt>
mov    0x2d7b(%rip),%rax
mov    (%rax),%esi
mov    (%rbx),%edx
mov    $0x7,%edi
call   1050 <init_pair@plt>
xor    %eax,%eax
call   10d0 <clear@plt>
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,%r13d
mov    %eax,0x14(%rsp)
add    $0x16c,%rbp
mov    $0x3,%ebx
lea    0xd65(%rip),%r15
jmp    12b2 <printare_harta+0xf2>
nopl   (%rax)
add    $0x1,%rbx
add    $0x78,%rbp
cmp    $0x16,%rbx
je     1489 <printare_harta+0x2c9>
xor    %r14d,%r14d
jmp    12dd <printare_harta+0x11d>
nopw   0x0(%rax,%rax,1)
mov    $0x15,%edi
mov    %r14d,%esi
call   10e0 <move@plt>
mov    $0x2d,%edi
call   10b0 <addch@plt>
cmp    $0xc,%r14
je     12a0 <printare_harta+0xe0>
mov    %r14,%rax
add    $0x1,%r14
cmp    $0x15,%rbx
je     12c0 <printare_harta+0x100>
cmp    $0xc,%r14d
je     12f6 <printare_harta+0x136>
cmp    $0x1,%r14d
jne    1307 <printare_harta+0x147>
mov    %ebx,%edi
mov    %r14d,%esi
call   10e0 <move@plt>
mov    $0x7c,%edi
jmp    12d2 <printare_harta+0x112>
mov    0x0(%rbp,%rax,4),%eax
add    $0xffffffff,%eax
cmp    $0x6,%eax
ja     134b <printare_harta+0x18b>
movslq (%r15,%rax,4),%rax
add    %r15,%rax
jmp    *%rax
mov    %ebx,%edi
mov    %r14d,%esi
call   10e0 <move@plt>
mov    $0x1,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1070 <attron@plt>
mov    $0x40,%edi
call   10b0 <addch@plt>
mov    $0x1,%edi
jmp    146e <printare_harta+0x2ae>
mov    %ebx,%edi
mov    %r14d,%esi
call   10e0 <move@plt>
mov    $0x20,%edi
jmp    12d2 <printare_harta+0x112>
mov    %ebx,%edi
mov    %r14d,%esi
call   10e0 <move@plt>
mov    $0x2,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1070 <attron@plt>
mov    $0x40,%edi
call   10b0 <addch@plt>
mov    $0x2,%edi
jmp    146e <printare_harta+0x2ae>
mov    %ebx,%edi
mov    %r14d,%esi
call   10e0 <move@plt>
mov    $0x3,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1070 <attron@plt>
mov    $0x40,%edi
call   10b0 <addch@plt>
mov    $0x3,%edi
jmp    146e <printare_harta+0x2ae>
mov    %ebx,%edi
mov    %r14d,%esi
call   10e0 <move@plt>
mov    $0x4,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1070 <attron@plt>
mov    $0x40,%edi
call   10b0 <addch@plt>
mov    $0x4,%edi
jmp    146e <printare_harta+0x2ae>
mov    %ebx,%edi
mov    %r14d,%esi
call   10e0 <move@plt>
mov    $0x5,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1070 <attron@plt>
mov    $0x40,%edi
call   10b0 <addch@plt>
mov    $0x5,%edi
jmp    146e <printare_harta+0x2ae>
mov    %ebx,%edi
mov    %r14d,%esi
call   10e0 <move@plt>
mov    $0x6,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1070 <attron@plt>
mov    $0x40,%edi
call   10b0 <addch@plt>
mov    $0x6,%edi
jmp    146e <printare_harta+0x2ae>
mov    %ebx,%edi
mov    %r14d,%esi
call   10e0 <move@plt>
mov    $0x7,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1070 <attron@plt>
mov    $0x40,%edi
call   10b0 <addch@plt>
mov    $0x7,%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
cmp    $0xc,%r14
jne    12dd <printare_harta+0x11d>
jmp    12a0 <printare_harta+0xe0>
sub    %r12d,%r13d
mov    $0x3,%edi
mov    $0x14,%esi
call   10e0 <move@plt>
lea    0xb7a(%rip),%rdi
xor    %eax,%eax
call   1080 <printw@plt>
mov    $0x4,%edi
mov    $0x14,%esi
call   10e0 <move@plt>
lea    0xb65(%rip),%rdi
xor    %eax,%eax
call   1080 <printw@plt>
mov    $0x5,%edi
mov    $0x14,%esi
call   10e0 <move@plt>
lea    0xb56(%rip),%rdi
xor    %eax,%eax
call   1080 <printw@plt>
mov    $0x6,%edi
mov    $0x14,%esi
call   10e0 <move@plt>
lea    0xb42(%rip),%rdi
xor    %eax,%eax
call   1080 <printw@plt>
mov    $0xe,%edi
mov    $0x14,%esi
call   10e0 <move@plt>
lea    0xb2c(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1080 <printw@plt>
mov    $0x10,%edi
mov    $0x14,%esi
call   10e0 <move@plt>
lea    0xb23(%rip),%rdi
mov    0xc(%rsp),%esi
xor    %eax,%eax
call   1080 <printw@plt>
mov    $0xd,%edi
mov    $0x14,%esi
call   10e0 <move@plt>
lea    0x14(%rsp),%rdi
call   1040 <ctime@plt>
lea    0xb04(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1080 <printw@plt>
mov    $0xf,%edi
mov    $0x14,%esi
call   10e0 <move@plt>
lea    0xae8(%rip),%rdi
mov    0x10(%rsp),%esi
xor    %eax,%eax
call   1080 <printw@plt>
xor    %eax,%eax
call   10c0 <refresh@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@COLOR_YELLOW = global i32 0
@COLOR_BLACK = global i32 0
@COLOR_RED = global i32 0
@COLOR_BLUE = global i32 0
@COLOR_MAGENTA = global i32 0
@COLOR_GREEN = global i32 0
@.str = [8 x i8] c"Made by\00"
@.str.1 = [14 x i8] c"Dimcica Tudor\00"
@.str.2 = [9 x i8] c"AKA Tedy\00"
@.str.3 = [7 x i8] c"311 CC\00"
@.str.4 = [23 x i8] c"Timp scurs: %d secunde\00"
@.str.5 = [12 x i8] c"Punctaj: %d\00"
@.str.6 = [3 x i8] c"%s\00"
@.str.7 = [10 x i8] c"Nivel: %d\00"
define void @printare_harta([30 x i32]* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca [30 x i32]*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store [30 x i32]* %0, [30 x i32]** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%13 = call i32 (...) @start_color()
%14 = load i32, i32* @COLOR_YELLOW
%15 = load i32, i32* @COLOR_BLACK
%16 = call i32 @init_pair(i32 1, i32 %14, i32 %15)
%17 = load i32, i32* @COLOR_RED
%18 = load i32, i32* @COLOR_BLACK
%19 = call i32 @init_pair(i32 2, i32 %17, i32 %18)
%20 = load i32, i32* @COLOR_BLUE
%21 = load i32, i32* @COLOR_BLACK
%22 = call i32 @init_pair(i32 3, i32 %20, i32 %21)
%23 = load i32, i32* @COLOR_BLUE
%24 = load i32, i32* @COLOR_BLACK
%25 = call i32 @init_pair(i32 4, i32 %23, i32 %24)
%26 = load i32, i32* @COLOR_MAGENTA
%27 = load i32, i32* @COLOR_BLACK
%28 = call i32 @init_pair(i32 5, i32 %26, i32 %27)
%29 = load i32, i32* @COLOR_MAGENTA
%30 = load i32, i32* @COLOR_BLACK
%31 = call i32 @init_pair(i32 6, i32 %29, i32 %30)
%32 = load i32, i32* @COLOR_GREEN
%33 = load i32, i32* @COLOR_BLACK
%34 = call i32 @init_pair(i32 7, i32 %32, i32 %33)
%35 = call i32 (...) @clear()
store i32 0, i32* %11
%36 = call i32 @time(i32* null)
store i32 %36, i32* %12
store i32 3, i32* %9
br label %37
37: ; preds = %214, %4
%38 = load i32, i32* %9
%39 = icmp sle i32 %38, 21
br i1 %39, label %40, label %217
40: ; preds = %37
store i32 1, i32* %10
br label %41
41: ; preds = %210, %40
%42 = load i32, i32* %10
%43 = icmp sle i32 %42, 12
br i1 %43, label %44, label %213
44: ; preds = %41
%45 = load i32, i32* %9
%46 = icmp eq i32 %45, 21
br i1 %46, label %47, label %52
47: ; preds = %44
%48 = load i32, i32* %9
%49 = load i32, i32* %10
%50 = call i32 @move(i32 %48, i32 %49)
%51 = call i32 @addch(i8 signext 45)
br label %209
52: ; preds = %44
%53 = load i32, i32* %10
%54 = icmp eq i32 %53, 1
br i1 %54, label %58, label %55
55: ; preds = %52
%56 = load i32, i32* %10
%57 = icmp eq i32 %56, 12
br i1 %57, label %58, label %63
58: ; preds = %55, %52
%59 = load i32, i32* %9
%60 = load i32, i32* %10
%61 = call i32 @move(i32 %59, i32 %60)
%62 = call i32 @addch(i8 signext 124)
br label %208
63: ; preds = %55
%64 = load [30 x i32]*, [30 x i32]** %5
%65 = load i32, i32* %9
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [30 x i32], [30 x i32]* %64, i64 %66
%68 = load i32, i32* %10
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [30 x i32], [30 x i32]* %67, i64 0, i64 %69
%71 = load i32, i32* %70
%72 = icmp eq i32 %71, 1
br i1 %72, label %73, label %82
73: ; preds = %63
%74 = load i32, i32* %9
%75 = load i32, i32* %10
%76 = call i32 @move(i32 %74, i32 %75)
%77 = call i32 @COLOR_PAIR(i32 1)
%78 = call i32 @attron(i32 %77)
%79 = call i32 @addch(i8 signext 64)
%80 = call i32 @COLOR_PAIR(i32 1)
%81 = call i32 @attroff(i32 %80)
br label %207
82: ; preds = %63
%83 = load [30 x i32]*, [30 x i32]** %5
%84 = load i32, i32* %9
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [30 x i32], [30 x i32]* %83, i64 %85
%87 = load i32, i32* %10
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [30 x i32], [30 x i32]* %86, i64 0, i64 %88
%90 = load i32, i32* %89
%91 = icmp eq i32 %90, 2
br i1 %91, label %92, label %101
92: ; preds = %82
%93 = load i32, i32* %9
%94 = load i32, i32* %10
%95 = call i32 @move(i32 %93, i32 %94)
%96 = call i32 @COLOR_PAIR(i32 2)
%97 = call i32 @attron(i32 %96)
%98 = call i32 @addch(i8 signext 64)
%99 = call i32 @COLOR_PAIR(i32 2)
%100 = call i32 @attroff(i32 %99)
br label %206
101: ; preds = %82
%102 = load [30 x i32]*, [30 x i32]** %5
%103 = load i32, i32* %9
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds [30 x i32], [30 x i32]* %102, i64 %104
%106 = load i32, i32* %10
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds [30 x i32], [30 x i32]* %105, i64 0, i64 %107
%109 = load i32, i32* %108
%110 = icmp eq i32 %109, 3
br i1 %110, label %111, label %120
111: ; preds = %101
%112 = load i32, i32* %9
%113 = load i32, i32* %10
%114 = call i32 @move(i32 %112, i32 %113)
%115 = call i32 @COLOR_PAIR(i32 3)
%116 = call i32 @attron(i32 %115)
%117 = call i32 @addch(i8 signext 64)
%118 = call i32 @COLOR_PAIR(i32 3)
%119 = call i32 @attroff(i32 %118)
br label %205
120: ; preds = %101
%121 = load [30 x i32]*, [30 x i32]** %5
%122 = load i32, i32* %9
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds [30 x i32], [30 x i32]* %121, i64 %123
%125 = load i32, i32* %10
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds [30 x i32], [30 x i32]* %124, i64 0, i64 %126
%128 = load i32, i32* %127
%129 = icmp eq i32 %128, 4
br i1 %129, label %130, label %139
130: ; preds = %120
%131 = load i32, i32* %9
%132 = load i32, i32* %10
%133 = call i32 @move(i32 %131, i32 %132)
%134 = call i32 @COLOR_PAIR(i32 4)
%135 = call i32 @attron(i32 %134)
%136 = call i32 @addch(i8 signext 64)
%137 = call i32 @COLOR_PAIR(i32 4)
%138 = call i32 @attroff(i32 %137)
br label %204
139: ; preds = %120
%140 = load [30 x i32]*, [30 x i32]** %5
%141 = load i32, i32* %9
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds [30 x i32], [30 x i32]* %140, i64 %142
%144 = load i32, i32* %10
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds [30 x i32], [30 x i32]* %143, i64 0, i64 %145
%147 = load i32, i32* %146
%148 = icmp eq i32 %147, 5
br i1 %148, label %149, label %158
149: ; preds = %139
%150 = load i32, i32* %9
%151 = load i32, i32* %10
%152 = call i32 @move(i32 %150, i32 %151)
%153 = call i32 @COLOR_PAIR(i32 5)
%154 = call i32 @attron(i32 %153)
%155 = call i32 @addch(i8 signext 64)
%156 = call i32 @COLOR_PAIR(i32 5)
%157 = call i32 @attroff(i32 %156)
br label %203
158: ; preds = %139
%159 = load [30 x i32]*, [30 x i32]** %5
%160 = load i32, i32* %9
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds [30 x i32], [30 x i32]* %159, i64 %161
%163 = load i32, i32* %10
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds [30 x i32], [30 x i32]* %162, i64 0, i64 %164
%166 = load i32, i32* %165
%167 = icmp eq i32 %166, 6
br i1 %167, label %168, label %177
168: ; preds = %158
%169 = load i32, i32* %9
%170 = load i32, i32* %10
%171 = call i32 @move(i32 %169, i32 %170)
%172 = call i32 @COLOR_PAIR(i32 6)
%173 = call i32 @attron(i32 %172)
%174 = call i32 @addch(i8 signext 64)
%175 = call i32 @COLOR_PAIR(i32 6)
%176 = call i32 @attroff(i32 %175)
br label %202
177: ; preds = %158
%178 = load [30 x i32]*, [30 x i32]** %5
%179 = load i32, i32* %9
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds [30 x i32], [30 x i32]* %178, i64 %180
%182 = load i32, i32* %10
%183 = sext i32 %182 to i64
%184 = getelementptr inbounds [30 x i32], [30 x i32]* %181, i64 0, i64 %183
%185 = load i32, i32* %184
%186 = icmp eq i32 %185, 7
br i1 %186, label %187, label %196
187: ; preds = %177
%188 = load i32, i32* %9
%189 = load i32, i32* %10
%190 = call i32 @move(i32 %188, i32 %189)
%191 = call i32 @COLOR_PAIR(i32 7)
%192 = call i32 @attron(i32 %191)
%193 = call i32 @addch(i8 signext 64)
%194 = call i32 @COLOR_PAIR(i32 7)
%195 = call i32 @attroff(i32 %194)
br label %201
196: ; preds = %177
%197 = load i32, i32* %9
%198 = load i32, i32* %10
%199 = call i32 @move(i32 %197, i32 %198)
%200 = call i32 @addch(i8 signext 32)
br label %201
201: ; preds = %196, %187
br label %202
202: ; preds = %201, %168
br label %203
203: ; preds = %202, %149
br label %204
204: ; preds = %203, %130
br label %205
205: ; preds = %204, %111
br label %206
206: ; preds = %205, %92
br label %207
207: ; preds = %206, %73
br label %208
208: ; preds = %207, %58
br label %209
209: ; preds = %208, %47
br label %210
210: ; preds = %209
%211 = load i32, i32* %10
%212 = add nsw i32 %211, 1
store i32 %212, i32* %10
br label %41
213: ; preds = %41
br label %214
214: ; preds = %213
%215 = load i32, i32* %9
%216 = add nsw i32 %215, 1
store i32 %216, i32* %9
br label %37
217: ; preds = %37
%218 = load i32, i32* %12
%219 = load i32, i32* %8
%220 = sub nsw i32 %218, %219
store i32 %220, i32* %11
%221 = call i32 @move(i32 3, i32 20)
%222 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%223 = call i32 @move(i32 4, i32 20)
%224 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%225 = call i32 @move(i32 5, i32 20)
%226 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%227 = call i32 @move(i32 6, i32 20)
%228 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%229 = call i32 @move(i32 14, i32 20)
%230 = load i32, i32* %11
%231 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %230)
%232 = call i32 @move(i32 16, i32 20)
%233 = load i32, i32* %7
%234 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %233)
%235 = call i32 @move(i32 13, i32 20)
%236 = call i32 @ctime(i32* %12)
%237 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %236)
%238 = call i32 @move(i32 15, i32 20)
%239 = load i32, i32* %6
%240 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 %239)
%241 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@COLOR_YELLOW = global i32 0
@COLOR_BLACK = global i32 0
@COLOR_RED = global i32 0
@COLOR_BLUE = global i32 0
@COLOR_MAGENTA = global i32 0
@COLOR_GREEN = global i32 0
@.str = [8 x i8] c"Made by\00"
@.str.1 = [14 x i8] c"Dimcica Tudor\00"
@.str.2 = [9 x i8] c"AKA Tedy\00"
@.str.3 = [7 x i8] c"311 CC\00"
@.str.4 = [23 x i8] c"Timp scurs: %d secunde\00"
@.str.5 = [12 x i8] c"Punctaj: %d\00"
@.str.6 = [3 x i8] c"%s\00"
@.str.7 = [10 x i8] c"Nivel: %d\00"
define void @printare_harta([30 x i32]* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = tail call i32 (...) @start_color()
%7 = load i32, i32* @COLOR_YELLOW
%8 = load i32, i32* @COLOR_BLACK
%9 = tail call i32 @init_pair(i32 1, i32 %7, i32 %8)
%10 = load i32, i32* @COLOR_RED
%11 = load i32, i32* @COLOR_BLACK
%12 = tail call i32 @init_pair(i32 2, i32 %10, i32 %11)
%13 = load i32, i32* @COLOR_BLUE
%14 = load i32, i32* @COLOR_BLACK
%15 = tail call i32 @init_pair(i32 3, i32 %13, i32 %14)
%16 = load i32, i32* @COLOR_BLUE
%17 = load i32, i32* @COLOR_BLACK
%18 = tail call i32 @init_pair(i32 4, i32 %16, i32 %17)
%19 = load i32, i32* @COLOR_MAGENTA
%20 = load i32, i32* @COLOR_BLACK
%21 = tail call i32 @init_pair(i32 5, i32 %19, i32 %20)
%22 = load i32, i32* @COLOR_MAGENTA
%23 = load i32, i32* @COLOR_BLACK
%24 = tail call i32 @init_pair(i32 6, i32 %22, i32 %23)
%25 = load i32, i32* @COLOR_GREEN
%26 = load i32, i32* @COLOR_BLACK
%27 = tail call i32 @init_pair(i32 7, i32 %25, i32 %26)
%28 = tail call i32 (...) @clear()
%29 = bitcast i32* %5 to i8*
%30 = tail call i32 @time(i32* null)
store i32 %30, i32* %5
br label %31
31: ; preds = %4, %111
%32 = phi i64 [ 3, %4 ], [ %112, %111 ]
%33 = icmp eq i64 %32, 21
%34 = trunc i64 %32 to i32
%35 = trunc i64 %32 to i32
%36 = trunc i64 %32 to i32
%37 = trunc i64 %32 to i32
%38 = trunc i64 %32 to i32
%39 = trunc i64 %32 to i32
%40 = trunc i64 %32 to i32
%41 = trunc i64 %32 to i32
%42 = trunc i64 %32 to i32
br label %43
43: ; preds = %31, %108
%44 = phi i64 [ 1, %31 ], [ %109, %108 ]
%45 = trunc i64 %44 to i32
br i1 %33, label %46, label %49
46: ; preds = %43
%47 = tail call i32 @move(i32 21, i32 %45)
%48 = tail call i32 @addch(i8 signext 45)
br label %108
49: ; preds = %43
switch i32 %45, label %53 [
i32 12, label %50
i32 1, label %50
]
50: ; preds = %49, %49
%51 = tail call i32 @move(i32 %34, i32 %45)
%52 = tail call i32 @addch(i8 signext 124)
br label %108
53: ; preds = %49
%54 = getelementptr inbounds [30 x i32], [30 x i32]* %0, i64 %32, i64 %44
%55 = load i32, i32* %54
switch i32 %55, label %105 [
i32 1, label %56
i32 2, label %63
i32 3, label %70
i32 4, label %77
i32 5, label %84
i32 6, label %91
i32 7, label %98
]
56: ; preds = %53
%57 = tail call i32 @move(i32 %41, i32 %45)
%58 = tail call i32 @COLOR_PAIR(i32 1)
%59 = tail call i32 @attron(i32 %58)
%60 = tail call i32 @addch(i8 signext 64)
%61 = tail call i32 @COLOR_PAIR(i32 1)
%62 = tail call i32 @attroff(i32 %61)
br label %108
63: ; preds = %53
%64 = tail call i32 @move(i32 %40, i32 %45)
%65 = tail call i32 @COLOR_PAIR(i32 2)
%66 = tail call i32 @attron(i32 %65)
%67 = tail call i32 @addch(i8 signext 64)
%68 = tail call i32 @COLOR_PAIR(i32 2)
%69 = tail call i32 @attroff(i32 %68)
br label %108
70: ; preds = %53
%71 = tail call i32 @move(i32 %39, i32 %45)
%72 = tail call i32 @COLOR_PAIR(i32 3)
%73 = tail call i32 @attron(i32 %72)
%74 = tail call i32 @addch(i8 signext 64)
%75 = tail call i32 @COLOR_PAIR(i32 3)
%76 = tail call i32 @attroff(i32 %75)
br label %108
77: ; preds = %53
%78 = tail call i32 @move(i32 %38, i32 %45)
%79 = tail call i32 @COLOR_PAIR(i32 4)
%80 = tail call i32 @attron(i32 %79)
%81 = tail call i32 @addch(i8 signext 64)
%82 = tail call i32 @COLOR_PAIR(i32 4)
%83 = tail call i32 @attroff(i32 %82)
br label %108
84: ; preds = %53
%85 = tail call i32 @move(i32 %37, i32 %45)
%86 = tail call i32 @COLOR_PAIR(i32 5)
%87 = tail call i32 @attron(i32 %86)
%88 = tail call i32 @addch(i8 signext 64)
%89 = tail call i32 @COLOR_PAIR(i32 5)
%90 = tail call i32 @attroff(i32 %89)
br label %108
91: ; preds = %53
%92 = tail call i32 @move(i32 %36, i32 %45)
%93 = tail call i32 @COLOR_PAIR(i32 6)
%94 = tail call i32 @attron(i32 %93)
%95 = tail call i32 @addch(i8 signext 64)
%96 = tail call i32 @COLOR_PAIR(i32 6)
%97 = tail call i32 @attroff(i32 %96)
br label %108
98: ; preds = %53
%99 = tail call i32 @move(i32 %35, i32 %45)
%100 = tail call i32 @COLOR_PAIR(i32 7)
%101 = tail call i32 @attron(i32 %100)
%102 = tail call i32 @addch(i8 signext 64)
%103 = tail call i32 @COLOR_PAIR(i32 7)
%104 = tail call i32 @attroff(i32 %103)
br label %108
105: ; preds = %53
%106 = tail call i32 @move(i32 %42, i32 %45)
%107 = tail call i32 @addch(i8 signext 32)
br label %108
108: ; preds = %46, %56, %70, %84, %98, %105, %91, %77, %63, %50
%109 = add nuw nsw i64 %44, 1
%110 = icmp eq i64 %109, 13
br i1 %110, label %111, label %43
111: ; preds = %108
%112 = add nuw nsw i64 %32, 1
%113 = icmp eq i64 %112, 22
br i1 %113, label %114, label %31
114: ; preds = %111
%115 = sub nsw i32 %30, %3
%116 = tail call i32 @move(i32 3, i32 20)
%117 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%118 = tail call i32 @move(i32 4, i32 20)
%119 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%120 = tail call i32 @move(i32 5, i32 20)
%121 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%122 = tail call i32 @move(i32 6, i32 20)
%123 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%124 = tail call i32 @move(i32 14, i32 20)
%125 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %115)
%126 = tail call i32 @move(i32 16, i32 20)
%127 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 %2)
%128 = tail call i32 @move(i32 13, i32 20)
%129 = call i32 @ctime(i32* %5)
%130 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %129)
%131 = call i32 @move(i32 15, i32 20)
%132 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 %1)
%133 = call i32 (...) @refresh()
ret void
}