#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*/ ligneVide();
int /*<<< orphan*/ margeBas();
int /*<<< orphan*/ margeDroite(int);
int /*<<< orphan*/ margeGauche(int);
int /*<<< orphan*/ margeHaut();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ system(char *);
menu() {
  int choix, nb_carac, nb_ligne = 0;
  system("clear");
  margeHaut();
  nb_carac = 24;
  margeGauche(nb_carac);
  printf("1-Nouvelle Partie Locale");
  margeDroite(nb_carac);
  printf("\n");
  ligneVide();
  margeGauche(nb_carac);
  printf("2-Nouvelle Partie Reseau");
  margeDroite(nb_carac);
  printf("\n");
  ligneVide();
  nb_carac = 37;
  margeGauche(nb_carac);
  printf("3-Charger la Partie Locale Précédente ");
  margeDroite(nb_carac);
  printf("\n");
  ligneVide();
  nb_carac = 16;
  margeGauche(nb_carac);
  printf("4-Manuel du Jeu ");
  margeDroite(nb_carac);
  printf("\n");
  ligneVide();
  nb_carac = 9;
  margeGauche(nb_carac);
  printf("5-Quitter ");
  margeDroite(nb_carac);
  printf("\n");
  margeBas();
  printf("\n");
  printf(" Effectuez un choix en saisissant 1,2,3,4 ou 5:");
  scanf("%i", &choix);
  return choix;
}


