#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void print_board(int b[8][8]) {
  int i, j;
  int count, endx, endy;
  endx = endy = 0;
  count = 1;
  printf(" ");
  printf(" ");
  for (i = 0; i < 8; i++) {
    printf(" ");
    if (count == 1)
      printf("A");
    else if (count == 2)
      printf("B");
    else if (count == 3)
      printf("C");
    else if (count == 4)
      printf("D");
    else if (count == 5)
      printf("E");
    else if (count == 6)
      printf("F");
    else if (count == 7)
      printf("G");
    else if (count == 8)
      printf("H");
    printf(" ");
    printf(" ");
    count++;
  }
  count = 1;
  printf("\n");
  for (i = 0; i < 8; i++) {
    printf("%d", count++);
    printf(" ");
    printf(" ");
    for (j = 0; j < 8; j++) {
      if (b[i][j] == 1) {
        endx++;
        printf("X");
        printf(" ");
        printf(" ");
        printf(" ");
      } else if (b[i][j] == 2) {
        endy++;
        printf("O");
        printf(" ");
        printf(" ");
        printf(" ");
      } else {
        printf(".");
        printf(" ");
        printf(" ");
        printf(" ");
      }
    }
    printf("\n\n");
  }
  if (endx == 0 || endy == 0) {
    printf("You lost, end of game....\n");
    exit(0);
  }
}


