#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*/ getchar();
int /*<<< orphan*/ go_to_manual();
int /*<<< orphan*/ go_to_random();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  printf("##################################\n");
  printf("# Assistant de création de dépôt #\n");
  printf("##################################\n");
  char choice;
  printf("Voulez-vous créer vos dépôts de manière aléatoire ? [O/N] ");
  scanf("%c", &choice);
  getchar();
  if (choice == 'O') {
    printf("Création de manière aléatoire choisie.\n");
    go_to_random();
  } else {
    printf("Création de manière manuelle choisie.\n");
    go_to_manual();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
lea    0xe82(%rip),%rdi
call   1040 <printf@plt>
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
lea    0xef5(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1060 <scanf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x4f,%eax
jne    11cb <main+0x7b>
lea    0xed4(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <go_to_random@plt>
jmp    11de <main+0x8e>
lea    0xee7(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1070 <go_to_manual@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xefd(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xe71(%rip),%rdi
call   1050 <printf@plt>
lea    0xea5(%rip),%rdi
lea    0xf(%rsp),%rsi
call   1070 <scanf@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
cmpb   $0x4f,0xf(%rsp)
jne    11c8 <main+0x68>
lea    0xefa(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <go_to_random@plt>
jmp    11db <main+0x7b>
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1080 <go_to_manual@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"##################################\0A\00"
@.str.1 = [39 x i8] c"# Assistant de cr\C3\A9ation de d\C3\A9p\C3\B4t #\0A\00"
@.str.2 = [64 x i8] c"Voulez-vous cr\C3\A9er vos d\C3\A9p\C3\B4ts de mani\C3\A8re al\C3\A9atoire ? [O/N] \00"
@.str.3 = [3 x i8] c"%c\00"
@.str.4 = [43 x i8] c"Cr\C3\A9ation de mani\C3\A8re al\C3\A9atoire choisie.\0A\00"
@.str.5 = [41 x i8] c"Cr\C3\A9ation de mani\C3\A8re manuelle choisie.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%8 = call i32 (...) @getchar()
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 79
br i1 %11, label %12, label %15
12: ; preds = %0
%13 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
%14 = call i32 (...) @go_to_random()
br label %18
15: ; preds = %0
%16 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0))
%17 = call i32 (...) @go_to_manual()
br label %18
18: ; preds = %15, %12
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [64 x i8] c"Voulez-vous cr\C3\A9er vos d\C3\A9p\C3\B4ts de mani\C3\A8re al\C3\A9atoire ? [O/N] \00"
@.str.3 = [3 x i8] c"%c\00"
@str.6 = [38 x i8] c"# Assistant de cr\C3\A9ation de d\C3\A9p\C3\B4t #\00"
@str.7 = [35 x i8] c"##################################\00"
@str.8 = [40 x i8] c"Cr\C3\A9ation de mani\C3\A8re manuelle choisie.\00"
@str.9 = [42 x i8] c"Cr\C3\A9ation de mani\C3\A8re al\C3\A9atoire choisie.\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.7, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %1)
%7 = call i32 (...) @getchar()
%8 = load i8, i8* %1
%9 = icmp eq i8 %8, 79
br i1 %9, label %10, label %13
10: ; preds = %0
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.9, i64 0, i64 0))
%12 = call i32 (...) @go_to_random()
br label %16
13: ; preds = %0
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.8, i64 0, i64 0))
%15 = call i32 (...) @go_to_manual()
br label %16
16: ; preds = %13, %10
ret i32 0
}