#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 */
unsigned int demanderConfirmation(char *, int);
scalar_t__ estNouvellePartie();
int /*<<< orphan*/ menuPrincipal();
int /*<<< orphan*/ reprendrePartie();
void revenirMenuPrincipal(void) {
  if (estNouvellePartie()) {
    unsigned int choixJoueur;
    choixJoueur =
        demanderConfirmation("Vous n'avez pas sauvegarde, etes-vous sur de "
                             "vouloir revenir au menu principal ? (0/1)",
                             1);
    if (choixJoueur == 1)
      menuPrincipal();
    else if (choixJoueur == 0)
      reprendrePartie();
  } else
    menuPrincipal();
}


x86 assembly (clang, -O0):
<revenirMenuPrincipal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <estNouvellePartie@plt>
cmp    $0x0,%rax
je     119e <revenirMenuPrincipal+0x5e>
lea    0xea0(%rip),%rdi
mov    $0x1,%esi
call   1040 <demanderConfirmation@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1183 <revenirMenuPrincipal+0x43>
mov    $0x0,%al
call   1030 <menuPrincipal@plt>
jmp    1199 <revenirMenuPrincipal+0x59>
cmpl   $0x0,-0x4(%rbp)
jne    1194 <revenirMenuPrincipal+0x54>
mov    $0x0,%al
call   1060 <reprendrePartie@plt>
jmp    1199 <revenirMenuPrincipal+0x59>
jmp    11a5 <revenirMenuPrincipal+0x65>
mov    $0x0,%al
call   1030 <menuPrincipal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<revenirMenuPrincipal>:
push   %rax
xor    %eax,%eax
call   1050 <estNouvellePartie@plt>
test   %rax,%rax
je     1167 <revenirMenuPrincipal+0x27>
lea    0xeac(%rip),%rdi
mov    $0x1,%esi
call   1040 <demanderConfirmation@plt>
test   %eax,%eax
je     116f <revenirMenuPrincipal+0x2f>
cmp    $0x1,%eax
jne    1177 <revenirMenuPrincipal+0x37>
xor    %eax,%eax
pop    %rcx
jmp    1030 <menuPrincipal@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <reprendrePartie@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [87 x i8] c"Vous n'avez pas sauvegarde, etes-vous sur de vouloir revenir au menu principal ? (0/1)\00"
define void @revenirMenuPrincipal() {
%1 = alloca i32
%2 = call i64 (...) @estNouvellePartie()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %17
4: ; preds = %0
%5 = call i32 @demanderConfirmation(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0), i32 1)
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = call i32 (...) @menuPrincipal()
br label %16
10: ; preds = %4
%11 = load i32, i32* %1
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 (...) @reprendrePartie()
br label %15
15: ; preds = %13, %10
br label %16
16: ; preds = %15, %8
br label %19
17: ; preds = %0
%18 = call i32 (...) @menuPrincipal()
br label %19
19: ; preds = %17, %16
ret void
}

LLVM IR (-O2):
@.str = [87 x i8] c"Vous n'avez pas sauvegarde, etes-vous sur de vouloir revenir au menu principal ? (0/1)\00"
define void @revenirMenuPrincipal() {
%1 = tail call i64 (...) @estNouvellePartie()
%2 = icmp eq i64 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = tail call i32 @demanderConfirmation(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0), i32 1)
switch i32 %4, label %11 [
i32 1, label %5
i32 0, label %7
]
5: ; preds = %3
%6 = tail call i32 (...) @menuPrincipal()
br label %11
7: ; preds = %3
%8 = tail call i32 (...) @reprendrePartie()
br label %11
9: ; preds = %0
%10 = tail call i32 (...) @menuPrincipal()
br label %11
11: ; preds = %5, %7, %3, %9
ret void
}