#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 consulta_apelido(char *);
int /*<<< orphan*/ getOut();
int /*<<< orphan*/ play(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ system(char *);
void jogar() {
  char username[15];
  int can_play = 0;
  system("clear");
  printf("+--------------------------------------+\n");
  printf("|                                      |\n");
  printf("|     INFORME O USUÁRIO PARA JOGAR     |\n");
  printf("|                                      |\n");
  printf("+--------------------------------------+\n");
  printf("\nNome de Usuário: ");
  scanf("%s", username);
  can_play = consulta_apelido(username);
  if (can_play != 1)
    getOut();
  if (can_play == 1)
    play(username);
}


x86 assembly (clang, -O0):
<jogar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x14(%rbp)
lea    0xe8a(%rip),%rdi
call   1030 <system@plt>
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
lea    0xe8a(%rip),%rdi
call   1040 <printf@plt>
lea    0xe54(%rip),%rdi
call   1040 <printf@plt>
lea    0xec7(%rip),%rdi
call   1040 <printf@plt>
lea    -0xf(%rbp),%rsi
lea    0xecb(%rip),%rdi
call   1060 <scanf@plt>
lea    -0xf(%rbp),%rdi
call   1080 <consulta_apelido@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
je     11f0 <jogar+0x90>
mov    $0x0,%al
call   1070 <getOut@plt>
cmpl   $0x1,-0x14(%rbp)
jne    1203 <jogar+0xa3>
lea    -0xf(%rbp),%rdi
call   1050 <play@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jogar>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xe82(%rip),%rdi
call   1040 <system@plt>
lea    0xee6(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xeae(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xe75(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xe42(%rip),%rdi
call   1050 <printf@plt>
lea    0xe4a(%rip),%rdi
lea    0x9(%rsp),%rbx
mov    %rbx,%rsi
call   1070 <scanf@plt>
mov    %rbx,%rdi
call   1090 <consulta_apelido@plt>
cmp    $0x1,%eax
jne    11f6 <jogar+0x86>
lea    0x9(%rsp),%rdi
call   1060 <play@plt>
jmp    11fd <jogar+0x8d>
xor    %eax,%eax
call   1080 <getOut@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [42 x i8] c"+--------------------------------------+\0A\00"
@.str.2 = [42 x i8] c"| |\0A\00"
@.str.3 = [43 x i8] c"| INFORME O USU\C3\81RIO PARA JOGAR |\0A\00"
@.str.4 = [20 x i8] c"\0ANome de Usu\C3\A1rio: \00"
@.str.5 = [3 x i8] c"%s\00"
define void @jogar() {
%1 = alloca [15 x i8]
%2 = alloca i32
store i32 0, i32* %2
%3 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%10 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %10)
%12 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%13 = call i32 @consulta_apelido(i8* %12)
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = icmp ne i32 %14, 1
br i1 %15, label %16, label %18
16: ; preds = %0
%17 = call i32 (...) @getOut()
br label %18
18: ; preds = %16, %0
%19 = load i32, i32* %2
%20 = icmp eq i32 %19, 1
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%23 = call i32 @play(i8* %22)
br label %24
24: ; preds = %21, %18
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.4 = [20 x i8] c"\0ANome de Usu\C3\A1rio: \00"
@.str.5 = [3 x i8] c"%s\00"
@str.7 = [42 x i8] c"| INFORME O USU\C3\81RIO PARA JOGAR |\00"
@str.8 = [41 x i8] c"| |\00"
@str.9 = [41 x i8] c"+--------------------------------------+\00"
define void @jogar() {
%1 = alloca [15 x i8]
%2 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.9, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.8, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.7, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.8, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.9, i64 0, i64 0))
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %2)
%11 = call i32 @consulta_apelido(i8* %2)
%12 = icmp eq i32 %11, 1
br i1 %12, label %15, label %13
13: ; preds = %0
%14 = call i32 (...) @getOut()
br label %17
15: ; preds = %0
%16 = call i32 @play(i8* %2)
br label %17
17: ; preds = %13, %15
ret void
}