#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*/ controls();
int /*<<< orphan*/ displayHighScores();
int /*<<< orphan*/ exitYN();
int /*<<< orphan*/ loadGame();
int mainMenu();
int /*<<< orphan*/ welcomeArt();
int main() {
  welcomeArt();
  do {
    switch (mainMenu()) {
    case 0:
      loadGame();
      break;
    case 1:
      displayHighScores();
      break;
    case 2:
      controls();
      break;
    case 3:
      exitYN();
      break;
    }
  } while (1);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <welcomeArt@plt>
xor    %eax,%eax
call   1060 <mainMenu@plt>
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x3,%eax
ja     11cb <main+0x6b>
mov    -0x10(%rbp),%rax
lea    0xe69(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1040 <loadGame@plt>
jmp    11cb <main+0x6b>
mov    $0x0,%al
call   1030 <displayHighScores@plt>
jmp    11cb <main+0x6b>
mov    $0x0,%al
call   1080 <controls@plt>
jmp    11cb <main+0x6b>
mov    $0x0,%al
call   1070 <exitYN@plt>
jmp    11d0 <main+0x70>
mov    $0x1,%al
test   $0x1,%al
jne    1176 <main+0x16>
jmp    11df <main+0x7f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <welcomeArt@plt>
lea    0xe91(%rip),%rbx
jmp    1190 <main+0x30>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1070 <exitYN@plt>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1060 <mainMenu@plt>
cmp    $0x3,%eax
ja     1190 <main+0x30>
mov    %eax,%eax
movslq (%rbx,%rax,4),%rax
add    %rbx,%rax
jmp    *%rax
xor    %eax,%eax
call   1040 <loadGame@plt>
jmp    1190 <main+0x30>
xor    %eax,%eax
call   1030 <displayHighScores@plt>
jmp    1190 <main+0x30>
nopl   0x0(%rax)
xor    %eax,%eax
call   1080 <controls@plt>
jmp    1190 <main+0x30>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @welcomeArt()
br label %3
3: ; preds = %14, %0
%4 = call i32 (...) @mainMenu()
switch i32 %4, label %13 [
i32 0, label %5
i32 1, label %7
i32 2, label %9
i32 3, label %11
]
5: ; preds = %3
%6 = call i32 (...) @loadGame()
br label %13
7: ; preds = %3
%8 = call i32 (...) @displayHighScores()
br label %13
9: ; preds = %3
%10 = call i32 (...) @controls()
br label %13
11: ; preds = %3
%12 = call i32 (...) @exitYN()
br label %13
13: ; preds = %3, %11, %9, %7, %5
br label %14
14: ; preds = %13
br i1 true, label %3, label %15
15: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @welcomeArt()
br label %2
2: ; preds = %6, %0
%3 = tail call i32 (...) @mainMenu()
switch i32 %3, label %6 [
i32 0, label %4
i32 1, label %7
i32 2, label %9
i32 3, label %11
]
4: ; preds = %2
%5 = tail call i32 (...) @loadGame()
br label %6
6: ; preds = %4, %7, %9, %11, %2
br label %2
7: ; preds = %2
%8 = tail call i32 (...) @displayHighScores()
br label %6
9: ; preds = %2
%10 = tail call i32 (...) @controls()
br label %6
11: ; preds = %2
%12 = tail call i32 (...) @exitYN()
br label %6
}