#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*/ createClient(int, char *);
int creer_serveur(int);
int /*<<< orphan*/ init_stats();
int /*<<< orphan*/ initialiser_signaux();
int /*<<< orphan*/ loadMimes();
char *open_documentroot(int, char **);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  char *docroot = open_documentroot(argc, argv);
  int server = creer_serveur(8080);
  printf("Server launched:\n");
  loadMimes();
  init_stats();
  initialiser_signaux();
  createClient(server, docroot);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1090 <open_documentroot@plt>
mov    %rax,-0x18(%rbp)
mov    $0x1f90,%edi
call   1070 <creer_serveur@plt>
mov    %eax,-0x1c(%rbp)
lea    0xe56(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1080 <loadMimes@plt>
mov    $0x0,%al
call   1060 <init_stats@plt>
mov    $0x0,%al
call   1040 <initialiser_signaux@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1030 <createClient@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
call   1090 <open_documentroot@plt>
mov    %rax,%rbx
mov    $0x1f90,%edi
call   1070 <creer_serveur@plt>
mov    %eax,%ebp
lea    0xe72(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1080 <loadMimes@plt>
xor    %eax,%eax
call   1060 <init_stats@plt>
xor    %eax,%eax
call   1050 <initialiser_signaux@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <createClient@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Server launched:\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i8* @open_documentroot(i32 %8, i8** %9)
store i8* %10, i8** %6
%11 = call i32 @creer_serveur(i32 8080)
store i32 %11, i32* %7
%12 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (...) @loadMimes()
%14 = call i32 (...) @init_stats()
%15 = call i32 (...) @initialiser_signaux()
%16 = load i32, i32* %7
%17 = load i8*, i8** %6
%18 = call i32 @createClient(i32 %16, i8* %17)
ret i32 0
}

LLVM IR (-O2):
@str = [17 x i8] c"Server launched:\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i8* @open_documentroot(i32 %0, i8** %1)
%4 = tail call i32 @creer_serveur(i32 8080)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 (...) @loadMimes()
%7 = tail call i32 (...) @init_stats()
%8 = tail call i32 (...) @initialiser_signaux()
%9 = tail call i32 @createClient(i32 %4, i8* %3)
ret i32 0
}