#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*/ printf(char *, ...);
void Tela(int P1Tela[6][8], int P2Tela[6][8]) {
  int i, j;
  printf(
      " ____        _        _ _             _   _                  _\n| __ )  "
      "__ _| |_ __ _| | |__   __ _  | \\ | | __ ___   ____ _| |\n| \\_ \\ / _` "
      "| __/ _` | | '_ \\ / _` | |  \\| |/ _` \\ \\ / / _` | |\n| |_) | (_| | "
      "|_ (_| | | | | | (_| | | |\\  | (_| |\\ V / (_| | |\n|____/ "
      "\\__,_|\\__\\__,_|_|_| |_|\\__,_| |_| \\_|\\__,_| \\_/ \\__,_|_|\n");
  printf("\n        JOGADOR 1         JOGADOR 2\n     ");
  for (j = 0; j < 8; j++) {
    printf("%d ", j + 1);
  }
  printf("  ");
  for (j = 0; j < 8; j++) {
    printf("%d ", j + 1);
  }
  printf("\n");
  printf("   O-----------------O-----------------O\n");
  for (i = 0; i < 6; i++) {
    printf("   |\t\t     |\t\t       |\n");
    printf("  %d| ", i + 1);
    for (j = 0; j < 8; j++) {
      printf("%d ", P1Tela[i][j]);
    }
    printf("| ", i + 1);
    for (j = 0; j < 8; j++) {
      printf("%d ", P2Tela[i][j]);
    }
    printf("|%d", i + 1);
    if (i == 0) {
      printf("       INDICE");
    }
    if (i == 1) {
      printf("   0=Nao Descorberto");
    }
    if (i == 2) {
      printf("   2=Submarino");
    }
    if (i == 3) {
      printf("   4=Encouracado");
    }
    if (i == 4) {
      printf("   X=Agua");
    }
    printf("\n");
  }
  printf("   |\t\t     |\t\t       |\n");
  printf("   O-----------------O-----------------O");
  printf("\n     ");
  for (j = 0; j < 8; j++) {
    printf("%d ", j + 1);
  }
  printf("  ");
  for (j = 0; j < 8; j++) {
    printf("%d ", j + 1);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<Tela>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x100b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x8,-0x18(%rbp)
jge    116f <Tela+0x5f>
mov    -0x18(%rbp),%esi
add    $0x1,%esi
lea    0x1011(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1143 <Tela+0x33>
lea    0xff2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x8,-0x18(%rbp)
jge    11b0 <Tela+0xa0>
mov    -0x18(%rbp),%esi
add    $0x1,%esi
lea    0xfd0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1184 <Tela+0x74>
lea    0xfe0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x6,-0x14(%rbp)
jge    1341 <Tela+0x231>
lea    0xfb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
add    $0x1,%esi
lea    0xfb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x8,-0x18(%rbp)
jge    1242 <Tela+0x132>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xf3e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1206 <Tela+0xf6>
mov    -0x14(%rbp),%esi
add    $0x1,%esi
lea    0xf66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x8,-0x18(%rbp)
jge    1299 <Tela+0x189>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xee7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    125d <Tela+0x14d>
mov    -0x14(%rbp),%esi
add    $0x1,%esi
lea    0xf12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x14(%rbp)
jne    12c5 <Tela+0x1b5>
lea    0xefe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x1,-0x14(%rbp)
jne    12dd <Tela+0x1cd>
lea    0xef4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x2,-0x14(%rbp)
jne    12f5 <Tela+0x1e5>
lea    0xef1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x3,-0x14(%rbp)
jne    130d <Tela+0x1fd>
lea    0xee8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x4,-0x14(%rbp)
jne    1325 <Tela+0x215>
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11d3 <Tela+0xc3>
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe00(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x8,-0x18(%rbp)
jge    139e <Tela+0x28e>
mov    -0x18(%rbp),%esi
add    $0x1,%esi
lea    0xde2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1372 <Tela+0x262>
lea    0xdc3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x8,-0x18(%rbp)
jge    13df <Tela+0x2cf>
mov    -0x18(%rbp),%esi
add    $0x1,%esi
lea    0xda1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    13b3 <Tela+0x2a3>
lea    0xdb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Tela>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
lea    0xf3f(%rip),%rdi
call   1040 <puts@plt>
lea    0xeac(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec9(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe47(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf55(%rip),%rdi
call   1040 <puts@plt>
xor    %ebp,%ebp
xor    %r13d,%r13d
jmp    1298 <Tela+0x168>
nopl   (%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x4,%rbp
cmp    $0x6,%r13
je     13f1 <Tela+0x2c1>
mov    %r13,%r12
lea    0xf4d(%rip),%rdi
call   1040 <puts@plt>
add    $0x1,%r13
lea    0xd7d(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r15,%rbp,8),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4(%r15,%rbp,8),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%r15,%rbp,8),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%r15,%rbp,8),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%r15,%rbp,8),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%r15,%rbp,8),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x18(%r15,%rbp,8),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x1c(%r15,%rbp,8),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xcf9(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r14,%rbp,8),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x4(%r14,%rbp,8),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x8(%r14,%rbp,8),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%r14,%rbp,8),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x10(%r14,%rbp,8),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x14(%r14,%rbp,8),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x18(%r14,%rbp,8),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x1c(%r14,%rbp,8),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc74(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    $0x4,%r12d
ja     1280 <Tela+0x150>
lea    0xe2b(%rip),%rax
movslq 0x0(%rbp,%rax,1),%rdi
add    %rax,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1280 <Tela+0x150>
lea    0xdf7(%rip),%rdi
call   1040 <puts@plt>
lea    0xdc2(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc12(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc0b(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xb89(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str.1 = [43 x i8] c"\0A JOGADOR 1 JOGADOR 2\0A \00"
@.str.2 = [4 x i8] c"%d \00"
@.str.3 = [3 x i8] c" \00"
@.str.7 = [7 x i8] c" %d| \00"
@.str.8 = [3 x i8] c"| \00"
@.str.9 = [4 x i8] c"|%d\00"
@.str.10 = [14 x i8] c" INDICE\00"
@.str.11 = [21 x i8] c" 0=Nao Descorberto\00"
@.str.12 = [15 x i8] c" 2=Submarino\00"
@.str.13 = [17 x i8] c" 4=Encouracado\00"
@.str.14 = [10 x i8] c" X=Agua\00"
@.str.16 = [7 x i8] c"\0A \00"
@str = [319 x i8] c" ____ _ _ _ _ _ _\0A| __ ) __ _| |_ __ _| | |__ __ _ | \\ | | __ ___ ____ _| |\0A| \\_ \\ / _` | __/ _` | | '_ \\ / _` | | \\| |/ _` \\ \\ / / _` | |\0A| |_) | (_| | |_ (_| | | | | | (_| | | |\\ | (_| |\\ V / (_| | |\0A|____/ \\__,_|\\__\\__,_|_|_| |_|\\__,_| |_| \\_|\\__,_| \\_/ \\__,_|_|\00"
@str.17 = [41 x i8] c" O-----------------O-----------------O\00"
@str.19 = [23 x i8] c" |\09\09 |\09\09 |\00"
@reltable.Tela = [5 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.10 to i64), i64 ptrtoint ([5 x i32]* @reltable.Tela to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.11 to i64), i64 ptrtoint ([5 x i32]* @reltable.Tela to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.12 to i64), i64 ptrtoint ([5 x i32]* @reltable.Tela to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.13 to i64), i64 ptrtoint ([5 x i32]* @reltable.Tela to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.14 to i64), i64 ptrtoint ([5 x i32]* @reltable.Tela to i64)) to i32)]
define void @Tela([8 x i32]* nocapture %0, [8 x i32]* nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([319 x i8], [319 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 1)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 2)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 3)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 4)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 5)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 6)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 7)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 8)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 1)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 2)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 3)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 4)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 5)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 6)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 7)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 8)
%22 = tail call i32 @putchar(i32 10)
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.17, i64 0, i64 0))
br label %24
24: ; preds = %2, %88
%25 = phi i64 [ 0, %2 ], [ %27, %88 ]
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.19, i64 0, i64 0))
%27 = add nuw nsw i64 %25, 1
%28 = trunc i64 %27 to i32
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i32 %28)
%30 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %25, i64 0
%31 = load i32, i32* %30
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %31)
%33 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %25, i64 1
%34 = load i32, i32* %33
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %34)
%36 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %25, i64 2
%37 = load i32, i32* %36
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %37)
%39 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %25, i64 3
%40 = load i32, i32* %39
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %40)
%42 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %25, i64 4
%43 = load i32, i32* %42
%44 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %43)
%45 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %25, i64 5
%46 = load i32, i32* %45
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %46)
%48 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %25, i64 6
%49 = load i32, i32* %48
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %49)
%51 = getelementptr inbounds [8 x i32], [8 x i32]* %0, i64 %25, i64 7
%52 = load i32, i32* %51
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %52)
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 %28)
%55 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 %25, i64 0
%56 = load i32, i32* %55
%57 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %56)
%58 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 %25, i64 1
%59 = load i32, i32* %58
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %59)
%61 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 %25, i64 2
%62 = load i32, i32* %61
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %62)
%64 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 %25, i64 3
%65 = load i32, i32* %64
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %65)
%67 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 %25, i64 4
%68 = load i32, i32* %67
%69 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %68)
%70 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 %25, i64 5
%71 = load i32, i32* %70
%72 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %71)
%73 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 %25, i64 6
%74 = load i32, i32* %73
%75 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %74)
%76 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 %25, i64 7
%77 = load i32, i32* %76
%78 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %77)
%79 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 %28)
%80 = trunc i64 %25 to i32
%81 = icmp ult i32 %80, 5
br i1 %81, label %82, label %88
82: ; preds = %24
%83 = shl i64 %25, 32
%84 = ashr exact i64 %83, 32
%85 = shl i64 %84, 2
%86 = call i8* @llvm.load.relative.i64(i8* bitcast ([5 x i32]* @reltable.Tela to i8*), i64 %85)
%87 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %86)
br label %88
88: ; preds = %24, %82
%89 = tail call i32 @putchar(i32 10)
%90 = icmp eq i64 %27, 6
br i1 %90, label %91, label %24
91: ; preds = %88
%92 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.19, i64 0, i64 0))
%93 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.17, i64 0, i64 0))
%94 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.16, i64 0, i64 0))
%95 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 1)
%96 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 2)
%97 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 3)
%98 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 4)
%99 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 5)
%100 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 6)
%101 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 7)
%102 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 8)
%103 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%104 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 1)
%105 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 2)
%106 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 3)
%107 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 4)
%108 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 5)
%109 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 6)
%110 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 7)
%111 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 8)
%112 = tail call i32 @putchar(i32 10)
ret void
}