#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("  %c  |  %c  |  %c  \n", jogada[0][0], jogada[0][1], jogada[0][2]);
  printf("----+----+----\n");
  printf("  %c  |  %c  |  %c \n", jogada[1][0], jogada[1][1], jogada[1][2]);
  printf("----+----+----\n");
  printf("  %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>
mov    -0x8(%rbp),%rax
movsbl (%rax),%esi
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%edx
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%ecx
lea    0xeb0(%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    0xea2(%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    0xe83(%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>
movsbl (%rbx),%esi
movsbl 0x1(%rbx),%edx
movsbl 0x2(%rbx),%ecx
lea    0xeb1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xee2(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
movsbl 0x3(%rbx),%esi
movsbl 0x4(%rbx),%edx
movsbl 0x5(%rbx),%ecx
lea    0xe9e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
movsbl 0x6(%rbx),%esi
movsbl 0x7(%rbx),%edx
movsbl 0x8(%rbx),%ecx
lea    0xe91(%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 = [22 x i8] c" %c | %c | %c \0A\00"
@.str.2 = [16 x i8] c"----+----+----\0A\00"
@.str.3 = [21 x i8] c" %c | %c | %c \0A\00"
@.str.4 = [20 x i8] c" %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 = load [3 x i8]*, [3 x i8]** %2
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = load [3 x i8]*, [3 x i8]** %2
%10 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0
%11 = getelementptr inbounds [3 x i8], [3 x i8]* %10, i64 0, i64 1
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = load [3 x i8]*, [3 x i8]** %2
%15 = getelementptr inbounds [3 x i8], [3 x i8]* %14, i64 0
%16 = getelementptr inbounds [3 x i8], [3 x i8]* %15, i64 0, i64 2
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %13, i32 %18)
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%21 = load [3 x i8]*, [3 x i8]** %2
%22 = getelementptr inbounds [3 x i8], [3 x i8]* %21, i64 1
%23 = getelementptr inbounds [3 x i8], [3 x i8]* %22, i64 0, i64 0
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = load [3 x i8]*, [3 x i8]** %2
%27 = getelementptr inbounds [3 x i8], [3 x i8]* %26, i64 1
%28 = getelementptr inbounds [3 x i8], [3 x i8]* %27, i64 0, i64 1
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = load [3 x i8]*, [3 x i8]** %2
%32 = getelementptr inbounds [3 x i8], [3 x i8]* %31, i64 1
%33 = getelementptr inbounds [3 x i8], [3 x i8]* %32, i64 0, i64 2
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %25, i32 %30, i32 %35)
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%38 = load [3 x i8]*, [3 x i8]** %2
%39 = getelementptr inbounds [3 x i8], [3 x i8]* %38, i64 2
%40 = getelementptr inbounds [3 x i8], [3 x i8]* %39, i64 0, i64 0
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = load [3 x i8]*, [3 x i8]** %2
%44 = getelementptr inbounds [3 x i8], [3 x i8]* %43, i64 2
%45 = getelementptr inbounds [3 x i8], [3 x i8]* %44, i64 0, i64 1
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = load [3 x i8]*, [3 x i8]** %2
%49 = getelementptr inbounds [3 x i8], [3 x i8]* %48, i64 2
%50 = getelementptr inbounds [3 x i8], [3 x i8]* %49, i64 0, i64 2
%51 = load i8, i8* %50
%52 = sext i8 %51 to i32
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i32 %42, i32 %47, i32 %52)
ret void
}

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