x86 assembly (clang, -O0):
<print_board>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x1,-0x14(%rbp)
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    12b5 <print_board+0x195>
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x1,-0x14(%rbp)
jne    1199 <print_board+0x79>
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1282 <print_board+0x162>
cmpl   $0x2,-0x14(%rbp)
jne    11b6 <print_board+0x96>
lea    0xe5a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    127d <print_board+0x15d>
cmpl   $0x3,-0x14(%rbp)
jne    11d3 <print_board+0xb3>
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1278 <print_board+0x158>
cmpl   $0x4,-0x14(%rbp)
jne    11f0 <print_board+0xd0>
lea    0xe24(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1273 <print_board+0x153>
cmpl   $0x5,-0x14(%rbp)
jne    120d <print_board+0xed>
lea    0xe09(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    126e <print_board+0x14e>
cmpl   $0x6,-0x14(%rbp)
jne    122a <print_board+0x10a>
lea    0xdee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1269 <print_board+0x149>
cmpl   $0x7,-0x14(%rbp)
jne    1247 <print_board+0x127>
lea    0xdd3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1264 <print_board+0x144>
cmpl   $0x8,-0x14(%rbp)
jne    125f <print_board+0x13f>
lea    0xdb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1264 <print_board+0x144>
jmp    1269 <print_board+0x149>
jmp    126e <print_board+0x14e>
jmp    1273 <print_board+0x153>
jmp    1278 <print_board+0x158>
jmp    127d <print_board+0x15d>
jmp    1282 <print_board+0x162>
lea    0xd77(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1164 <print_board+0x44>
movl   $0x1,-0x14(%rbp)
lea    0xd59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    1453 <print_board+0x333>
mov    -0x14(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xd25(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcf7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
cmpl   $0x8,-0x10(%rbp)
jge    1437 <print_board+0x317>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1384 <print_board+0x264>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    0xcc7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xca4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1424 <print_board+0x304>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
cmpl   $0x2,(%rax,%rcx,4)
jne    13e7 <print_board+0x2c7>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
lea    0xc66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc41(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc33(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc25(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    141f <print_board+0x2ff>
lea    0xc2b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc04(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xbf6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xbe8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1424 <print_board+0x304>
jmp    1429 <print_board+0x309>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1317 <print_board+0x1f7>
lea    0xbdd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    12d1 <print_board+0x1b1>
cmpl   $0x0,-0x18(%rbp)
je     1467 <print_board+0x347>
cmpl   $0x0,-0x1c(%rbp)
jne    147c <print_board+0x35c>
lea    0xbb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_board>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r13
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x41,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x42,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x43,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x44,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x45,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x46,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x47,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x48,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%ebp
lea    0xd65(%rip),%r15
xor    %ebx,%ebx
xor    %r12d,%r12d
xor    %r14d,%r14d
jmp    1318 <print_board+0x1d8>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r14d
mov    $0x58,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
mov    %r15,%rdi
call   1040 <puts@plt>
add    $0x20,%rbx
cmp    $0x100,%rbx
je     1596 <print_board+0x456>
lea    0xce1(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0x0(%r13,%rbx,1),%eax
cmp    $0x2,%eax
je     1360 <print_board+0x220>
mov    $0x2e,%edi
cmp    $0x1,%eax
jne    1369 <print_board+0x229>
add    $0x1,%r14d
mov    $0x58,%edi
jmp    1369 <print_board+0x229>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r12d
mov    $0x4f,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0x4(%r13,%rbx,1),%eax
cmp    $0x1,%eax
je     13b0 <print_board+0x270>
mov    $0x2e,%edi
cmp    $0x2,%eax
jne    13b9 <print_board+0x279>
add    $0x1,%r12d
mov    $0x4f,%edi
jmp    13b9 <print_board+0x279>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14d
mov    $0x58,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0x8(%r13,%rbx,1),%eax
cmp    $0x1,%eax
je     1400 <print_board+0x2c0>
mov    $0x2e,%edi
cmp    $0x2,%eax
jne    1409 <print_board+0x2c9>
add    $0x1,%r12d
mov    $0x4f,%edi
jmp    1409 <print_board+0x2c9>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14d
mov    $0x58,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0xc(%r13,%rbx,1),%eax
cmp    $0x1,%eax
je     1450 <print_board+0x310>
mov    $0x2e,%edi
cmp    $0x2,%eax
jne    1459 <print_board+0x319>
add    $0x1,%r12d
mov    $0x4f,%edi
jmp    1459 <print_board+0x319>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14d
mov    $0x58,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0x10(%r13,%rbx,1),%eax
cmp    $0x1,%eax
je     14a0 <print_board+0x360>
mov    $0x2e,%edi
cmp    $0x2,%eax
jne    14a9 <print_board+0x369>
add    $0x1,%r12d
mov    $0x4f,%edi
jmp    14a9 <print_board+0x369>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14d
mov    $0x58,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0x14(%r13,%rbx,1),%eax
cmp    $0x1,%eax
je     14f0 <print_board+0x3b0>
mov    $0x2e,%edi
cmp    $0x2,%eax
jne    14f9 <print_board+0x3b9>
add    $0x1,%r12d
mov    $0x4f,%edi
jmp    14f9 <print_board+0x3b9>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14d
mov    $0x58,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0x18(%r13,%rbx,1),%eax
cmp    $0x1,%eax
je     1540 <print_board+0x400>
mov    $0x2e,%edi
cmp    $0x2,%eax
jne    1549 <print_board+0x409>
add    $0x1,%r12d
mov    $0x4f,%edi
jmp    1549 <print_board+0x409>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14d
mov    $0x58,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    0x1c(%r13,%rbx,1),%eax
cmp    $0x1,%eax
je     12d0 <print_board+0x190>
mov    $0x2e,%edi
cmp    $0x2,%eax
jne    12d9 <print_board+0x199>
add    $0x1,%r12d
mov    $0x4f,%edi
jmp    12d9 <print_board+0x199>
test   %r14d,%r14d
je     15af <print_board+0x46f>
test   %r12d,%r12d
je     15af <print_board+0x46f>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xa4d(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [2 x i8] c"A\00"
@.str.2 = [2 x i8] c"B\00"
@.str.3 = [2 x i8] c"C\00"
@.str.4 = [2 x i8] c"D\00"
@.str.5 = [2 x i8] c"E\00"
@.str.6 = [2 x i8] c"F\00"
@.str.7 = [2 x i8] c"G\00"
@.str.8 = [2 x i8] c"H\00"
@.str.9 = [2 x i8] c"\0A\00"
@.str.10 = [3 x i8] c"%d\00"
@.str.11 = [2 x i8] c"X\00"
@.str.12 = [2 x i8] c"O\00"
@.str.13 = [2 x i8] c".\00"
@.str.14 = [3 x i8] c"\0A\0A\00"
@.str.15 = [27 x i8] c"You lost, end of game....\0A\00"
define void @print_board([8 x i32]* %0) {
%2 = alloca [8 x i32]*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store [8 x i32]* %0, [8 x i32]** %2
store i32 0, i32* %7
store i32 0, i32* %6
store i32 1, i32* %5
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %10
10: ; preds = %66, %1
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 8
br i1 %12, label %13, label %69
13: ; preds = %10
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%15 = load i32, i32* %5
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %61
19: ; preds = %13
%20 = load i32, i32* %5
%21 = icmp eq i32 %20, 2
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %60
24: ; preds = %19
%25 = load i32, i32* %5
%26 = icmp eq i32 %25, 3
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %59
29: ; preds = %24
%30 = load i32, i32* %5
%31 = icmp eq i32 %30, 4
br i1 %31, label %32, label %34
32: ; preds = %29
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %58
34: ; preds = %29
%35 = load i32, i32* %5
%36 = icmp eq i32 %35, 5
br i1 %36, label %37, label %39
37: ; preds = %34
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %57
39: ; preds = %34
%40 = load i32, i32* %5
%41 = icmp eq i32 %40, 6
br i1 %41, label %42, label %44
42: ; preds = %39
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %56
44: ; preds = %39
%45 = load i32, i32* %5
%46 = icmp eq i32 %45, 7
br i1 %46, label %47, label %49
47: ; preds = %44
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %55
49: ; preds = %44
%50 = load i32, i32* %5
%51 = icmp eq i32 %50, 8
br i1 %51, label %52, label %54
52: ; preds = %49
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %54
54: ; preds = %52, %49
br label %55
55: ; preds = %54, %47
br label %56
56: ; preds = %55, %42
br label %57
57: ; preds = %56, %37
br label %58
58: ; preds = %57, %32
br label %59
59: ; preds = %58, %27
br label %60
60: ; preds = %59, %22
br label %61
61: ; preds = %60, %17
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%64 = load i32, i32* %5
%65 = add nsw i32 %64, 1
store i32 %65, i32* %5
br label %66
66: ; preds = %61
%67 = load i32, i32* %3
%68 = add nsw i32 %67, 1
store i32 %68, i32* %3
br label %10
69: ; preds = %10
store i32 1, i32* %5
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %3
br label %71
71: ; preds = %129, %69
%72 = load i32, i32* %3
%73 = icmp slt i32 %72, 8
br i1 %73, label %74, label %132
74: ; preds = %71
%75 = load i32, i32* %5
%76 = add nsw i32 %75, 1
store i32 %76, i32* %5
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32 %75)
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %4
br label %80
80: ; preds = %124, %74
%81 = load i32, i32* %4
%82 = icmp slt i32 %81, 8
br i1 %82, label %83, label %127
83: ; preds = %80
%84 = load [8 x i32]*, [8 x i32]** %2
%85 = load i32, i32* %3
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds [8 x i32], [8 x i32]* %84, i64 %86
%88 = load i32, i32* %4
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [8 x i32], [8 x i32]* %87, i64 0, i64 %89
%91 = load i32, i32* %90
%92 = icmp eq i32 %91, 1
br i1 %92, label %93, label %100
93: ; preds = %83
%94 = load i32, i32* %6
%95 = add nsw i32 %94, 1
store i32 %95, i32* %6
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %123
100: ; preds = %83
%101 = load [8 x i32]*, [8 x i32]** %2
%102 = load i32, i32* %3
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [8 x i32], [8 x i32]* %101, i64 %103
%105 = load i32, i32* %4
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [8 x i32], [8 x i32]* %104, i64 0, i64 %106
%108 = load i32, i32* %107
%109 = icmp eq i32 %108, 2
br i1 %109, label %110, label %117
110: ; preds = %100
%111 = load i32, i32* %7
%112 = add nsw i32 %111, 1
store i32 %112, i32* %7
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%116 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %122
117: ; preds = %100
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %122
122: ; preds = %117, %110
br label %123
123: ; preds = %122, %93
br label %124
124: ; preds = %123
%125 = load i32, i32* %4
%126 = add nsw i32 %125, 1
store i32 %126, i32* %4
br label %80
127: ; preds = %80
%128 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
br label %129
129: ; preds = %127
%130 = load i32, i32* %3
%131 = add nsw i32 %130, 1
store i32 %131, i32* %3
br label %71
132: ; preds = %71
%133 = load i32, i32* %6
%134 = icmp eq i32 %133, 0
br i1 %134, label %138, label %135
135: ; preds = %132
%136 = load i32, i32* %7
%137 = icmp eq i32 %136, 0
br i1 %137, label %138, label %141
138: ; preds = %135, %132
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.15, i64 0, i64 0))
%140 = call i32 @exit(i32 0)
unreachable
141: ; preds = %135
ret void
}

LLVM IR (-O2):
@.str.10 = [3 x i8] c"%d\00"
@str = [26 x i8] c"You lost, end of game....\00"
@str.16 = [2 x i8] c"\0A\00"
define void @print_board([8 x i32]* nocapture %0) {
%2 = tail call i32 @putchar(i32 32)
%3 = tail call i32 @putchar(i32 32)
%4 = tail call i32 @putchar(i32 32)
%5 = tail call i32 @putchar(i32 65)
%6 = tail call i32 @putchar(i32 32)
%7 = tail call i32 @putchar(i32 32)
%8 = tail call i32 @putchar(i32 32)
%9 = tail call i32 @putchar(i32 66)
%10 = tail call i32 @putchar(i32 32)
%11 = tail call i32 @putchar(i32 32)
%12 = tail call i32 @putchar(i32 32)
%13 = tail call i32 @putchar(i32 67)
%14 = tail call i32 @putchar(i32 32)
%15 = tail call i32 @putchar(i32 32)
%16 = tail call i32 @putchar(i32 32)
%17 = tail call i32 @putchar(i32 68)
%18 = tail call i32 @putchar(i32 32)
%19 = tail call i32 @putchar(i32 32)
%20 = tail call i32 @putchar(i32 32)
%21 = tail call i32 @putchar(i32 69)
%22 = tail call i32 @putchar(i32 32)
%23 = tail call i32 @putchar(i32 32)
%24 = tail call i32 @putchar(i32 32)
%25 = tail call i32 @putchar(i32 70)
%26 = tail call i32 @putchar(i32 32)
%27 = tail call i32 @putchar(i32 32)
%28 = tail call i32 @putchar(i32 32)
%29 = tail call i32 @putchar(i32 71)
%30 = tail call i32 @putchar(i32 32)
%31 = tail call i32 @putchar(i32 32)
%32 = tail call i32 @putchar(i32 32)
%33 = tail call i32 @putchar(i32 72)
%34 = tail call i32 @putchar(i32 32)
%35 = tail call i32 @putchar(i32 32)
%36 = tail call i32 @putchar(i32 10)
br label %37
37: ; preds = %1, %149
%38 = phi i64 [ 0, %1 ], [ %159, %149 ]
%39 = phi i32 [ 0, %1 ], [ %152, %149 ]
%40 = phi i32 [ 0, %1 ], [ %151, %149 ]
%41 = phi i32 [ 1, %1 ], [ %157, %149 ]
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32 %41)
%43 = tail call i32 @putchar(i32 32)
%44 = tail call i32 @putchar(i32 32)
%45 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %38, i64 0
%46 = load i32, i32* %45
switch i32 %46, label %51 [
i32 1, label %47
i32 2, label %49
]
47: ; preds = %37
%48 = add nsw i32 %40, 1
br label %51
49: ; preds = %37
%50 = add nsw i32 %39, 1
br label %51
51: ; preds = %37, %47, %49
%52 = phi i32 [ 88, %47 ], [ 79, %49 ], [ 46, %37 ]
%53 = phi i32 [ %48, %47 ], [ %40, %49 ], [ %40, %37 ]
%54 = phi i32 [ %39, %47 ], [ %50, %49 ], [ %39, %37 ]
%55 = tail call i32 @putchar(i32 %52)
%56 = tail call i32 @putchar(i32 32)
%57 = tail call i32 @putchar(i32 32)
%58 = tail call i32 @putchar(i32 32)
%59 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %38, i64 1
%60 = load i32, i32* %59
switch i32 %60, label %65 [
i32 1, label %63
i32 2, label %61
]
61: ; preds = %51
%62 = add nsw i32 %54, 1
br label %65
63: ; preds = %51
%64 = add nsw i32 %53, 1
br label %65
65: ; preds = %63, %61, %51
%66 = phi i32 [ 88, %63 ], [ 79, %61 ], [ 46, %51 ]
%67 = phi i32 [ %64, %63 ], [ %53, %61 ], [ %53, %51 ]
%68 = phi i32 [ %54, %63 ], [ %62, %61 ], [ %54, %51 ]
%69 = tail call i32 @putchar(i32 %66)
%70 = tail call i32 @putchar(i32 32)
%71 = tail call i32 @putchar(i32 32)
%72 = tail call i32 @putchar(i32 32)
%73 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %38, i64 2
%74 = load i32, i32* %73
switch i32 %74, label %79 [
i32 1, label %77
i32 2, label %75
]
75: ; preds = %65
%76 = add nsw i32 %68, 1
br label %79
77: ; preds = %65
%78 = add nsw i32 %67, 1
br label %79
79: ; preds = %77, %75, %65
%80 = phi i32 [ 88, %77 ], [ 79, %75 ], [ 46, %65 ]
%81 = phi i32 [ %78, %77 ], [ %67, %75 ], [ %67, %65 ]
%82 = phi i32 [ %68, %77 ], [ %76, %75 ], [ %68, %65 ]
%83 = tail call i32 @putchar(i32 %80)
%84 = tail call i32 @putchar(i32 32)
%85 = tail call i32 @putchar(i32 32)
%86 = tail call i32 @putchar(i32 32)
%87 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %38, i64 3
%88 = load i32, i32* %87
switch i32 %88, label %93 [
i32 1, label %91
i32 2, label %89
]
89: ; preds = %79
%90 = add nsw i32 %82, 1
br label %93
91: ; preds = %79
%92 = add nsw i32 %81, 1
br label %93
93: ; preds = %91, %89, %79
%94 = phi i32 [ 88, %91 ], [ 79, %89 ], [ 46, %79 ]
%95 = phi i32 [ %92, %91 ], [ %81, %89 ], [ %81, %79 ]
%96 = phi i32 [ %82, %91 ], [ %90, %89 ], [ %82, %79 ]
%97 = tail call i32 @putchar(i32 %94)
%98 = tail call i32 @putchar(i32 32)
%99 = tail call i32 @putchar(i32 32)
%100 = tail call i32 @putchar(i32 32)
%101 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %38, i64 4
%102 = load i32, i32* %101
switch i32 %102, label %107 [
i32 1, label %105
i32 2, label %103
]
103: ; preds = %93
%104 = add nsw i32 %96, 1
br label %107
105: ; preds = %93
%106 = add nsw i32 %95, 1
br label %107
107: ; preds = %105, %103, %93
%108 = phi i32 [ 88, %105 ], [ 79, %103 ], [ 46, %93 ]
%109 = phi i32 [ %106, %105 ], [ %95, %103 ], [ %95, %93 ]
%110 = phi i32 [ %96, %105 ], [ %104, %103 ], [ %96, %93 ]
%111 = tail call i32 @putchar(i32 %108)
%112 = tail call i32 @putchar(i32 32)
%113 = tail call i32 @putchar(i32 32)
%114 = tail call i32 @putchar(i32 32)
%115 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %38, i64 5
%116 = load i32, i32* %115
switch i32 %116, label %121 [
i32 1, label %119
i32 2, label %117
]
117: ; preds = %107
%118 = add nsw i32 %110, 1
br label %121
119: ; preds = %107
%120 = add nsw i32 %109, 1
br label %121
121: ; preds = %119, %117, %107
%122 = phi i32 [ 88, %119 ], [ 79, %117 ], [ 46, %107 ]
%123 = phi i32 [ %120, %119 ], [ %109, %117 ], [ %109, %107 ]
%124 = phi i32 [ %110, %119 ], [ %118, %117 ], [ %110, %107 ]
%125 = tail call i32 @putchar(i32 %122)
%126 = tail call i32 @putchar(i32 32)
%127 = tail call i32 @putchar(i32 32)
%128 = tail call i32 @putchar(i32 32)
%129 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %38, i64 6
%130 = load i32, i32* %129
switch i32 %130, label %135 [
i32 1, label %133
i32 2, label %131
]
131: ; preds = %121
%132 = add nsw i32 %124, 1
br label %135
133: ; preds = %121
%134 = add nsw i32 %123, 1
br label %135
135: ; preds = %133, %131, %121
%136 = phi i32 [ 88, %133 ], [ 79, %131 ], [ 46, %121 ]
%137 = phi i32 [ %134, %133 ], [ %123, %131 ], [ %123, %121 ]
%138 = phi i32 [ %124, %133 ], [ %132, %131 ], [ %124, %121 ]
%139 = tail call i32 @putchar(i32 %136)
%140 = tail call i32 @putchar(i32 32)
%141 = tail call i32 @putchar(i32 32)
%142 = tail call i32 @putchar(i32 32)
%143 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %38, i64 7
%144 = load i32, i32* %143
switch i32 %144, label %149 [
i32 1, label %147
i32 2, label %145
]
145: ; preds = %135
%146 = add nsw i32 %138, 1
br label %149
147: ; preds = %135
%148 = add nsw i32 %137, 1
br label %149
149: ; preds = %147, %145, %135
%150 = phi i32 [ 88, %147 ], [ 79, %145 ], [ 46, %135 ]
%151 = phi i32 [ %148, %147 ], [ %137, %145 ], [ %137, %135 ]
%152 = phi i32 [ %138, %147 ], [ %146, %145 ], [ %138, %135 ]
%153 = tail call i32 @putchar(i32 %150)
%154 = tail call i32 @putchar(i32 32)
%155 = tail call i32 @putchar(i32 32)
%156 = tail call i32 @putchar(i32 32)
%157 = add nuw nsw i32 %41, 1
%158 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.16, i64 0, i64 0))
%159 = add nuw nsw i64 %38, 1
%160 = icmp eq i64 %159, 8
br i1 %160, label %161, label %37
161: ; preds = %149
%162 = icmp eq i32 %151, 0
%163 = icmp eq i32 %152, 0
%164 = select i1 %162, i1 true, i1 %163
br i1 %164, label %165, label %168
165: ; preds = %161
%166 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%167 = tail call i32 @exit(i32 0)
unreachable
168: ; preds = %161
ret void
}