#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*/ scanf(char *, char *);
int /*<<< orphan*/ system(char *);
void Apresentacao(void) {
  char enter;
  printf("Bem-vindo ao Jogo da Velha:\n");
  printf("O jogador comeca!!! \nEscolha se quer ser 'X' ou 'O'\nPronto "
         "p/comecar...");
  printf("Aperte ENTER p/ iniciar...");
  scanf("%c", &enter);
  if (enter == '\n') {
    system("cls");
  }
}


x86 assembly (clang, -O0):
<Apresentacao>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
lea    0xed2(%rip),%rdi
call   1040 <printf@plt>
lea    0xf0e(%rip),%rdi
call   1040 <printf@plt>
lea    0xf1d(%rip),%rdi
lea    -0x1(%rbp),%rsi
call   1050 <scanf@plt>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jne    1185 <Apresentacao+0x55>
lea    0xf03(%rip),%rdi
call   1030 <system@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Apresentacao>:
push   %rax
lea    0xf22(%rip),%rdi
call   1030 <puts@plt>
lea    0xeac(%rip),%rdi
call   1050 <printf@plt>
lea    0xee8(%rip),%rdi
call   1050 <printf@plt>
lea    0xef7(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1060 <scanf@plt>
cmpb   $0xa,0x7(%rsp)
jne    1189 <Apresentacao+0x49>
lea    0xee2(%rip),%rdi
call   1040 <system@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Bem-vindo ao Jogo da Velha:\0A\00"
@.str.1 = [72 x i8] c"O jogador comeca!!! \0AEscolha se quer ser 'X' ou 'O'\0APronto p/comecar...\00"
@.str.2 = [27 x i8] c"Aperte ENTER p/ iniciar...\00"
@.str.3 = [3 x i8] c"%c\00"
@.str.4 = [4 x i8] c"cls\00"
define void @Apresentacao() {
%1 = alloca i8
%2 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %1)
%6 = load i8, i8* %1
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 10
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
br label %11
11: ; preds = %9, %0
ret void
}

LLVM IR (-O2):
@.str.1 = [72 x i8] c"O jogador comeca!!! \0AEscolha se quer ser 'X' ou 'O'\0APronto p/comecar...\00"
@.str.2 = [27 x i8] c"Aperte ENTER p/ iniciar...\00"
@.str.3 = [3 x i8] c"%c\00"
@.str.4 = [4 x i8] c"cls\00"
@str = [28 x i8] c"Bem-vindo ao Jogo da Velha:\00"
define void @Apresentacao() {
%1 = alloca i8
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %1)
%6 = load i8, i8* %1
%7 = icmp eq i8 %6, 10
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
br label %10
10: ; preds = %8, %0
ret void
}