#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 afficherPartieSolo();
int choixMenu(int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ quitter();
int /*<<< orphan*/ selectionnerPartieChargeeSolo(int);
int /*<<< orphan*/ systemeSauvegardeSolo();
int /*<<< orphan*/ titre(char *);
void chargerPartieSolo(void) {
  int nbParties, choix;
  titre("Charger Partie");
  printf("Quelle partie voulez-vous charger ?\n\n");
  nbParties = afficherPartieSolo();
  choix = choixMenu(1, nbParties);
  switch (choix) {
  case 0:
    quitter();
    break;
  case -1:
    systemeSauvegardeSolo();
    break;
  default:
    selectionnerPartieChargeeSolo(choix);
    break;
  }
}


x86 assembly (clang, -O0):
<chargerPartieSolo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xe81(%rip),%rdi
call   1070 <titre@plt>
lea    0xe84(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
call   1080 <afficherPartieSolo@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x1,%edi
call   1030 <choixMenu@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0xffffffff,%eax
je     11da <chargerPartieSolo+0x6a>
jmp    11be <chargerPartieSolo+0x4e>
mov    -0xc(%rbp),%eax
test   %eax,%eax
jne    11e6 <chargerPartieSolo+0x76>
jmp    11ce <chargerPartieSolo+0x5e>
mov    $0x0,%al
call   1040 <quitter@plt>
jmp    11ee <chargerPartieSolo+0x7e>
mov    $0x0,%al
call   1060 <systemeSauvegardeSolo@plt>
jmp    11ee <chargerPartieSolo+0x7e>
mov    -0x8(%rbp),%edi
call   1090 <selectionnerPartieChargeeSolo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chargerPartieSolo>:
push   %rax
lea    0xe88(%rip),%rdi
call   1070 <titre@plt>
lea    0xe8b(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
call   1080 <afficherPartieSolo@plt>
mov    $0x1,%edi
mov    %eax,%esi
call   1030 <choixMenu@plt>
cmp    $0xffffffff,%eax
je     11ad <chargerPartieSolo+0x3d>
test   %eax,%eax
jne    11b5 <chargerPartieSolo+0x45>
xor    %eax,%eax
pop    %rcx
jmp    1040 <quitter@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <systemeSauvegardeSolo@plt>
mov    %eax,%edi
pop    %rax
jmp    1090 <selectionnerPartieChargeeSolo@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Charger Partie\00"
@.str.1 = [38 x i8] c"Quelle partie voulez-vous charger ?\0A\0A\00"
define void @chargerPartieSolo() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @titre(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (...) @afficherPartieSolo()
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = call i32 @choixMenu(i32 1, i32 %6)
store i32 %7, i32* %2
%8 = load i32, i32* %2
switch i32 %8, label %13 [
i32 0, label %9
i32 -1, label %11
]
9: ; preds = %0
%10 = call i32 (...) @quitter()
br label %16
11: ; preds = %0
%12 = call i32 (...) @systemeSauvegardeSolo()
br label %16
13: ; preds = %0
%14 = load i32, i32* %2
%15 = call i32 @selectionnerPartieChargeeSolo(i32 %14)
br label %16
16: ; preds = %13, %11, %9
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Charger Partie\00"
@str = [37 x i8] c"Quelle partie voulez-vous charger ?\0A\00"
define void @chargerPartieSolo() {
%1 = tail call i32 @titre(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @afficherPartieSolo()
%4 = tail call i32 @choixMenu(i32 1, i32 %3)
switch i32 %4, label %9 [
i32 0, label %5
i32 -1, label %7
]
5: ; preds = %0
%6 = tail call i32 (...) @quitter()
br label %11
7: ; preds = %0
%8 = tail call i32 (...) @systemeSauvegardeSolo()
br label %11
9: ; preds = %0
%10 = tail call i32 @selectionnerPartieChargeeSolo(i32 %4)
br label %11
11: ; preds = %9, %7, %5
ret void
}