#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 *, ...);
int /*<<< orphan*/ system(char *);
void display(char jogada[3][3]) {
  system("clear");
  printf("   1   2   3   Y\n");
  printf(" 1 %c | %c | %c \n", jogada[0][0], jogada[0][1], jogada[0][2]);
  printf("  ---|---|--- \n ");
  printf("2 %c | %c | %c \n", jogada[1][0], jogada[1][1], jogada[1][2]);
  printf("  ---|---|--- \n ");
  printf("3 %c | %c | %c \n", jogada[2][0], jogada[2][1], jogada[2][2]);
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <system@plt>
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%esi
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%edx
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%ecx
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
movsbl 0x3(%rax),%esi
mov    -0x8(%rbp),%rax
movsbl 0x4(%rax),%edx
mov    -0x8(%rbp),%rax
movsbl 0x5(%rax),%ecx
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
movsbl 0x6(%rax),%esi
mov    -0x8(%rbp),%rax
movsbl 0x7(%rax),%edx
mov    -0x8(%rbp),%rax
movsbl 0x8(%rax),%ecx
lea    0xe80(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xec2(%rip),%rdi
call   1040 <system@plt>
lea    0xf01(%rip),%rdi
call   1030 <puts@plt>
movsbl (%rbx),%esi
movsbl 0x1(%rbx),%edx
movsbl 0x2(%rbx),%ecx
lea    0xea5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xea9(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x3(%rbx),%esi
movsbl 0x4(%rbx),%edx
movsbl 0x5(%rbx),%ecx
lea    0xe9d(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x6(%rbx),%esi
movsbl 0x7(%rbx),%edx
movsbl 0x8(%rbx),%ecx
lea    0xe8a(%rip),%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [18 x i8] c" 1 2 3 Y\0A\00"
@.str.2 = [18 x i8] c" 1 %c | %c | %c \0A\00"
@.str.3 = [17 x i8] c" ---|---|--- \0A \00"
@.str.4 = [17 x i8] c"2 %c | %c | %c \0A\00"
@.str.5 = [17 x i8] c"3 %c | %c | %c \0A\00"
define void @display([3 x i8]* %0) {
%2 = alloca [3 x i8]*
store [3 x i8]* %0, [3 x i8]** %2
%3 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%5 = load [3 x i8]*, [3 x i8]** %2
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0
%7 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = load [3 x i8]*, [3 x i8]** %2
%11 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0
%12 = getelementptr inbounds [3 x i8], [3 x i8]* %11, i64 0, i64 1
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = load [3 x i8]*, [3 x i8]** %2
%16 = getelementptr inbounds [3 x i8], [3 x i8]* %15, i64 0
%17 = getelementptr inbounds [3 x i8], [3 x i8]* %16, i64 0, i64 2
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %14, i32 %19)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%22 = load [3 x i8]*, [3 x i8]** %2
%23 = getelementptr inbounds [3 x i8], [3 x i8]* %22, i64 1
%24 = getelementptr inbounds [3 x i8], [3 x i8]* %23, i64 0, i64 0
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = load [3 x i8]*, [3 x i8]** %2
%28 = getelementptr inbounds [3 x i8], [3 x i8]* %27, i64 1
%29 = getelementptr inbounds [3 x i8], [3 x i8]* %28, i64 0, i64 1
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = load [3 x i8]*, [3 x i8]** %2
%33 = getelementptr inbounds [3 x i8], [3 x i8]* %32, i64 1
%34 = getelementptr inbounds [3 x i8], [3 x i8]* %33, i64 0, i64 2
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %26, i32 %31, i32 %36)
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%39 = load [3 x i8]*, [3 x i8]** %2
%40 = getelementptr inbounds [3 x i8], [3 x i8]* %39, i64 2
%41 = getelementptr inbounds [3 x i8], [3 x i8]* %40, i64 0, i64 0
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = load [3 x i8]*, [3 x i8]** %2
%45 = getelementptr inbounds [3 x i8], [3 x i8]* %44, i64 2
%46 = getelementptr inbounds [3 x i8], [3 x i8]* %45, i64 0, i64 1
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = load [3 x i8]*, [3 x i8]** %2
%50 = getelementptr inbounds [3 x i8], [3 x i8]* %49, i64 2
%51 = getelementptr inbounds [3 x i8], [3 x i8]* %50, i64 0, i64 2
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 %43, i32 %48, i32 %53)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.2 = [18 x i8] c" 1 %c | %c | %c \0A\00"
@.str.3 = [17 x i8] c" ---|---|--- \0A \00"
@.str.4 = [17 x i8] c"2 %c | %c | %c \0A\00"
@.str.5 = [17 x i8] c"3 %c | %c | %c \0A\00"
@str = [17 x i8] c" 1 2 3 Y\00"
define void @display([3 x i8]* nocapture %0) {
%2 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 0, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 0, i64 1
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 0, i64 2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %9, i32 %12)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%15 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 1, i64 0
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 1, i64 1
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 1, i64 2
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %17, i32 %20, i32 %23)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%26 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 2, i64 0
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 2, i64 1
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = getelementptr inbounds [3 x i8], [3 x i8]* %0, i64 2, i64 2
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 %28, i32 %31, i32 %34)
ret void
}