int main(int argc, char *argv[]) {
  int field[4][3] = {0}, mask[4][3] = {0};
  int state = 0, quit = 0, row, col, value, lifes, first_row = 0, first_col = 0,
      second_row = 0, second_col = 0;
  do {
    switch (state) {
    case 0: {
      value = 4 * 3 / 2;
      lifes = 5;
      for (int i = 1; i <= value; i++) {
        for (int j = 0; j < 2; j++)
          do {
            row = rand() % 4;
            col = rand() % 3;
            if (field[row][col] == 0) {
              field[row][col] = i;
              break;
            }
          } while (1);
      }
      for (row = 0; row < 4; row++)
        for (col = 0; col < 3; col++)
          mask[row][col] = 0;
    }
      first_row = 0, first_col = 0, second_row = 0, second_col = 0;
      state = 1;
      break;
    case 1:
      system("cls");
      for (int i = 1; i <= 3; i++)
        printf("\t%d", i);
      printf("\n---------------------------------- lifes = %4d | left value = "
             "%4d \n",
             lifes, value);
      for (row = 1; row <= 4; row++) {
        printf("%d\t", row);
        for (col = 1; col <= 3; col++) {
          if (mask[row - 1][col - 1] != 0)
            printf("%d\t", field[row - 1][col - 1]);
          else
            printf("*\t");
        }
        printf("\n");
      }
      printf("ÊäÈëÃüÁî(q:ÍË³ö, o:´ò¿ª¸Ç×Ó):");
      int sel = getchar();
      while (getchar() != '\n')
        ;
      switch (sel) {
      case 'q':
      case 'Q':
        quit = 1;
        break;
      case 'o':
      case 'O': {
        do {
          printf("ÊäÈë´ò¿ª¸Ç×ÓµÄµ¥Ôª: row,col:");
          scanf("%d,%d", &row, &col);
          while (getchar() != '\n')
            ;
          if (row > 0 && row <= 4 && col > 0 && col <= 3) {
            if (field[row - 1][col - 1] > 0) {
              first_row = row;
              first_col = col;
              system("cls");
              for (int i = 1; i <= 3; i++)
                printf("\t%d", i);
              printf("\n---------------------------------- lifes = %4d | left "
                     "value = %4d \n",
                     lifes, value);
              for (row = 1; row <= 4; row++) {
                printf("%d\t", row);
                for (col = 1; col <= 3; col++) {
                  if (mask[row - 1][col - 1] != 0 ||
                      (row == first_row && col == first_col))
                    printf("%d\t", field[row - 1][col - 1]);
                  else
                    printf("*\t");
                }
                printf("\n");
              }
              break;
            } else {
              printf("ÒÑ´ò¿ª»òÒÑÏû³ý¡£\n");
            }
          } else {
            printf("ÐÐ¡¢ÁÐ×ø±ê´íÎó¡£\n", 4, 3);
          }
        } while (1);
        state = 2;
      } break;
      }
      break;
    case 2: {
      do {
        printf("ÇëÊäÈëµÚ¶þ¸öµ¥ÔªµÄÐÐ¡¢ÁÐ×ø±ê: row,col:");
        scanf("%d,%d", &row, &col);
        while (getchar() != '\n')
          ;
        if (row > 0 && row <= 4 && col > 0 && col <= 3) {
          if ((field[row - 1][col - 1] > 0) &&
              (row != first_row || col != first_col)) {
            second_row = row;
            second_col = col;
            for (int i = 1; i <= 3; i++)
              printf("\t%d", i);
            printf("\n---------------------------------- lifes = %4d | left "
                   "value = %4d \n",
                   lifes, value);
            for (row = 1; row <= 4; row++) {
              printf("%d\t", row);
              for (col = 1; col <= 3; col++) {
                if ((mask[row - 1][col - 1] != 0) ||
                    (row == first_row && col == first_col) ||
                    (row == second_row && col == second_col))
                  printf("%d\t", field[row - 1][col - 1]);
                else
                  printf("*\t");
              }
              printf("\n");
            }
            if (field[first_row - 1][first_col - 1] ==
                field[second_row - 1][second_col - 1]) {
              printf("ÒÑÏû³ý¡£ °´ <enter> ¼ÌÐø¡£ \n");
              while (getchar() != '\n')
                ;
              field[first_row - 1][first_col - 1] = 0;
              mask[first_row - 1][first_col - 1] = 1;
              field[second_row - 1][second_col - 1] = 0;
              mask[second_row - 1][second_col - 1] = 1;
              value--;
              state = (value == 0) ? 3 : 1;
            } else {
              printf("Ïû³ýÊ§°Ü¡£\n");
              printf("°´ <enter> ¼ÌÐø¡£ \n");
              while (getchar() != '\n')
                ;
              lifes--;
              state = (lifes == 0) ? 4 : 1;
            }
            break;
          } else {
            printf("ÒÑ´ò¿ª»òÒÑÏû³ý¡£\n");
          }
        } else {
          printf("ÐÐ¡¢ÁÐ×ø±êÊäÈë´íÎó¡£\n", 4, 3);
        }
      } while (1);
    } break;
    case 3:
      system("cls");
      printf("YOU WIN!!!!!\n");
      printf("ÖØÍæÂð?(y/n)");
      sel = getchar();
      while (getchar() != '\n')
        ;
      switch (sel) {
      case 'y':
      case 'Y':
        state = 0;
        break;
      default:
        quit = 1;
        break;
      }
      break;
    case 4:
      system("cls");
      printf("YOU LOSE!!!!!\n");
      printf("ÖØÍæÂð?(y/n)");
      sel = getchar();
      while (getchar() != '\n')
        ;
      switch (sel) {
      case 'y':
      case 'Y':
        state = 0;
        break;
      default:
        quit = 1;
        break;
      }
      break;
    }
  } while (quit == 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1050 <memset@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1050 <memset@plt>
movl   $0x0,-0x74(%rbp)
movl   $0x0,-0x78(%rbp)
movl   $0x0,-0x8c(%rbp)
movl   $0x0,-0x90(%rbp)
movl   $0x0,-0x94(%rbp)
movl   $0x0,-0x98(%rbp)
mov    -0x74(%rbp),%eax
mov    %rax,-0xb8(%rbp)
sub    $0x4,%rax
ja     1c5a <main+0xafa>
mov    -0xb8(%rbp),%rax
lea    0xe0f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x6,-0x84(%rbp)
movl   $0x5,-0x88(%rbp)
movl   $0x1,-0x9c(%rbp)
mov    -0x9c(%rbp),%eax
cmp    -0x84(%rbp),%eax
jg     12ee <main+0x18e>
movl   $0x0,-0xa0(%rbp)
cmpl   $0x2,-0xa0(%rbp)
jge    12d5 <main+0x175>
jmp    1246 <main+0xe6>
mov    $0x0,%al
call   1080 <rand@plt>
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %edx,-0x7c(%rbp)
mov    $0x0,%al
call   1080 <rand@plt>
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,-0x80(%rbp)
movslq -0x7c(%rbp),%rcx
lea    -0x40(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x80(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    12a8 <main+0x148>
mov    -0x9c(%rbp),%edx
movslq -0x7c(%rbp),%rcx
lea    -0x40(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x80(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    12bc <main+0x15c>
jmp    12ad <main+0x14d>
mov    $0x1,%al
test   $0x1,%al
jne    1246 <main+0xe6>
jmp    12bc <main+0x15c>
jmp    12c1 <main+0x161>
mov    -0xa0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa0(%rbp)
jmp    1234 <main+0xd4>
jmp    12da <main+0x17a>
mov    -0x9c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c(%rbp)
jmp    1218 <main+0xb8>
movl   $0x0,-0x7c(%rbp)
cmpl   $0x4,-0x7c(%rbp)
jge    134b <main+0x1eb>
movl   $0x0,-0x80(%rbp)
cmpl   $0x3,-0x80(%rbp)
jge    1338 <main+0x1d8>
movslq -0x7c(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq -0x80(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    1306 <main+0x1a6>
jmp    133d <main+0x1dd>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    12f5 <main+0x195>
movl   $0x0,-0x8c(%rbp)
movl   $0x0,-0x90(%rbp)
movl   $0x0,-0x94(%rbp)
movl   $0x0,-0x98(%rbp)
movl   $0x1,-0x74(%rbp)
jmp    1c5a <main+0xafa>
lea    0xd1a(%rip),%rdi
mov    $0x0,%al
call   1030 <system@plt>
movl   $0x1,-0xa4(%rbp)
cmpl   $0x3,-0xa4(%rbp)
jg     13cc <main+0x26c>
mov    -0xa4(%rbp),%esi
lea    0xcf3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    1397 <main+0x237>
mov    -0x88(%rbp),%esi
mov    -0x84(%rbp),%edx
lea    0xcc9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x7c(%rbp)
cmpl   $0x4,-0x7c(%rbp)
jg     14b0 <main+0x350>
mov    -0x7c(%rbp),%esi
lea    0xcec(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x80(%rbp)
cmpl   $0x3,-0x80(%rbp)
jg     1494 <main+0x334>
mov    -0x7c(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0x70(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x80(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1473 <main+0x313>
mov    -0x7c(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0x40(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x80(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xc86(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1481 <main+0x321>
lea    0xc77(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1486 <main+0x326>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    140f <main+0x2af>
lea    0xc50(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    13ed <main+0x28d>
lea    0xc3d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    %eax,-0xa8(%rbp)
mov    $0x0,%al
call   1060 <getchar@plt>
cmp    $0xa,%eax
je     14e0 <main+0x380>
jmp    14cb <main+0x36b>
mov    -0xa8(%rbp),%eax
add    $0xffffffb1,%eax
mov    %eax,%ecx
mov    %rcx,-0xc0(%rbp)
sub    $0x22,%eax
ja     1757 <main+0x5f7>
mov    -0xc0(%rbp),%rax
lea    0xb0b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x78(%rbp)
jmp    1757 <main+0x5f7>
jmp    1523 <main+0x3c3>
lea    0xbfc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc1d(%rip),%rdi
lea    -0x7c(%rbp),%rsi
lea    -0x80(%rbp),%rdx
mov    $0x0,%al
call   1070 <scanf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
cmp    $0xa,%eax
je     155c <main+0x3fc>
jmp    1547 <main+0x3e7>
cmpl   $0x0,-0x7c(%rbp)
jle    1724 <main+0x5c4>
cmpl   $0x4,-0x7c(%rbp)
jg     1724 <main+0x5c4>
cmpl   $0x0,-0x80(%rbp)
jle    1724 <main+0x5c4>
cmpl   $0x3,-0x80(%rbp)
jg     1724 <main+0x5c4>
mov    -0x7c(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0x40(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x80(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    1711 <main+0x5b1>
mov    -0x7c(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x80(%rbp),%eax
mov    %eax,-0x90(%rbp)
lea    0xadc(%rip),%rdi
mov    $0x0,%al
call   1030 <system@plt>
movl   $0x1,-0xac(%rbp)
cmpl   $0x3,-0xac(%rbp)
jg     160a <main+0x4aa>
mov    -0xac(%rbp),%esi
lea    0xab5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xac(%rbp)
jmp    15d5 <main+0x475>
mov    -0x88(%rbp),%esi
mov    -0x84(%rbp),%edx
lea    0xa8b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x7c(%rbp)
cmpl   $0x4,-0x7c(%rbp)
jg     170c <main+0x5ac>
mov    -0x7c(%rbp),%esi
lea    0xaae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x80(%rbp)
cmpl   $0x3,-0x80(%rbp)
jg     16f0 <main+0x590>
mov    -0x7c(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0x70(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x80(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    169c <main+0x53c>
mov    -0x7c(%rbp),%eax
cmp    -0x8c(%rbp),%eax
jne    16cf <main+0x56f>
mov    -0x80(%rbp),%eax
cmp    -0x90(%rbp),%eax
jne    16cf <main+0x56f>
mov    -0x7c(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0x40(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x80(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xa2a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    16dd <main+0x57d>
lea    0xa1b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    16e2 <main+0x582>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    164d <main+0x4ed>
lea    0x9f4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    162b <main+0x4cb>
jmp    1750 <main+0x5f0>
lea    0xa43(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    173c <main+0x5dc>
lea    0xa52(%rip),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1741 <main+0x5e1>
mov    $0x1,%al
test   $0x1,%al
jne    1523 <main+0x3c3>
jmp    1750 <main+0x5f0>
movl   $0x2,-0x74(%rbp)
jmp    1c5a <main+0xafa>
jmp    1761 <main+0x601>
lea    0xa37(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x9df(%rip),%rdi
lea    -0x7c(%rbp),%rsi
lea    -0x80(%rbp),%rdx
mov    $0x0,%al
call   1070 <scanf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
cmp    $0xa,%eax
je     179a <main+0x63a>
jmp    1785 <main+0x625>
cmpl   $0x0,-0x7c(%rbp)
jle    1b33 <main+0x9d3>
cmpl   $0x4,-0x7c(%rbp)
jg     1b33 <main+0x9d3>
cmpl   $0x0,-0x80(%rbp)
jle    1b33 <main+0x9d3>
cmpl   $0x3,-0x80(%rbp)
jg     1b33 <main+0x9d3>
mov    -0x7c(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0x40(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x80(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    1b20 <main+0x9c0>
mov    -0x7c(%rbp),%eax
cmp    -0x8c(%rbp),%eax
jne    1807 <main+0x6a7>
mov    -0x80(%rbp),%eax
cmp    -0x90(%rbp),%eax
je     1b20 <main+0x9c0>
mov    -0x7c(%rbp),%eax
mov    %eax,-0x94(%rbp)
mov    -0x80(%rbp),%eax
mov    %eax,-0x98(%rbp)
movl   $0x1,-0xb0(%rbp)
cmpl   $0x3,-0xb0(%rbp)
jg     1858 <main+0x6f8>
mov    -0xb0(%rbp),%esi
lea    0x867(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0xb0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb0(%rbp)
jmp    1823 <main+0x6c3>
mov    -0x88(%rbp),%esi
mov    -0x84(%rbp),%edx
lea    0x83d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x7c(%rbp)
cmpl   $0x4,-0x7c(%rbp)
jg     1978 <main+0x818>
mov    -0x7c(%rbp),%esi
lea    0x860(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x80(%rbp)
cmpl   $0x3,-0x80(%rbp)
jg     195c <main+0x7fc>
mov    -0x7c(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0x70(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x80(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    1908 <main+0x7a8>
mov    -0x7c(%rbp),%eax
cmp    -0x8c(%rbp),%eax
jne    18ea <main+0x78a>
mov    -0x80(%rbp),%eax
cmp    -0x90(%rbp),%eax
je     1908 <main+0x7a8>
mov    -0x7c(%rbp),%eax
cmp    -0x94(%rbp),%eax
jne    193b <main+0x7db>
mov    -0x80(%rbp),%eax
cmp    -0x98(%rbp),%eax
jne    193b <main+0x7db>
mov    -0x7c(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0x40(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x80(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0x7be(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1949 <main+0x7e9>
lea    0x7af(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    194e <main+0x7ee>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    189b <main+0x73b>
lea    0x788(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1879 <main+0x719>
mov    -0x8c(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0x40(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x90(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x94(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rdx
lea    -0x40(%rbp),%rcx
imul   $0xc,%rdx,%rdx
add    %rdx,%rcx
mov    -0x98(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jne    1ac2 <main+0x962>
lea    0x811(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
cmp    $0xa,%eax
je     19ed <main+0x88d>
jmp    19d8 <main+0x878>
mov    -0x8c(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0x40(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x90(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x8c(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0x70(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x90(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x94(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0x40(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x98(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x94(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0x70(%rbp),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    -0x98(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x84(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x84(%rbp)
mov    -0x84(%rbp),%edx
mov    $0x1,%eax
mov    $0x3,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
mov    %eax,-0x74(%rbp)
jmp    1b1b <main+0x9bb>
lea    0x746(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x71c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
cmp    $0xa,%eax
je     1af3 <main+0x993>
jmp    1ade <main+0x97e>
mov    -0x88(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x88(%rbp)
mov    -0x88(%rbp),%edx
mov    $0x1,%eax
mov    $0x4,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
mov    %eax,-0x74(%rbp)
jmp    1b5f <main+0x9ff>
lea    0x634(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1b4b <main+0x9eb>
lea    0x6eb(%rip),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1b50 <main+0x9f0>
mov    $0x1,%al
test   $0x1,%al
jne    1761 <main+0x601>
jmp    1b5f <main+0x9ff>
jmp    1c5a <main+0xafa>
lea    0x535(%rip),%rdi
mov    $0x0,%al
call   1030 <system@plt>
lea    0x6d6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x6d6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    %eax,-0xa8(%rbp)
mov    $0x0,%al
call   1060 <getchar@plt>
cmp    $0xa,%eax
je     1bb0 <main+0xa50>
jmp    1b9b <main+0xa3b>
mov    -0xa8(%rbp),%eax
or     $0x20,%eax
sub    $0x79,%eax
je     1bc7 <main+0xa67>
jmp    1bd3 <main+0xa73>
movl   $0x0,-0x74(%rbp)
jmp    1bda <main+0xa7a>
movl   $0x1,-0x78(%rbp)
jmp    1c5a <main+0xafa>
lea    0x4ba(%rip),%rdi
mov    $0x0,%al
call   1030 <system@plt>
lea    0x67c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x65b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    %eax,-0xa8(%rbp)
mov    $0x0,%al
call   1060 <getchar@plt>
cmp    $0xa,%eax
je     1c2b <main+0xacb>
jmp    1c16 <main+0xab6>
mov    -0xa8(%rbp),%eax
or     $0x20,%eax
sub    $0x79,%eax
je     1c42 <main+0xae2>
jmp    1c4e <main+0xaee>
movl   $0x0,-0x74(%rbp)
jmp    1c55 <main+0xaf5>
movl   $0x1,-0x78(%rbp)
jmp    1c5a <main+0xafa>
jmp    1c5f <main+0xaff>
cmpl   $0x0,-0x78(%rbp)
je     11cf <main+0x6f>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
lea    0xe54(%rip),%r15
lea    0xeed(%rip),%r12
lea    0xf33(%rip),%r14
xor    %eax,%eax
nopl   0x0(%rax)
xor    %ebx,%ebx
xor    %ecx,%ecx
mov    %rcx,0x10(%rsp)
nopl   0x0(%rax)
cmp    $0x4,%eax
ja     11d0 <main+0x60>
mov    %eax,%eax
movslq (%r15,%rax,4),%rax
add    %r15,%rax
jmp    *%rax
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <system@plt>
mov    $0x1,%ebp
lea    0xeae(%rip),%r13
mov    %r13,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r13,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r13,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe7e(%rip),%rdi
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
xor    %eax,%eax
call   1060 <printf@plt>
movl   $0x1,(%rsp)
jmp    126c <main+0xfc>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rsp),%eax
lea    0x1(%rax),%ebp
mov    %ebp,(%rsp)
cmp    $0x4,%eax
jge    1542 <main+0x3d2>
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <printf@plt>
movl   $0x1,0x4(%rsp)
mov    $0x1,%eax
lea    0xe65(%rip),%rbp
jmp    12b9 <main+0x149>
xchg   %ax,%ax
add    $0xffffffffffffffff,%rax
lea    (%rsp,%rcx,4),%rcx
add    $0x20,%rcx
mov    (%rcx,%rax,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x4(%rsp),%ecx
lea    0x1(%rcx),%eax
mov    %eax,0x4(%rsp)
cmp    $0x3,%ecx
jge    1250 <main+0xe0>
movslq (%rsp),%rcx
add    $0xffffffffffffffff,%rcx
cltq
lea    (%rcx,%rcx,2),%rcx
lea    (%rsp,%rcx,4),%rdx
add    $0x60,%rdx
cmpl   $0x0,-0x4(%rdx,%rax,4)
jne    1290 <main+0x120>
mov    %rbp,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    12a9 <main+0x139>
lea    0xe6c(%rip),%rbp
jmp    12f5 <main+0x185>
nopl   0x0(%rax,%rax,1)
call   1040 <puts@plt>
lea    0xe5f(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbp,%rdi
mov    %rsp,%rsi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1080 <scanf@plt>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1070 <getchar@plt>
cmp    $0xa,%eax
jne    1320 <main+0x1b0>
mov    (%rsp),%r12d
lea    -0x1(%r12),%r13d
lea    0xe90(%rip),%rax
mov    %rax,%rdi
cmp    $0x3,%r13d
ja     12f0 <main+0x180>
mov    0x4(%rsp),%r15d
mov    %rax,%rdi
test   %r15d,%r15d
jle    12f0 <main+0x180>
mov    %rax,%rdi
cmp    $0x3,%r15d
jg     12f0 <main+0x180>
movslq %r15d,%rdx
mov    %r13d,%eax
add    $0xffffffffffffffff,%rdx
mov    %edx,%ecx
lea    (%rax,%rax,2),%rax
lea    (%rsp,%rax,4),%rax
add    $0x20,%rax
cmpl   $0x0,(%rax,%rcx,4)
lea    0xed9(%rip),%rdi
jle    12f0 <main+0x180>
cmp    %ebx,%r12d
jne    139b <main+0x22b>
lea    0xec7(%rip),%rdi
cmp    0x10(%rsp),%r15d
je     12f0 <main+0x180>
mov    %rdx,0x18(%rsp)
mov    $0x1,%ebp
lea    0xcf8(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xce5(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xcd2(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xcc3(%rip),%rdi
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
xor    %eax,%eax
call   1060 <printf@plt>
movl   $0x1,(%rsp)
jmp    141c <main+0x2ac>
nopl   (%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rsp),%eax
lea    0x1(%rax),%ebp
mov    %ebp,(%rsp)
cmp    $0x4,%eax
jge    172c <main+0x5bc>
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <printf@plt>
movl   $0x1,0x4(%rsp)
mov    $0x1,%eax
lea    0xcb5(%rip),%rbp
jmp    1469 <main+0x2f9>
xchg   %ax,%ax
add    $0xffffffffffffffff,%rcx
lea    (%rsp,%rdx,4),%rax
add    $0x20,%rax
mov    (%rax,%rcx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x4(%rsp),%ecx
lea    0x1(%rcx),%eax
mov    %eax,0x4(%rsp)
cmp    $0x3,%ecx
jge    1400 <main+0x290>
movslq (%rsp),%rsi
lea    -0x1(%rsi),%rdx
movslq %eax,%rcx
lea    (%rdx,%rdx,2),%rdx
lea    (%rsp,%rdx,4),%rdi
add    $0x60,%rdi
cmpl   $0x0,-0x4(%rdi,%rcx,4)
jne    1440 <main+0x2d0>
cmp    %ebx,%esi
jne    1491 <main+0x321>
cmp    0x10(%rsp),%eax
je     1440 <main+0x2d0>
cmp    %r12d,%esi
jne    149b <main+0x32b>
cmp    %r15d,%eax
je     1440 <main+0x2d0>
mov    %rbp,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1459 <main+0x2e9>
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <system@plt>
lea    0xd07(%rip),%rdi
call   1040 <puts@plt>
lea    0xcda(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
mov    %eax,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1070 <getchar@plt>
cmp    $0xa,%eax
jne    14e0 <main+0x370>
jmp    152c <main+0x3bc>
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <system@plt>
lea    0xcb2(%rip),%rdi
call   1040 <puts@plt>
lea    0xc93(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
mov    %eax,%ebp
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1070 <getchar@plt>
cmp    $0xa,%eax
jne    1520 <main+0x3b0>
or     $0x20,%ebp
mov    $0x0,%eax
cmp    $0x79,%ebp
je     11d0 <main+0x60>
jmp    1965 <main+0x7f5>
lea    0xbab(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
mov    %eax,%ebp
lea    0xcd6(%rip),%r13
xor    %eax,%eax
call   1070 <getchar@plt>
cmp    $0xa,%eax
jne    1560 <main+0x3f0>
mov    $0x1,%eax
add    $0xffffffb1,%ebp
cmp    $0x22,%ebp
ja     11d0 <main+0x60>
lea    0xa90(%rip),%rdx
movslq (%rdx,%rbp,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0xb92(%rip),%rbp
jmp    15a5 <main+0x435>
cs nopw 0x0(%rax,%rax,1)
call   1040 <puts@plt>
mov    %rbp,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xb9f(%rip),%rdi
mov    %rsp,%rsi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1080 <scanf@plt>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1070 <getchar@plt>
cmp    $0xa,%eax
jne    15d0 <main+0x460>
mov    (%rsp),%eax
mov    %rax,%r12
add    $0xffffffff,%eax
mov    %r13,%rdi
cmp    $0x3,%eax
ja     15a0 <main+0x430>
mov    0x4(%rsp),%ebx
mov    %r13,%rdi
test   %ebx,%ebx
jle    15a0 <main+0x430>
mov    %r13,%rdi
cmp    $0x3,%ebx
jg     15a0 <main+0x430>
mov    %eax,%eax
lea    -0x1(%rbx),%ecx
lea    (%rax,%rax,2),%rax
lea    (%rsp,%rax,4),%rax
add    $0x20,%rax
cmpl   $0x0,(%rax,%rcx,4)
lea    0xc3b(%rip),%rdi
jle    15a0 <main+0x430>
lea    0xa7b(%rip),%rdi
xor    %eax,%eax
call   1050 <system@plt>
mov    $0x1,%ebp
lea    0xa6c(%rip),%r13
mov    %r13,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r13,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r13,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xa3c(%rip),%rdi
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
xor    %eax,%eax
call   1060 <printf@plt>
movl   $0x1,(%rsp)
jmp    16ac <main+0x53c>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    (%rsp),%eax
lea    0x1(%rax),%ebp
mov    %ebp,(%rsp)
cmp    $0x4,%eax
jge    17e3 <main+0x673>
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1060 <printf@plt>
movl   $0x1,0x4(%rsp)
mov    $0x1,%eax
lea    0xa25(%rip),%rbp
jmp    16f9 <main+0x589>
xchg   %ax,%ax
add    $0xffffffffffffffff,%rcx
lea    (%rsp,%rdx,4),%rax
add    $0x20,%rax
mov    (%rax,%rcx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x4(%rsp),%ecx
lea    0x1(%rcx),%eax
mov    %eax,0x4(%rsp)
cmp    $0x3,%ecx
jge    1690 <main+0x520>
movslq (%rsp),%rsi
lea    -0x1(%rsi),%rdx
movslq %eax,%rcx
lea    (%rdx,%rdx,2),%rdx
lea    (%rsp,%rdx,4),%rdi
add    $0x60,%rdi
cmpl   $0x0,-0x4(%rdi,%rcx,4)
jne    16d0 <main+0x560>
cmp    %r12d,%esi
jne    1720 <main+0x5b0>
cmp    %ebx,%eax
je     16d0 <main+0x560>
mov    %rbp,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    16e9 <main+0x579>
lea    -0x1(%rbx),%eax
cltq
movslq 0x10(%rsp),%rbp
lea    (%rax,%rax,2),%r15
lea    (%rsp,%r15,4),%rax
add    $0x20,%rax
mov    -0x4(%rax,%rbp,4),%edx
movslq %r13d,%rcx
lea    (%rcx,%rcx,2),%r12
lea    (%rsp,%r12,4),%rcx
add    $0x20,%rcx
mov    0x18(%rsp),%rsi
cmp    (%rcx,%rsi,4),%edx
jne    17fc <main+0x68c>
lea    (%rax,%rbp,4),%r13
add    $0xfffffffffffffffc,%r13
add    $0xffffffffffffffff,%rbp
lea    (%rcx,%rsi,4),%rax
mov    %rax,0x58(%rsp)
lea    0xa8b(%rip),%rdi
call   1040 <puts@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1070 <getchar@plt>
cmp    $0xa,%eax
jne    1790 <main+0x620>
movl   $0x0,0x0(%r13)
lea    (%rsp,%r15,4),%rax
add    $0x60,%rax
movl   $0x1,(%rax,%rbp,4)
mov    0x58(%rsp),%rax
movl   $0x0,(%rax)
lea    (%rsp,%r12,4),%rax
add    $0x60,%rax
mov    0x18(%rsp),%rcx
movl   $0x1,(%rax,%rcx,4)
xor    %eax,%eax
addl   $0xffffffff,0xc(%rsp)
sete   %al
add    %eax,%eax
add    $0x1,%eax
jmp    183c <main+0x6cc>
mov    %rbx,0x10(%rsp)
mov    $0x2,%eax
mov    %r12,%rbx
lea    0x8a9(%rip),%r12
jmp    11d0 <main+0x60>
lea    0x9f2(%rip),%rdi
call   1040 <puts@plt>
lea    0xa0c(%rip),%rdi
call   1040 <puts@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1070 <getchar@plt>
cmp    $0xa,%eax
jne    1820 <main+0x6b0>
xor    %eax,%eax
addl   $0xffffffff,0x8(%rsp)
sete   %al
lea    (%rax,%rax,2),%eax
add    $0x1,%eax
lea    0x7bd(%rip),%r15
lea    0x856(%rip),%r12
jmp    11d0 <main+0x60>
nop
mov    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1090 <rand@plt>
lea    0x3(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffffffc,%ecx
sub    %ecx,%eax
mov    %eax,(%rsp)
xor    %eax,%eax
call   1090 <rand@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
mov    %eax,0x4(%rsp)
movslq (%rsp),%rcx
cltq
lea    (%rcx,%rcx,2),%rcx
lea    (%rsp,%rcx,4),%rcx
add    $0x20,%rcx
cmpl   $0x0,(%rcx,%rax,4)
jne    1860 <main+0x6f0>
lea    (%rcx,%rax,4),%rax
mov    %ebp,(%rax)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1090 <rand@plt>
lea    0x3(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffffffc,%ecx
sub    %ecx,%eax
mov    %eax,(%rsp)
xor    %eax,%eax
call   1090 <rand@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
mov    %eax,0x4(%rsp)
movslq (%rsp),%rcx
cltq
lea    (%rcx,%rcx,2),%rcx
lea    (%rsp,%rcx,4),%rcx
add    $0x20,%rcx
cmpl   $0x0,(%rcx,%rax,4)
jne    18c0 <main+0x750>
lea    (%rcx,%rax,4),%rax
mov    %ebp,(%rax)
add    $0x1,%ebp
cmp    $0x7,%ebp
jne    1860 <main+0x6f0>
xorps  %xmm0,%xmm0
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movl   $0x4,(%rsp)
movl   $0x3,0x4(%rsp)
movl   $0x5,0x8(%rsp)
movl   $0x6,0xc(%rsp)
mov    $0x1,%eax
jmp    11c0 <main+0x50>
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"cls\00"
@.str.1 = [4 x i8] c"\09%d\00"
@.str.2 = [69 x i8] c"\0A---------------------------------- lifes = %4d | left value = %4d \0A\00"
@.str.3 = [4 x i8] c"%d\09\00"
@.str.4 = [3 x i8] c"*\09\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [50 x i8] c"\C3\8A\C3\A4\C3\88\C3\AB\C3\83\C3\BC\C3\81\C3\AE(q:\C3\8D\C3\8B\C2\B3\C3\B6, o:\C2\B4\C3\B2\C2\BF\C2\AA\C2\B8\C3\87\C3\97\C3\93):\00"
@.str.7 = [47 x i8] c"\C3\8A\C3\A4\C3\88\C3\AB\C2\B4\C3\B2\C2\BF\C2\AA\C2\B8\C3\87\C3\97\C3\93\C2\B5\C3\84\C2\B5\C2\A5\C3\94\C2\AA: row,col:\00"
@.str.8 = [6 x i8] c"%d,%d\00"
@.str.9 = [34 x i8] c"\C3\92\C3\91\C2\B4\C3\B2\C2\BF\C2\AA\C2\BB\C3\B2\C3\92\C3\91\C3\8F\C3\BB\C2\B3\C3\BD\C2\A1\C2\A3\0A\00"
@.str.10 = [34 x i8] c"\C3\90\C3\90\C2\A1\C2\A2\C3\81\C3\90\C3\97\C3\B8\C2\B1\C3\AA\C2\B4\C3\AD\C3\8E\C3\B3\C2\A1\C2\A3\0A\00"
@.str.11 = [67 x i8] c"\C3\87\C3\AB\C3\8A\C3\A4\C3\88\C3\AB\C2\B5\C3\9A\C2\B6\C3\BE\C2\B8\C3\B6\C2\B5\C2\A5\C3\94\C2\AA\C2\B5\C3\84\C3\90\C3\90\C2\A1\C2\A2\C3\81\C3\90\C3\97\C3\B8\C2\B1\C3\AA: row,col:\00"
@.str.12 = [45 x i8] c"\C3\92\C3\91\C3\8F\C3\BB\C2\B3\C3\BD\C2\A1\C2\A3 \C2\B0\C2\B4 <enter> \C2\BC\C3\8C\C3\90\C3\B8\C2\A1\C2\A3 \0A\00"
@.str.13 = [22 x i8] c"\C3\8F\C3\BB\C2\B3\C3\BD\C3\8A\C2\A7\C2\B0\C3\9C\C2\A1\C2\A3\0A\00"
@.str.14 = [28 x i8] c"\C2\B0\C2\B4 <enter> \C2\BC\C3\8C\C3\90\C3\B8\C2\A1\C2\A3 \0A\00"
@.str.15 = [42 x i8] c"\C3\90\C3\90\C2\A1\C2\A2\C3\81\C3\90\C3\97\C3\B8\C2\B1\C3\AA\C3\8A\C3\A4\C3\88\C3\AB\C2\B4\C3\AD\C3\8E\C3\B3\C2\A1\C2\A3\0A\00"
@.str.16 = [14 x i8] c"YOU WIN!!!!!\0A\00"
@.str.17 = [19 x i8] c"\C3\96\C3\98\C3\8D\C3\A6\C3\82\C3\B0?(y/n)\00"
@.str.18 = [15 x i8] c"YOU LOSE!!!!!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4 x [3 x i32]]
%7 = alloca [4 x [3 x i32]]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%24 = bitcast [4 x [3 x i32]]* %6 to i8*
%25 = bitcast [4 x [3 x i32]]* %7 to i8*
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %14
store i32 0, i32* %15
store i32 0, i32* %16
store i32 0, i32* %17
br label %26
26: ; preds = %497, %2
%27 = load i32, i32* %8
switch i32 %27, label %496 [
i32 0, label %28
i32 1, label %92
i32 2, label %267
i32 3, label %468
i32 4, label %482
]
28: ; preds = %26
store i32 6, i32* %12
store i32 5, i32* %13
store i32 1, i32* %18
br label %29
29: ; preds = %66, %28
%30 = load i32, i32* %18
%31 = load i32, i32* %12
%32 = icmp sle i32 %30, %31
br i1 %32, label %33, label %69
33: ; preds = %29
store i32 0, i32* %19
br label %34
34: ; preds = %62, %33
%35 = load i32, i32* %19
%36 = icmp slt i32 %35, 2
br i1 %36, label %37, label %65
37: ; preds = %34
br label %38
38: ; preds = %60, %37
%39 = call i32 (...) @rand()
%40 = srem i32 %39, 4
store i32 %40, i32* %10
%41 = call i32 (...) @rand()
%42 = srem i32 %41, 3
store i32 %42, i32* %11
%43 = load i32, i32* %10
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %6, i64 0, i64 %44
%46 = load i32, i32* %11
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [3 x i32], [3 x i32]* %45, i64 0, i64 %47
%49 = load i32, i32* %48
%50 = icmp eq i32 %49, 0
br i1 %50, label %51, label %59
51: ; preds = %38
%52 = load i32, i32* %18
%53 = load i32, i32* %10
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %6, i64 0, i64 %54
%56 = load i32, i32* %11
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds [3 x i32], [3 x i32]* %55, i64 0, i64 %57
store i32 %52, i32* %58
br label %61
59: ; preds = %38
br label %60
60: ; preds = %59
br i1 true, label %38, label %61
61: ; preds = %60, %51
br label %62
62: ; preds = %61
%63 = load i32, i32* %19
%64 = add nsw i32 %63, 1
store i32 %64, i32* %19
br label %34
65: ; preds = %34
br label %66
66: ; preds = %65
%67 = load i32, i32* %18
%68 = add nsw i32 %67, 1
store i32 %68, i32* %18
br label %29
69: ; preds = %29
store i32 0, i32* %10
br label %70
70: ; preds = %88, %69
%71 = load i32, i32* %10
%72 = icmp slt i32 %71, 4
br i1 %72, label %73, label %91
73: ; preds = %70
store i32 0, i32* %11
br label %74
74: ; preds = %84, %73
%75 = load i32, i32* %11
%76 = icmp slt i32 %75, 3
br i1 %76, label %77, label %87
77: ; preds = %74
%78 = load i32, i32* %10
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %7, i64 0, i64 %79
%81 = load i32, i32* %11
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [3 x i32], [3 x i32]* %80, i64 0, i64 %82
store i32 0, i32* %83
br label %84
84: ; preds = %77
%85 = load i32, i32* %11
%86 = add nsw i32 %85, 1
store i32 %86, i32* %11
br label %74
87: ; preds = %74
br label %88
88: ; preds = %87
%89 = load i32, i32* %10
%90 = add nsw i32 %89, 1
store i32 %90, i32* %10
br label %70
91: ; preds = %70
store i32 0, i32* %14
store i32 0, i32* %15
store i32 0, i32* %16
store i32 0, i32* %17
store i32 1, i32* %8
br label %496
92: ; preds = %26
%93 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %20
br label %94
94: ; preds = %100, %92
%95 = load i32, i32* %20
%96 = icmp sle i32 %95, 3
br i1 %96, label %97, label %103
97: ; preds = %94
%98 = load i32, i32* %20
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %98)
br label %100
100: ; preds = %97
%101 = load i32, i32* %20
%102 = add nsw i32 %101, 1
store i32 %102, i32* %20
br label %94
103: ; preds = %94
%104 = load i32, i32* %13
%105 = load i32, i32* %12
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %104, i32 %105)
store i32 1, i32* %10
br label %107
107: ; preds = %146, %103
%108 = load i32, i32* %10
%109 = icmp sle i32 %108, 4
br i1 %109, label %110, label %149
110: ; preds = %107
%111 = load i32, i32* %10
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %111)
store i32 1, i32* %11
br label %113
113: ; preds = %141, %110
%114 = load i32, i32* %11
%115 = icmp sle i32 %114, 3
br i1 %115, label %116, label %144
116: ; preds = %113
%117 = load i32, i32* %10
%118 = sub nsw i32 %117, 1
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %7, i64 0, i64 %119
%121 = load i32, i32* %11
%122 = sub nsw i32 %121, 1
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds [3 x i32], [3 x i32]* %120, i64 0, i64 %123
%125 = load i32, i32* %124
%126 = icmp ne i32 %125, 0
br i1 %126, label %127, label %138
127: ; preds = %116
%128 = load i32, i32* %10
%129 = sub nsw i32 %128, 1
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %6, i64 0, i64 %130
%132 = load i32, i32* %11
%133 = sub nsw i32 %132, 1
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds [3 x i32], [3 x i32]* %131, i64 0, i64 %134
%136 = load i32, i32* %135
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %136)
br label %140
138: ; preds = %116
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %140
140: ; preds = %138, %127
br label %141
141: ; preds = %140
%142 = load i32, i32* %11
%143 = add nsw i32 %142, 1
store i32 %143, i32* %11
br label %113
144: ; preds = %113
%145 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %146
146: ; preds = %144
%147 = load i32, i32* %10
%148 = add nsw i32 %147, 1
store i32 %148, i32* %10
br label %107
149: ; preds = %107
%150 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
%151 = call i32 (...) @getchar()
store i32 %151, i32* %21
br label %152
152: ; preds = %155, %149
%153 = call i32 (...) @getchar()
%154 = icmp ne i32 %153, 10
br i1 %154, label %155, label %156
155: ; preds = %152
br label %152
156: ; preds = %152
%157 = load i32, i32* %21
switch i32 %157, label %266 [
i32 113, label %158
i32 81, label %158
i32 111, label %159
i32 79, label %159
]
158: ; preds = %156, %156
store i32 1, i32* %9
br label %266
159: ; preds = %156, %156
br label %160
160: ; preds = %264, %159
%161 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0))
%162 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32* %10, i32* %11)
br label %163
163: ; preds = %166, %160
%164 = call i32 (...) @getchar()
%165 = icmp ne i32 %164, 10
br i1 %165, label %166, label %167
166: ; preds = %163
br label %163
167: ; preds = %163
%168 = load i32, i32* %10
%169 = icmp sgt i32 %168, 0
br i1 %169, label %170, label %261
170: ; preds = %167
%171 = load i32, i32* %10
%172 = icmp sle i32 %171, 4
br i1 %172, label %173, label %261
173: ; preds = %170
%174 = load i32, i32* %11
%175 = icmp sgt i32 %174, 0
br i1 %175, label %176, label %261
176: ; preds = %173
%177 = load i32, i32* %11
%178 = icmp sle i32 %177, 3
br i1 %178, label %179, label %261
179: ; preds = %176
%180 = load i32, i32* %10
%181 = sub nsw i32 %180, 1
%182 = sext i32 %181 to i64
%183 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %6, i64 0, i64 %182
%184 = load i32, i32* %11
%185 = sub nsw i32 %184, 1
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds [3 x i32], [3 x i32]* %183, i64 0, i64 %186
%188 = load i32, i32* %187
%189 = icmp sgt i32 %188, 0
br i1 %189, label %190, label %258
190: ; preds = %179
%191 = load i32, i32* %10
store i32 %191, i32* %14
%192 = load i32, i32* %11
store i32 %192, i32* %15
%193 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %22
br label %194
194: ; preds = %200, %190
%195 = load i32, i32* %22
%196 = icmp sle i32 %195, 3
br i1 %196, label %197, label %203
197: ; preds = %194
%198 = load i32, i32* %22
%199 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %198)
br label %200
200: ; preds = %197
%201 = load i32, i32* %22
%202 = add nsw i32 %201, 1
store i32 %202, i32* %22
br label %194
203: ; preds = %194
%204 = load i32, i32* %13
%205 = load i32, i32* %12
%206 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %204, i32 %205)
store i32 1, i32* %10
br label %207
207: ; preds = %254, %203
%208 = load i32, i32* %10
%209 = icmp sle i32 %208, 4
br i1 %209, label %210, label %257
210: ; preds = %207
%211 = load i32, i32* %10
%212 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %211)
store i32 1, i32* %11
br label %213
213: ; preds = %249, %210
%214 = load i32, i32* %11
%215 = icmp sle i32 %214, 3
br i1 %215, label %216, label %252
216: ; preds = %213
%217 = load i32, i32* %10
%218 = sub nsw i32 %217, 1
%219 = sext i32 %218 to i64
%220 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %7, i64 0, i64 %219
%221 = load i32, i32* %11
%222 = sub nsw i32 %221, 1
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds [3 x i32], [3 x i32]* %220, i64 0, i64 %223
%225 = load i32, i32* %224
%226 = icmp ne i32 %225, 0
br i1 %226, label %235, label %227
227: ; preds = %216
%228 = load i32, i32* %10
%229 = load i32, i32* %14
%230 = icmp eq i32 %228, %229
br i1 %230, label %231, label %246
231: ; preds = %227
%232 = load i32, i32* %11
%233 = load i32, i32* %15
%234 = icmp eq i32 %232, %233
br i1 %234, label %235, label %246
235: ; preds = %231, %216
%236 = load i32, i32* %10
%237 = sub nsw i32 %236, 1
%238 = sext i32 %237 to i64
%239 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %6, i64 0, i64 %238
%240 = load i32, i32* %11
%241 = sub nsw i32 %240, 1
%242 = sext i32 %241 to i64
%243 = getelementptr inbounds [3 x i32], [3 x i32]* %239, i64 0, i64 %242
%244 = load i32, i32* %243
%245 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %244)
br label %248
246: ; preds = %231, %227
%247 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %248
248: ; preds = %246, %235
br label %249
249: ; preds = %248
%250 = load i32, i32* %11
%251 = add nsw i32 %250, 1
store i32 %251, i32* %11
br label %213
252: ; preds = %213
%253 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %254
254: ; preds = %252
%255 = load i32, i32* %10
%256 = add nsw i32 %255, 1
store i32 %256, i32* %10
br label %207
257: ; preds = %207
br label %265
258: ; preds = %179
%259 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
br label %260
260: ; preds = %258
br label %263
261: ; preds = %176, %173, %170, %167
%262 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.10, i64 0, i64 0), i32 4, i32 3)
br label %263
263: ; preds = %261, %260
br label %264
264: ; preds = %263
br i1 true, label %160, label %265
265: ; preds = %264, %257
store i32 2, i32* %8
br label %266
266: ; preds = %156, %265, %158
br label %496
267: ; preds = %26
br label %268
268: ; preds = %466, %267
%269 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.11, i64 0, i64 0))
%270 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32* %10, i32* %11)
br label %271
271: ; preds = %274, %268
%272 = call i32 (...) @getchar()
%273 = icmp ne i32 %272, 10
br i1 %273, label %274, label %275
274: ; preds = %271
br label %271
275: ; preds = %271
%276 = load i32, i32* %10
%277 = icmp sgt i32 %276, 0
br i1 %277, label %278, label %463
278: ; preds = %275
%279 = load i32, i32* %10
%280 = icmp sle i32 %279, 4
br i1 %280, label %281, label %463
281: ; preds = %278
%282 = load i32, i32* %11
%283 = icmp sgt i32 %282, 0
br i1 %283, label %284, label %463
284: ; preds = %281
%285 = load i32, i32* %11
%286 = icmp sle i32 %285, 3
br i1 %286, label %287, label %463
287: ; preds = %284
%288 = load i32, i32* %10
%289 = sub nsw i32 %288, 1
%290 = sext i32 %289 to i64
%291 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %6, i64 0, i64 %290
%292 = load i32, i32* %11
%293 = sub nsw i32 %292, 1
%294 = sext i32 %293 to i64
%295 = getelementptr inbounds [3 x i32], [3 x i32]* %291, i64 0, i64 %294
%296 = load i32, i32* %295
%297 = icmp sgt i32 %296, 0
br i1 %297, label %298, label %460
298: ; preds = %287
%299 = load i32, i32* %10
%300 = load i32, i32* %14
%301 = icmp ne i32 %299, %300
br i1 %301, label %306, label %302
302: ; preds = %298
%303 = load i32, i32* %11
%304 = load i32, i32* %15
%305 = icmp ne i32 %303, %304
br i1 %305, label %306, label %460
306: ; preds = %302, %298
%307 = load i32, i32* %10
store i32 %307, i32* %16
%308 = load i32, i32* %11
store i32 %308, i32* %17
store i32 1, i32* %23
br label %309
309: ; preds = %315, %306
%310 = load i32, i32* %23
%311 = icmp sle i32 %310, 3
br i1 %311, label %312, label %318
312: ; preds = %309
%313 = load i32, i32* %23
%314 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %313)
br label %315
315: ; preds = %312
%316 = load i32, i32* %23
%317 = add nsw i32 %316, 1
store i32 %317, i32* %23
br label %309
318: ; preds = %309
%319 = load i32, i32* %13
%320 = load i32, i32* %12
%321 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %319, i32 %320)
store i32 1, i32* %10
br label %322
322: ; preds = %377, %318
%323 = load i32, i32* %10
%324 = icmp sle i32 %323, 4
br i1 %324, label %325, label %380
325: ; preds = %322
%326 = load i32, i32* %10
%327 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %326)
store i32 1, i32* %11
br label %328
328: ; preds = %372, %325
%329 = load i32, i32* %11
%330 = icmp sle i32 %329, 3
br i1 %330, label %331, label %375
331: ; preds = %328
%332 = load i32, i32* %10
%333 = sub nsw i32 %332, 1
%334 = sext i32 %333 to i64
%335 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %7, i64 0, i64 %334
%336 = load i32, i32* %11
%337 = sub nsw i32 %336, 1
%338 = sext i32 %337 to i64
%339 = getelementptr inbounds [3 x i32], [3 x i32]* %335, i64 0, i64 %338
%340 = load i32, i32* %339
%341 = icmp ne i32 %340, 0
br i1 %341, label %358, label %342
342: ; preds = %331
%343 = load i32, i32* %10
%344 = load i32, i32* %14
%345 = icmp eq i32 %343, %344
br i1 %345, label %346, label %350
346: ; preds = %342
%347 = load i32, i32* %11
%348 = load i32, i32* %15
%349 = icmp eq i32 %347, %348
br i1 %349, label %358, label %350
350: ; preds = %346, %342
%351 = load i32, i32* %10
%352 = load i32, i32* %16
%353 = icmp eq i32 %351, %352
br i1 %353, label %354, label %369
354: ; preds = %350
%355 = load i32, i32* %11
%356 = load i32, i32* %17
%357 = icmp eq i32 %355, %356
br i1 %357, label %358, label %369
358: ; preds = %354, %346, %331
%359 = load i32, i32* %10
%360 = sub nsw i32 %359, 1
%361 = sext i32 %360 to i64
%362 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %6, i64 0, i64 %361
%363 = load i32, i32* %11
%364 = sub nsw i32 %363, 1
%365 = sext i32 %364 to i64
%366 = getelementptr inbounds [3 x i32], [3 x i32]* %362, i64 0, i64 %365
%367 = load i32, i32* %366
%368 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %367)
br label %371
369: ; preds = %354, %350
%370 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %371
371: ; preds = %369, %358
br label %372
372: ; preds = %371
%373 = load i32, i32* %11
%374 = add nsw i32 %373, 1
store i32 %374, i32* %11
br label %328
375: ; preds = %328
%376 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %377
377: ; preds = %375
%378 = load i32, i32* %10
%379 = add nsw i32 %378, 1
store i32 %379, i32* %10
br label %322
380: ; preds = %322
%381 = load i32, i32* %14
%382 = sub nsw i32 %381, 1
%383 = sext i32 %382 to i64
%384 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %6, i64 0, i64 %383
%385 = load i32, i32* %15
%386 = sub nsw i32 %385, 1
%387 = sext i32 %386 to i64
%388 = getelementptr inbounds [3 x i32], [3 x i32]* %384, i64 0, i64 %387
%389 = load i32, i32* %388
%390 = load i32, i32* %16
%391 = sub nsw i32 %390, 1
%392 = sext i32 %391 to i64
%393 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %6, i64 0, i64 %392
%394 = load i32, i32* %17
%395 = sub nsw i32 %394, 1
%396 = sext i32 %395 to i64
%397 = getelementptr inbounds [3 x i32], [3 x i32]* %393, i64 0, i64 %396
%398 = load i32, i32* %397
%399 = icmp eq i32 %389, %398
br i1 %399, label %400, label %445
400: ; preds = %380
%401 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.12, i64 0, i64 0))
br label %402
402: ; preds = %405, %400
%403 = call i32 (...) @getchar()
%404 = icmp ne i32 %403, 10
br i1 %404, label %405, label %406
405: ; preds = %402
br label %402
406: ; preds = %402
%407 = load i32, i32* %14
%408 = sub nsw i32 %407, 1
%409 = sext i32 %408 to i64
%410 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %6, i64 0, i64 %409
%411 = load i32, i32* %15
%412 = sub nsw i32 %411, 1
%413 = sext i32 %412 to i64
%414 = getelementptr inbounds [3 x i32], [3 x i32]* %410, i64 0, i64 %413
store i32 0, i32* %414
%415 = load i32, i32* %14
%416 = sub nsw i32 %415, 1
%417 = sext i32 %416 to i64
%418 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %7, i64 0, i64 %417
%419 = load i32, i32* %15
%420 = sub nsw i32 %419, 1
%421 = sext i32 %420 to i64
%422 = getelementptr inbounds [3 x i32], [3 x i32]* %418, i64 0, i64 %421
store i32 1, i32* %422
%423 = load i32, i32* %16
%424 = sub nsw i32 %423, 1
%425 = sext i32 %424 to i64
%426 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %6, i64 0, i64 %425
%427 = load i32, i32* %17
%428 = sub nsw i32 %427, 1
%429 = sext i32 %428 to i64
%430 = getelementptr inbounds [3 x i32], [3 x i32]* %426, i64 0, i64 %429
store i32 0, i32* %430
%431 = load i32, i32* %16
%432 = sub nsw i32 %431, 1
%433 = sext i32 %432 to i64
%434 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %7, i64 0, i64 %433
%435 = load i32, i32* %17
%436 = sub nsw i32 %435, 1
%437 = sext i32 %436 to i64
%438 = getelementptr inbounds [3 x i32], [3 x i32]* %434, i64 0, i64 %437
store i32 1, i32* %438
%439 = load i32, i32* %12
%440 = add nsw i32 %439, -1
store i32 %440, i32* %12
%441 = load i32, i32* %12
%442 = icmp eq i32 %441, 0
%443 = zext i1 %442 to i64
%444 = select i1 %442, i32 3, i32 1
store i32 %444, i32* %8
br label %459
445: ; preds = %380
%446 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0))
%447 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0))
br label %448
448: ; preds = %451, %445
%449 = call i32 (...) @getchar()
%450 = icmp ne i32 %449, 10
br i1 %450, label %451, label %452
451: ; preds = %448
br label %448
452: ; preds = %448
%453 = load i32, i32* %13
%454 = add nsw i32 %453, -1
store i32 %454, i32* %13
%455 = load i32, i32* %13
%456 = icmp eq i32 %455, 0
%457 = zext i1 %456 to i64
%458 = select i1 %456, i32 4, i32 1
store i32 %458, i32* %8
br label %459
459: ; preds = %452, %406
br label %467
460: ; preds = %302, %287
%461 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
br label %462
462: ; preds = %460
br label %465
463: ; preds = %284, %281, %278, %275
%464 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.15, i64 0, i64 0), i32 4, i32 3)
br label %465
465: ; preds = %463, %462
br label %466
466: ; preds = %465
br i1 true, label %268, label %467
467: ; preds = %466, %459
br label %496
468: ; preds = %26
%469 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%470 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.16, i64 0, i64 0))
%471 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0))
%472 = call i32 (...) @getchar()
store i32 %472, i32* %21
br label %473
473: ; preds = %476, %468
%474 = call i32 (...) @getchar()
%475 = icmp ne i32 %474, 10
br i1 %475, label %476, label %477
476: ; preds = %473
br label %473
477: ; preds = %473
%478 = load i32, i32* %21
switch i32 %478, label %480 [
i32 121, label %479
i32 89, label %479
]
479: ; preds = %477, %477
store i32 0, i32* %8
br label %481
480: ; preds = %477
store i32 1, i32* %9
br label %481
481: ; preds = %480, %479
br label %496
482: ; preds = %26
%483 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%484 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.18, i64 0, i64 0))
%485 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0))
%486 = call i32 (...) @getchar()
store i32 %486, i32* %21
br label %487
487: ; preds = %490, %482
%488 = call i32 (...) @getchar()
%489 = icmp ne i32 %488, 10
br i1 %489, label %490, label %491
490: ; preds = %487
br label %487
491: ; preds = %487
%492 = load i32, i32* %21
switch i32 %492, label %494 [
i32 121, label %493
i32 89, label %493
]
493: ; preds = %491, %491
store i32 0, i32* %8
br label %495
494: ; preds = %491
store i32 1, i32* %9
br label %495
495: ; preds = %494, %493
br label %496
496: ; preds = %26, %495, %481, %467, %266, %91
br label %497
497: ; preds = %496
%498 = load i32, i32* %9
%499 = icmp eq i32 %498, 0
br i1 %499, label %26, label %500
500: ; preds = %497
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"cls\00"
@.str.1 = [4 x i8] c"\09%d\00"
@.str.2 = [69 x i8] c"\0A---------------------------------- lifes = %4d | left value = %4d \0A\00"
@.str.3 = [4 x i8] c"%d\09\00"
@.str.4 = [3 x i8] c"*\09\00"
@.str.6 = [50 x i8] c"\C3\8A\C3\A4\C3\88\C3\AB\C3\83\C3\BC\C3\81\C3\AE(q:\C3\8D\C3\8B\C2\B3\C3\B6, o:\C2\B4\C3\B2\C2\BF\C2\AA\C2\B8\C3\87\C3\97\C3\93):\00"
@.str.7 = [47 x i8] c"\C3\8A\C3\A4\C3\88\C3\AB\C2\B4\C3\B2\C2\BF\C2\AA\C2\B8\C3\87\C3\97\C3\93\C2\B5\C3\84\C2\B5\C2\A5\C3\94\C2\AA: row,col:\00"
@.str.8 = [6 x i8] c"%d,%d\00"
@.str.11 = [67 x i8] c"\C3\87\C3\AB\C3\8A\C3\A4\C3\88\C3\AB\C2\B5\C3\9A\C2\B6\C3\BE\C2\B8\C3\B6\C2\B5\C2\A5\C3\94\C2\AA\C2\B5\C3\84\C3\90\C3\90\C2\A1\C2\A2\C3\81\C3\90\C3\97\C3\B8\C2\B1\C3\AA: row,col:\00"
@.str.17 = [19 x i8] c"\C3\96\C3\98\C3\8D\C3\A6\C3\82\C3\B0?(y/n)\00"
@str = [14 x i8] c"YOU LOSE!!!!!\00"
@str.19 = [13 x i8] c"YOU WIN!!!!!\00"
@str.20 = [41 x i8] c"\C3\90\C3\90\C2\A1\C2\A2\C3\81\C3\90\C3\97\C3\B8\C2\B1\C3\AA\C3\8A\C3\A4\C3\88\C3\AB\C2\B4\C3\AD\C3\8E\C3\B3\C2\A1\C2\A3\00"
@str.22 = [21 x i8] c"\C3\8F\C3\BB\C2\B3\C3\BD\C3\8A\C2\A7\C2\B0\C3\9C\C2\A1\C2\A3\00"
@str.23 = [27 x i8] c"\C2\B0\C2\B4 <enter> \C2\BC\C3\8C\C3\90\C3\B8\C2\A1\C2\A3 \00"
@str.24 = [44 x i8] c"\C3\92\C3\91\C3\8F\C3\BB\C2\B3\C3\BD\C2\A1\C2\A3 \C2\B0\C2\B4 <enter> \C2\BC\C3\8C\C3\90\C3\B8\C2\A1\C2\A3 \00"
@str.25 = [33 x i8] c"\C3\90\C3\90\C2\A1\C2\A2\C3\81\C3\90\C3\97\C3\B8\C2\B1\C3\AA\C2\B4\C3\AD\C3\8E\C3\B3\C2\A1\C2\A3\00"
@str.26 = [33 x i8] c"\C3\92\C3\91\C2\B4\C3\B2\C2\BF\C2\AA\C2\BB\C3\B2\C3\92\C3\91\C3\8F\C3\BB\C2\B3\C3\BD\C2\A1\C2\A3\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x [3 x i32]]
%4 = alloca [4 x [3 x i32]]
%5 = bitcast [4 x [3 x i32]]* %4 to i8*
%6 = alloca i32
%7 = alloca i32
%8 = bitcast [4 x [3 x i32]]* %3 to i8*
%9 = bitcast i32* %6 to i8*
%10 = bitcast i32* %7 to i8*
br label %11
11: ; preds = %20, %2
%12 = phi i32 [ 0, %2 ], [ %21, %20 ]
%13 = phi i32 [ undef, %2 ], [ %22, %20 ]
%14 = phi i32 [ undef, %2 ], [ %23, %20 ]
%15 = phi i32 [ 0, %2 ], [ %24, %20 ]
%16 = phi i32 [ 0, %2 ], [ %25, %20 ]
switch i32 %12, label %20 [
i32 0, label %17
i32 1, label %52
i32 2, label %157
i32 3, label %260
i32 4, label %269
]
17: ; preds = %11, %49
%18 = phi i32 [ %50, %49 ], [ 1, %11 ]
br label %26
19: ; preds = %49
store i32 4, i32* %6
store i32 3, i32* %7
br label %20
20: ; preds = %149, %19, %277, %277, %268, %268, %11, %92, %241, %253
%21 = phi i32 [ %12, %11 ], [ %246, %241 ], [ %256, %253 ], [ 1, %92 ], [ 0, %268 ], [ 0, %268 ], [ 0, %277 ], [ 0, %277 ], [ 1, %19 ], [ 2, %149 ]
%22 = phi i32 [ %13, %11 ], [ %244, %241 ], [ %13, %253 ], [ %13, %92 ], [ %13, %268 ], [ %13, %268 ], [ %13, %277 ], [ %13, %277 ], [ 6, %19 ], [ %13, %149 ]
%23 = phi i32 [ %14, %11 ], [ %14, %241 ], [ %254, %253 ], [ %14, %92 ], [ %14, %268 ], [ %14, %268 ], [ %14, %277 ], [ %14, %277 ], [ 5, %19 ], [ %14, %149 ]
%24 = phi i32 [ %15, %11 ], [ %15, %241 ], [ %15, %253 ], [ %15, %92 ], [ %15, %268 ], [ %15, %268 ], [ %15, %277 ], [ %15, %277 ], [ 0, %19 ], [ %101, %149 ]
%25 = phi i32 [ %16, %11 ], [ %16, %241 ], [ %16, %253 ], [ %16, %92 ], [ %16, %268 ], [ %16, %268 ], [ %16, %277 ], [ %16, %277 ], [ 0, %19 ], [ %104, %149 ]
br label %11
26: ; preds = %17, %26
%27 = call i32 (...) @rand()
%28 = srem i32 %27, 4
store i32 %28, i32* %6
%29 = call i32 (...) @rand()
%30 = srem i32 %29, 3
store i32 %30, i32* %7
%31 = load i32, i32* %6
%32 = sext i32 %31 to i64
%33 = sext i32 %30 to i64
%34 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %3, i64 0, i64 %32, i64 %33
%35 = load i32, i32* %34
%36 = icmp eq i32 %35, 0
br i1 %36, label %37, label %26
37: ; preds = %26
store i32 %18, i32* %34
br label %38
38: ; preds = %38, %37
%39 = call i32 (...) @rand()
%40 = srem i32 %39, 4
store i32 %40, i32* %6
%41 = call i32 (...) @rand()
%42 = srem i32 %41, 3
store i32 %42, i32* %7
%43 = load i32, i32* %6
%44 = sext i32 %43 to i64
%45 = sext i32 %42 to i64
%46 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %3, i64 0, i64 %44, i64 %45
%47 = load i32, i32* %46
%48 = icmp eq i32 %47, 0
br i1 %48, label %49, label %38
49: ; preds = %38
store i32 %18, i32* %46
%50 = add nuw nsw i32 %18, 1
%51 = icmp eq i32 %50, 7
br i1 %51, label %19, label %17
52: ; preds = %11
%53 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 1)
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 2)
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %14, i32 %13)
store i32 1, i32* %6
br label %58
58: ; preds = %52, %81
%59 = phi i32 [ 1, %52 ], [ %84, %81 ]
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %59)
store i32 1, i32* %7
br label %61
61: ; preds = %58, %77
%62 = phi i32 [ 1, %58 ], [ %79, %77 ]
%63 = load i32, i32* %6
%64 = add nsw i32 %63, -1
%65 = sext i32 %64 to i64
%66 = add nsw i32 %62, -1
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %4, i64 0, i64 %65, i64 %67
%69 = load i32, i32* %68
%70 = icmp eq i32 %69, 0
br i1 %70, label %75, label %71
71: ; preds = %61
%72 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %3, i64 0, i64 %65, i64 %67
%73 = load i32, i32* %72
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %73)
br label %77
75: ; preds = %61
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %77
77: ; preds = %71, %75
%78 = load i32, i32* %7
%79 = add nsw i32 %78, 1
store i32 %79, i32* %7
%80 = icmp slt i32 %78, 3
br i1 %80, label %61, label %81
81: ; preds = %77
%82 = call i32 @putchar(i32 10)
%83 = load i32, i32* %6
%84 = add nsw i32 %83, 1
store i32 %84, i32* %6
%85 = icmp slt i32 %83, 4
br i1 %85, label %58, label %86
86: ; preds = %81
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
%88 = call i32 (...) @getchar()
br label %89
89: ; preds = %89, %86
%90 = call i32 (...) @getchar()
%91 = icmp eq i32 %90, 10
br i1 %91, label %92, label %89
92: ; preds = %89
switch i32 %88, label %20 [
i32 113, label %278
i32 81, label %278
i32 111, label %93
i32 79, label %93
]
93: ; preds = %92, %92
br label %94
94: ; preds = %93, %154
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0))
%96 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32* %6, i32* %7)
br label %97
97: ; preds = %97, %94
%98 = call i32 (...) @getchar()
%99 = icmp eq i32 %98, 10
br i1 %99, label %100, label %97
100: ; preds = %97
%101 = load i32, i32* %6
%102 = add i32 %101, -1
%103 = icmp ult i32 %102, 4
%104 = load i32, i32* %7
%105 = icmp sgt i32 %104, 0
%106 = select i1 %103, i1 %105, i1 false
%107 = icmp slt i32 %104, 4
%108 = select i1 %106, i1 %107, i1 false
br i1 %108, label %109, label %154
109: ; preds = %100
%110 = zext i32 %102 to i64
%111 = add nsw i32 %104, -1
%112 = zext i32 %111 to i64
%113 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %3, i64 0, i64 %110, i64 %112
%114 = load i32, i32* %113
%115 = icmp sgt i32 %114, 0
br i1 %115, label %116, label %154
116: ; preds = %109
%117 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%118 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 1)
%119 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 2)
%120 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%121 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %14, i32 %13)
store i32 1, i32* %6
br label %122
122: ; preds = %116, %149
%123 = phi i32 [ 1, %116 ], [ %152, %149 ]
%124 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %123)
store i32 1, i32* %7
br label %125
125: ; preds = %122, %145
%126 = phi i32 [ 1, %122 ], [ %147, %145 ]
%127 = load i32, i32* %6
%128 = add nsw i32 %127, -1
%129 = sext i32 %128 to i64
%130 = add nsw i32 %126, -1
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %4, i64 0, i64 %129, i64 %131
%133 = load i32, i32* %132
%134 = icmp eq i32 %133, 0
br i1 %134, label %135, label %139
135: ; preds = %125
%136 = icmp eq i32 %127, %101
%137 = icmp eq i32 %126, %104
%138 = select i1 %136, i1 %137, i1 false
br i1 %138, label %139, label %143
139: ; preds = %135, %125
%140 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %3, i64 0, i64 %129, i64 %131
%141 = load i32, i32* %140
%142 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %141)
br label %145
143: ; preds = %135
%144 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %145
145: ; preds = %139, %143
%146 = load i32, i32* %7
%147 = add nsw i32 %146, 1
store i32 %147, i32* %7
%148 = icmp slt i32 %146, 3
br i1 %148, label %125, label %149
149: ; preds = %145
%150 = call i32 @putchar(i32 10)
%151 = load i32, i32* %6
%152 = add nsw i32 %151, 1
store i32 %152, i32* %6
%153 = icmp slt i32 %151, 4
br i1 %153, label %122, label %20
154: ; preds = %100, %109
%155 = phi i8* [ getelementptr inbounds ([33 x i8], [33 x i8]* @str.26, i64 0, i64 0), %109 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @str.25, i64 0, i64 0), %100 ]
%156 = call i32 @puts(i8* dereferenceable(1) %155)
br label %94
157: ; preds = %11, %257
%158 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str.11, i64 0, i64 0))
%159 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32* %6, i32* %7)
br label %160
160: ; preds = %160, %157
%161 = call i32 (...) @getchar()
%162 = icmp eq i32 %161, 10
br i1 %162, label %163, label %160
163: ; preds = %160
%164 = load i32, i32* %6
%165 = add i32 %164, -1
%166 = icmp ult i32 %165, 4
%167 = load i32, i32* %7
%168 = icmp sgt i32 %167, 0
%169 = select i1 %166, i1 %168, i1 false
%170 = icmp slt i32 %167, 4
%171 = select i1 %169, i1 %170, i1 false
br i1 %171, label %172, label %257
172: ; preds = %163
%173 = zext i32 %165 to i64
%174 = add nsw i32 %167, -1
%175 = zext i32 %174 to i64
%176 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %3, i64 0, i64 %173, i64 %175
%177 = load i32, i32* %176
%178 = icmp sgt i32 %177, 0
br i1 %178, label %179, label %257
179: ; preds = %172
%180 = icmp eq i32 %164, %15
%181 = icmp eq i32 %167, %16
%182 = select i1 %180, i1 %181, i1 false
br i1 %182, label %257, label %183
183: ; preds = %179
%184 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 1)
%185 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 2)
%186 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%187 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %14, i32 %13)
store i32 1, i32* %6
br label %188
188: ; preds = %183, %219
%189 = phi i32 [ 1, %183 ], [ %222, %219 ]
%190 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %189)
store i32 1, i32* %7
br label %191
191: ; preds = %188, %215
%192 = phi i32 [ 1, %188 ], [ %217, %215 ]
%193 = load i32, i32* %6
%194 = add nsw i32 %193, -1
%195 = sext i32 %194 to i64
%196 = add nsw i32 %192, -1
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %4, i64 0, i64 %195, i64 %197
%199 = load i32, i32* %198
%200 = icmp eq i32 %199, 0
br i1 %200, label %201, label %209
201: ; preds = %191
%202 = icmp eq i32 %193, %15
%203 = icmp eq i32 %192, %16
%204 = select i1 %202, i1 %203, i1 false
br i1 %204, label %209, label %205
205: ; preds = %201
%206 = icmp eq i32 %193, %164
%207 = icmp eq i32 %192, %167
%208 = select i1 %206, i1 %207, i1 false
br i1 %208, label %209, label %213
209: ; preds = %205, %201, %191
%210 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %3, i64 0, i64 %195, i64 %197
%211 = load i32, i32* %210
%212 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %211)
br label %215
213: ; preds = %205
%214 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %215
215: ; preds = %209, %213
%216 = load i32, i32* %7
%217 = add nsw i32 %216, 1
store i32 %217, i32* %7
%218 = icmp slt i32 %216, 3
br i1 %218, label %191, label %219
219: ; preds = %215
%220 = call i32 @putchar(i32 10)
%221 = load i32, i32* %6
%222 = add nsw i32 %221, 1
store i32 %222, i32* %6
%223 = icmp slt i32 %221, 4
br i1 %223, label %188, label %224
224: ; preds = %219
%225 = add nsw i32 %15, -1
%226 = sext i32 %225 to i64
%227 = add nsw i32 %16, -1
%228 = sext i32 %227 to i64
%229 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %3, i64 0, i64 %226, i64 %228
%230 = load i32, i32* %229
%231 = sext i32 %165 to i64
%232 = sext i32 %174 to i64
%233 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %3, i64 0, i64 %231, i64 %232
%234 = load i32, i32* %233
%235 = icmp eq i32 %230, %234
br i1 %235, label %236, label %247
236: ; preds = %224
%237 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.24, i64 0, i64 0))
br label %238
238: ; preds = %238, %236
%239 = call i32 (...) @getchar()
%240 = icmp eq i32 %239, 10
br i1 %240, label %241, label %238
241: ; preds = %238
store i32 0, i32* %229
%242 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %4, i64 0, i64 %226, i64 %228
store i32 1, i32* %242
store i32 0, i32* %233
%243 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %4, i64 0, i64 %231, i64 %232
store i32 1, i32* %243
%244 = add nsw i32 %13, -1
%245 = icmp eq i32 %244, 0
%246 = select i1 %245, i32 3, i32 1
br label %20
247: ; preds = %224
%248 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.22, i64 0, i64 0))
%249 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.23, i64 0, i64 0))
br label %250
250: ; preds = %250, %247
%251 = call i32 (...) @getchar()
%252 = icmp eq i32 %251, 10
br i1 %252, label %253, label %250
253: ; preds = %250
%254 = add nsw i32 %14, -1
%255 = icmp eq i32 %254, 0
%256 = select i1 %255, i32 4, i32 1
br label %20
257: ; preds = %163, %172, %179
%258 = phi i8* [ getelementptr inbounds ([33 x i8], [33 x i8]* @str.26, i64 0, i64 0), %179 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @str.26, i64 0, i64 0), %172 ], [ getelementptr inbounds ([41 x i8], [41 x i8]* @str.20, i64 0, i64 0), %163 ]
%259 = call i32 @puts(i8* dereferenceable(1) %258)
br label %157
260: ; preds = %11
%261 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%262 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.19, i64 0, i64 0))
%263 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0))
%264 = call i32 (...) @getchar()
br label %265
265: ; preds = %265, %260
%266 = call i32 (...) @getchar()
%267 = icmp eq i32 %266, 10
br i1 %267, label %268, label %265
268: ; preds = %265
switch i32 %264, label %278 [
i32 121, label %20
i32 89, label %20
]
269: ; preds = %11
%270 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%271 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%272 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0))
%273 = call i32 (...) @getchar()
br label %274
274: ; preds = %274, %269
%275 = call i32 (...) @getchar()
%276 = icmp eq i32 %275, 10
br i1 %276, label %277, label %274
277: ; preds = %274
switch i32 %273, label %278 [
i32 121, label %20
i32 89, label %20
]
278: ; preds = %277, %268, %92, %92
ret i32 0
}