#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*/ mostrar(char **, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int l, c;
  char mesa[3][3] = {{'.', '.', '.'}, {'.', '.', '.'}, {'.', '.', '.'}};
  mostrar(mesa, 3);
  printf("Informe sua jogada:");
  scanf("%d,%d", &l, &c);
  mesa[l][c] = 'X';
  mostrar(mesa, 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x15(%rbp)
mov    0xeb8(%rip),%al
mov    %al,-0xd(%rbp)
lea    -0x15(%rbp),%rdi
mov    $0x3,%esi
call   1050 <mostrar@plt>
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
lea    0xea9(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
movslq -0x8(%rbp),%rcx
lea    -0x15(%rbp),%rax
imul   $0x3,%rcx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
movb   $0x58,(%rax,%rcx,1)
lea    -0x15(%rbp),%rdi
mov    $0x3,%esi
call   1050 <mostrar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movabs $0x2e2e2e2e2e2e2e2e,%rax
2e 2e 2e
mov    %rax,0x10(%rsp)
movb   $0x2e,0x18(%rsp)
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1050 <mostrar@plt>
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
lea    0xea6(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
movslq 0x8(%rsp),%rcx
lea    (%rax,%rax,2),%rax
add    %rsp,%rax
add    $0x10,%rax
movb   $0x58,(%rcx,%rax,1)
mov    %rbx,%rdi
mov    $0x3,%esi
call   1050 <mostrar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.mesa = [3 x [3 x i8]] [[3 x i8] c"...", [3 x i8] c"...", [3 x i8] c"..."]
@.str = [20 x i8] c"Informe sua jogada:\00"
@.str.1 = [6 x i8] c"%d,%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [3 x [3 x i8]]
store i32 0, i32* %1
%5 = bitcast [3 x [3 x i8]]* %4 to i8*
%6 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %4, i64 0, i64 0
%7 = bitcast [3 x i8]* %6 to i8**
%8 = call i32 @mostrar(i8** %7, i32 3)
%9 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%11 = load i32, i32* %2
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %4, i64 0, i64 %12
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [3 x i8], [3 x i8]* %13, i64 0, i64 %15
store i8 88, i8* %16
%17 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %4, i64 0, i64 0
%18 = bitcast [3 x i8]* %17 to i8**
%19 = call i32 @mostrar(i8** %18, i32 3)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Informe sua jogada:\00"
@.str.1 = [6 x i8] c"%d,%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [3 x [3 x i8]]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %3, i64 0, i64 0, i64 0
%7 = bitcast [3 x [3 x i8]]* %3 to i8**
%8 = call i32 @mostrar(i8** %7, i32 3)
%9 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%11 = load i32, i32* %1
%12 = sext i32 %11 to i64
%13 = load i32, i32* %2
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %3, i64 0, i64 %12, i64 %14
store i8 88, i8* %15
%16 = call i32 @mostrar(i8** %7, i32 3)
ret i32 0
}