#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*/ aide();
int /*<<< orphan*/ asciiArtDebut();
int /*<<< orphan*/ enregistrerDernierePartieJoueeSolo();
int /*<<< orphan*/ jeux(int /*<<< orphan*/);
int /*<<< orphan*/ magasin();
int /*<<< orphan*/ menuSolo();
int /*<<< orphan*/ quitter();
void actionMenuSolo(int choix) {
  switch (choix) {
  case -1:
    menuSolo();
    break;
  case 0:
    quitter();
    break;
  case 1:
    jeux(0);
    break;
  case 2:
    magasin();
    break;
  case 3:
    aide();
    break;
  case 4:
    enregistrerDernierePartieJoueeSolo();
    asciiArtDebut();
    break;
  }
}


x86 assembly (clang, -O0):
<actionMenuSolo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x5,%eax
ja     11ee <actionMenuSolo+0x7e>
mov    -0x10(%rbp),%rax
lea    0xe65(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1080 <menuSolo@plt>
jmp    11ee <actionMenuSolo+0x7e>
mov    $0x0,%al
call   1040 <quitter@plt>
jmp    11ee <actionMenuSolo+0x7e>
xor    %edi,%edi
call   1030 <jeux@plt>
jmp    11ee <actionMenuSolo+0x7e>
mov    $0x0,%al
call   1060 <magasin@plt>
jmp    11ee <actionMenuSolo+0x7e>
mov    $0x0,%al
call   1070 <aide@plt>
jmp    11ee <actionMenuSolo+0x7e>
mov    $0x0,%al
call   1090 <enregistrerDernierePartieJoueeSolo@plt>
mov    $0x0,%al
call   1050 <asciiArtDebut@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<actionMenuSolo>:
push   %rax
add    $0x1,%edi
cmp    $0x5,%edi
ja     1191 <actionMenuSolo+0x21>
lea    0xe80(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
xor    %eax,%eax
pop    %rcx
jmp    1080 <menuSolo@plt>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <quitter@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <jeux@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <magasin@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <aide@plt>
xor    %eax,%eax
call   1090 <enregistrerDernierePartieJoueeSolo@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <asciiArtDebut@plt>

LLVM IR (-O0):
define void @actionMenuSolo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %17 [
i32 -1, label %4
i32 0, label %6
i32 1, label %8
i32 2, label %10
i32 3, label %12
i32 4, label %14
]
4: ; preds = %1
%5 = call i32 (...) @menuSolo()
br label %17
6: ; preds = %1
%7 = call i32 (...) @quitter()
br label %17
8: ; preds = %1
%9 = call i32 @jeux(i32 0)
br label %17
10: ; preds = %1
%11 = call i32 (...) @magasin()
br label %17
12: ; preds = %1
%13 = call i32 (...) @aide()
br label %17
14: ; preds = %1
%15 = call i32 (...) @enregistrerDernierePartieJoueeSolo()
%16 = call i32 (...) @asciiArtDebut()
br label %17
17: ; preds = %1, %14, %12, %10, %8, %6, %4
ret void
}

LLVM IR (-O2):
define void @actionMenuSolo(i32 %0) {
switch i32 %0, label %15 [
i32 -1, label %2
i32 0, label %4
i32 1, label %6
i32 2, label %8
i32 3, label %10
i32 4, label %12
]
2: ; preds = %1
%3 = tail call i32 (...) @menuSolo()
br label %15
4: ; preds = %1
%5 = tail call i32 (...) @quitter()
br label %15
6: ; preds = %1
%7 = tail call i32 @jeux(i32 0)
br label %15
8: ; preds = %1
%9 = tail call i32 (...) @magasin()
br label %15
10: ; preds = %1
%11 = tail call i32 (...) @aide()
br label %15
12: ; preds = %1
%13 = tail call i32 (...) @enregistrerDernierePartieJoueeSolo()
%14 = tail call i32 (...) @asciiArtDebut()
br label %15
15: ; preds = %1, %12, %10, %8, %6, %4, %2
ret void
}