#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*/ Configurar();
int /*<<< orphan*/ Jugar();
int /*<<< orphan*/ Menu();
unsigned int elegirOpcion();
int /*<<< orphan*/ printf(char *);
void MenuPrincipal() {
  unsigned int option = 0;
  Menu();
  while (!option) {
    option = elegirOpcion();
    if (option == 1) {
      Jugar();
    } else if (option == 2) {
      printf("Entro en configurar");
      Configurar();
    } else if (option == 3) {
    } else if (option == 4) {
    } else if (option == 5) {
    } else {
      option = 0;
    }
  }
  printf("Termino");
}


x86 assembly (clang, -O0):
<MenuPrincipal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <Menu@plt>
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    117c <MenuPrincipal+0x2c>
jmp    120b <MenuPrincipal+0xbb>
mov    $0x0,%al
call   1070 <elegirOpcion@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    119c <MenuPrincipal+0x4c>
mov    $0x0,%al
call   1040 <Jugar@plt>
jmp    1206 <MenuPrincipal+0xb6>
cmpl   $0x2,-0x4(%rbp)
jne    11be <MenuPrincipal+0x6e>
lea    0xe53(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <Configurar@plt>
jmp    1201 <MenuPrincipal+0xb1>
cmpl   $0x3,-0x4(%rbp)
jne    11cd <MenuPrincipal+0x7d>
jmp    11fc <MenuPrincipal+0xac>
cmpl   $0x4,-0x4(%rbp)
jne    11dc <MenuPrincipal+0x8c>
jmp    11f7 <MenuPrincipal+0xa7>
cmpl   $0x5,-0x4(%rbp)
jne    11eb <MenuPrincipal+0x9b>
jmp    11f2 <MenuPrincipal+0xa2>
movl   $0x0,-0x4(%rbp)
jmp    11f7 <MenuPrincipal+0xa7>
jmp    11fc <MenuPrincipal+0xac>
jmp    1201 <MenuPrincipal+0xb1>
jmp    1206 <MenuPrincipal+0xb6>
jmp    1166 <MenuPrincipal+0x16>
lea    0xe02(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MenuPrincipal>:
push   %rax
xor    %eax,%eax
call   1050 <Menu@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1070 <elegirOpcion@plt>
cmp    $0x2,%eax
je     117b <MenuPrincipal+0x2b>
cmp    $0x1,%eax
je     1190 <MenuPrincipal+0x40>
add    $0xfffffffd,%eax
cmp    $0x2,%eax
ja     1160 <MenuPrincipal+0x10>
jmp    1197 <MenuPrincipal+0x47>
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1060 <Configurar@plt>
jmp    1197 <MenuPrincipal+0x47>
xor    %eax,%eax
call   1040 <Jugar@plt>
lea    0xe76(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Entro en configurar\00"
@.str.1 = [8 x i8] c"Termino\00"
define void @MenuPrincipal() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @Menu()
br label %3
3: ; preds = %36, %0
%4 = load i32, i32* %1
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
br i1 %6, label %7, label %37
7: ; preds = %3
%8 = call i32 (...) @elegirOpcion()
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = call i32 (...) @Jugar()
br label %36
13: ; preds = %7
%14 = load i32, i32* %1
%15 = icmp eq i32 %14, 2
br i1 %15, label %16, label %19
16: ; preds = %13
%17 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%18 = call i32 (...) @Configurar()
br label %35
19: ; preds = %13
%20 = load i32, i32* %1
%21 = icmp eq i32 %20, 3
br i1 %21, label %22, label %23
22: ; preds = %19
br label %34
23: ; preds = %19
%24 = load i32, i32* %1
%25 = icmp eq i32 %24, 4
br i1 %25, label %26, label %27
26: ; preds = %23
br label %33
27: ; preds = %23
%28 = load i32, i32* %1
%29 = icmp eq i32 %28, 5
br i1 %29, label %30, label %31
30: ; preds = %27
br label %32
31: ; preds = %27
store i32 0, i32* %1
br label %32
32: ; preds = %31, %30
br label %33
33: ; preds = %32, %26
br label %34
34: ; preds = %33, %22
br label %35
35: ; preds = %34, %16
br label %36
36: ; preds = %35, %11
br label %3
37: ; preds = %3
%38 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Entro en configurar\00"
@.str.1 = [8 x i8] c"Termino\00"
define void @MenuPrincipal() {
%1 = tail call i32 (...) @Menu()
br label %2
2: ; preds = %9, %0
%3 = tail call i32 (...) @elegirOpcion()
switch i32 %3, label %9 [
i32 1, label %4
i32 2, label %6
]
4: ; preds = %2
%5 = tail call i32 (...) @Jugar()
br label %12
6: ; preds = %2
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (...) @Configurar()
br label %12
9: ; preds = %2
%10 = add i32 %3, -3
%11 = icmp ult i32 %10, 3
br i1 %11, label %12, label %2
12: ; preds = %9, %4, %6
%13 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}