#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*/ ConfigurarSonido();
int /*<<< orphan*/ ConfigurarTeclado();
int /*<<< orphan*/ MenuPrincipal();
int /*<<< orphan*/ cpc_ClrScr();
unsigned int elegirOpcion();
int /*<<< orphan*/ menuConfigurar();
void Configurar() {
  unsigned int option = 0;
  cpc_ClrScr();
  menuConfigurar();
  while (!option) {
    option = elegirOpcion();
    if (option == 1) {
      ConfigurarSonido();
    } else if (option == 2) {
      ConfigurarTeclado();
    } else if (option == 3) {
      MenuPrincipal();
    } else {
      option = 0;
    }
  }
}


x86 assembly (clang, -O0):
<Configurar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <cpc_ClrScr@plt>
mov    $0x0,%al
call   1040 <menuConfigurar@plt>
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1193 <Configurar+0x33>
jmp    11f5 <Configurar+0x95>
mov    $0x0,%al
call   1060 <elegirOpcion@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    11b3 <Configurar+0x53>
mov    $0x0,%al
call   1050 <ConfigurarSonido@plt>
jmp    11f0 <Configurar+0x90>
cmpl   $0x2,-0x4(%rbp)
jne    11c9 <Configurar+0x69>
mov    $0x0,%al
call   1070 <ConfigurarTeclado@plt>
jmp    11eb <Configurar+0x8b>
cmpl   $0x3,-0x4(%rbp)
jne    11df <Configurar+0x7f>
mov    $0x0,%al
call   1080 <MenuPrincipal@plt>
jmp    11e6 <Configurar+0x86>
movl   $0x0,-0x4(%rbp)
jmp    11eb <Configurar+0x8b>
jmp    11f0 <Configurar+0x90>
jmp    117d <Configurar+0x1d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Configurar>:
push   %rax
xor    %eax,%eax
call   1030 <cpc_ClrScr@plt>
xor    %eax,%eax
call   1040 <menuConfigurar@plt>
nop
xor    %eax,%eax
call   1060 <elegirOpcion@plt>
cmp    $0x3,%eax
je     118e <Configurar+0x2e>
cmp    $0x2,%eax
je     1196 <Configurar+0x36>
cmp    $0x1,%eax
jne    1170 <Configurar+0x10>
xor    %eax,%eax
pop    %rcx
jmp    1050 <ConfigurarSonido@plt>
xor    %eax,%eax
pop    %rcx
jmp    1080 <MenuPrincipal@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <ConfigurarTeclado@plt>

LLVM IR (-O0):
define void @Configurar() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @cpc_ClrScr()
%3 = call i32 (...) @menuConfigurar()
br label %4
4: ; preds = %27, %0
%5 = load i32, i32* %1
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
br i1 %7, label %8, label %28
8: ; preds = %4
%9 = call i32 (...) @elegirOpcion()
store i32 %9, i32* %1
%10 = load i32, i32* %1
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 (...) @ConfigurarSonido()
br label %27
14: ; preds = %8
%15 = load i32, i32* %1
%16 = icmp eq i32 %15, 2
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 (...) @ConfigurarTeclado()
br label %26
19: ; preds = %14
%20 = load i32, i32* %1
%21 = icmp eq i32 %20, 3
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = call i32 (...) @MenuPrincipal()
br label %25
24: ; preds = %19
store i32 0, i32* %1
br label %25
25: ; preds = %24, %22
br label %26
26: ; preds = %25, %17
br label %27
27: ; preds = %26, %12
br label %4
28: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @Configurar() {
%1 = tail call i32 (...) @cpc_ClrScr()
%2 = tail call i32 (...) @menuConfigurar()
br label %3
3: ; preds = %3, %0
%4 = tail call i32 (...) @elegirOpcion()
switch i32 %4, label %3 [
i32 1, label %5
i32 2, label %7
i32 3, label %9
]
5: ; preds = %3
%6 = tail call i32 (...) @ConfigurarSonido()
br label %11
7: ; preds = %3
%8 = tail call i32 (...) @ConfigurarTeclado()
br label %11
9: ; preds = %3
%10 = tail call i32 (...) @MenuPrincipal()
br label %11
11: ; preds = %7, %9, %5
ret void
}