x86 assembly (clang, -O0):
<menu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
lea    0xe6a(%rip),%rdi
call   1030 <system@plt>
mov    $0x0,%al
call   1090 <margeHaut@plt>
movl   $0x18,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1060 <margeGauche@plt>
lea    0xe4e(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1050 <margeDroite@plt>
lea    0xe53(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1080 <ligneVide@plt>
mov    -0x8(%rbp),%edi
call   1060 <margeGauche@plt>
lea    0xe3a(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1050 <margeDroite@plt>
lea    0xe24(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1080 <ligneVide@plt>
movl   $0x25,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1060 <margeGauche@plt>
lea    0xe1d(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1050 <margeDroite@plt>
lea    0xdee(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1080 <ligneVide@plt>
movl   $0x10,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1060 <margeGauche@plt>
lea    0xe10(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1050 <margeDroite@plt>
lea    0xdb8(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1080 <ligneVide@plt>
movl   $0x9,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1060 <margeGauche@plt>
lea    0xdeb(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1050 <margeDroite@plt>
lea    0xd82(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   10a0 <margeBas@plt>
lea    0xd6f(%rip),%rdi
call   1040 <printf@plt>
lea    0xdc3(%rip),%rdi
call   1040 <printf@plt>
lea    0xde7(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1070 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu>:
push   %rax
lea    0xe68(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
call   10a0 <margeHaut@plt>
mov    $0x18,%edi
call   1070 <margeGauche@plt>
lea    0xe51(%rip),%rdi
call   1050 <printf@plt>
mov    $0x18,%edi
call   1060 <margeDroite@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1090 <ligneVide@plt>
mov    $0x18,%edi
call   1070 <margeGauche@plt>
lea    0xe39(%rip),%rdi
call   1050 <printf@plt>
mov    $0x18,%edi
call   1060 <margeDroite@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1090 <ligneVide@plt>
mov    $0x25,%edi
call   1070 <margeGauche@plt>
lea    0xe21(%rip),%rdi
call   1050 <printf@plt>
mov    $0x25,%edi
call   1060 <margeDroite@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1090 <ligneVide@plt>
mov    $0x10,%edi
call   1070 <margeGauche@plt>
lea    0xe19(%rip),%rdi
call   1050 <printf@plt>
mov    $0x10,%edi
call   1060 <margeDroite@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1090 <ligneVide@plt>
mov    $0x9,%edi
call   1070 <margeGauche@plt>
lea    0xdf9(%rip),%rdi
call   1050 <printf@plt>
mov    $0x9,%edi
call   1060 <margeDroite@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   10b0 <margeBas@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xdd3(%rip),%rdi
call   1050 <printf@plt>
lea    0xdf7(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1080 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
@.str.1 = [25 x i8] c"1-Nouvelle Partie Locale\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [25 x i8] c"2-Nouvelle Partie Reseau\00"
@.str.4 = [41 x i8] c"3-Charger la Partie Locale Pr\C3\A9c\C3\A9dente \00"
@.str.5 = [17 x i8] c"4-Manuel du Jeu \00"
@.str.6 = [11 x i8] c"5-Quitter \00"
@.str.7 = [48 x i8] c" Effectuez un choix en saisissant 1,2,3,4 ou 5:\00"
@.str.8 = [3 x i8] c"%i\00"
define i32 @menu() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %3
%4 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @margeHaut()
store i32 24, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @margeGauche(i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32, i32* %2
%10 = call i32 @margeDroite(i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (...) @ligneVide()
%13 = load i32, i32* %2
%14 = call i32 @margeGauche(i32 %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%16 = load i32, i32* %2
%17 = call i32 @margeDroite(i32 %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%19 = call i32 (...) @ligneVide()
store i32 37, i32* %2
%20 = load i32, i32* %2
%21 = call i32 @margeGauche(i32 %20)
%22 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0))
%23 = load i32, i32* %2
%24 = call i32 @margeDroite(i32 %23)
%25 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%26 = call i32 (...) @ligneVide()
store i32 16, i32* %2
%27 = load i32, i32* %2
%28 = call i32 @margeGauche(i32 %27)
%29 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%30 = load i32, i32* %2
%31 = call i32 @margeDroite(i32 %30)
%32 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%33 = call i32 (...) @ligneVide()
store i32 9, i32* %2
%34 = load i32, i32* %2
%35 = call i32 @margeGauche(i32 %34)
%36 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%37 = load i32, i32* %2
%38 = call i32 @margeDroite(i32 %37)
%39 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%40 = call i32 (...) @margeBas()
%41 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%42 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
%43 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* %1)
%44 = load i32, i32* %1
ret i32 %44
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
@.str.1 = [25 x i8] c"1-Nouvelle Partie Locale\00"
@.str.3 = [25 x i8] c"2-Nouvelle Partie Reseau\00"
@.str.4 = [41 x i8] c"3-Charger la Partie Locale Pr\C3\A9c\C3\A9dente \00"
@.str.5 = [17 x i8] c"4-Manuel du Jeu \00"
@.str.6 = [11 x i8] c"5-Quitter \00"
@.str.7 = [48 x i8] c" Effectuez un choix en saisissant 1,2,3,4 ou 5:\00"
@.str.8 = [3 x i8] c"%i\00"
define i32 @menu() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (...) @margeHaut()
%5 = tail call i32 @margeGauche(i32 24)
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @margeDroite(i32 24)
%8 = tail call i32 @putchar(i32 10)
%9 = tail call i32 (...) @ligneVide()
%10 = tail call i32 @margeGauche(i32 24)
%11 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%12 = tail call i32 @margeDroite(i32 24)
%13 = tail call i32 @putchar(i32 10)
%14 = tail call i32 (...) @ligneVide()
%15 = tail call i32 @margeGauche(i32 37)
%16 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.4, i64 0, i64 0))
%17 = tail call i32 @margeDroite(i32 37)
%18 = tail call i32 @putchar(i32 10)
%19 = tail call i32 (...) @ligneVide()
%20 = tail call i32 @margeGauche(i32 16)
%21 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%22 = tail call i32 @margeDroite(i32 16)
%23 = tail call i32 @putchar(i32 10)
%24 = tail call i32 (...) @ligneVide()
%25 = tail call i32 @margeGauche(i32 9)
%26 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%27 = tail call i32 @margeDroite(i32 9)
%28 = tail call i32 @putchar(i32 10)
%29 = tail call i32 (...) @margeBas()
%30 = tail call i32 @putchar(i32 10)
%31 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
%32 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32* %1)
%33 = load i32, i32* %1
ret i32 %33
}