#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdout;
void testoption(int argc, char *argv[], char *port_srv, char *chemin_fichiers,
                int taille_log, int max_connexion) {
  fprintf(stdout, "Mini Serveur Web\n");
  fprintf(stdout, "Le serveur écoute sur le port : %s\n", port_srv);
  fprintf(stdout, "La racine des fichiers HTML est : %s\n", chemin_fichiers);
  fprintf(stdout, "La taille taille du fichier log : %d Ko\n", taille_log);
  fprintf(stdout, "Le nombre maximum de clients simultanés : %d\n",
          max_connexion);
  fprintf(stdout, "Argument supplémentaires : ");
  for (int i = 0; i < argc; i++) {
    fprintf(stdout, "%s - ", argv[i]);
  }
  fprintf(stdout, "\n");
}


x86 assembly (clang, -O0):
<testoption>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xeb8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rdx
lea    0xec2(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e5d(%rip),%rax
mov    (%rax),%edi
mov    -0x24(%rbp),%edx
lea    0xece(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e43(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%edx
lea    0xedd(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e29(%rip),%rax
mov    (%rax),%edi
lea    0xef5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    120b <testoption+0xfb>
mov    0x2dff(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xedc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11ce <testoption+0xbe>
mov    0x2dce(%rip),%rax
mov    (%rax),%edi
lea    0xdf5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testoption>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,0x4(%rsp)
mov    %r8d,%ebx
mov    %rcx,%r13
mov    %rdx,%rbp
mov    %rsi,%r15
mov    %edi,%r12d
mov    0x2eaa(%rip),%r14
mov    (%r14),%edi
lea    0xec0(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xec1(%rip),%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xed2(%rip),%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xee4(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xefa(%rip),%rsi
mov    0x4(%rsp),%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xf14(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
test   %r12d,%r12d
jle    11da <testoption+0xca>
mov    %r12d,%ebx
lea    0xf1b(%rip),%r12
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    (%r14),%edi
mov    (%r15,%rbp,8),%rdx
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    11c0 <testoption+0xb0>
mov    (%r14),%edi
lea    0xe2c(%rip),%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [18 x i8] c"Mini Serveur Web\0A\00"
@.str.1 = [37 x i8] c"Le serveur \C3\A9coute sur le port : %s\0A\00"
@.str.2 = [38 x i8] c"La racine des fichiers HTML est : %s\0A\00"
@.str.3 = [41 x i8] c"La taille taille du fichier log : %d Ko\0A\00"
@.str.4 = [47 x i8] c"Le nombre maximum de clients simultan\C3\A9s : %d\0A\00"
@.str.5 = [29 x i8] c"Argument suppl\C3\A9mentaires : \00"
@.str.6 = [6 x i8] c"%s - \00"
@.str.7 = [2 x i8] c"\0A\00"
define void @testoption(i32 %0, i8** %1, i8* %2, i8* %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i8**
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 %0, i32* %7
store i8** %1, i8*** %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%14 = load i32, i32* @stdout
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* @stdout
%17 = load i8*, i8** %9
%18 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8* %17)
%19 = load i32, i32* @stdout
%20 = load i8*, i8** %10
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i8* %20)
%22 = load i32, i32* @stdout
%23 = load i32, i32* %11
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), i32 %23)
%25 = load i32, i32* @stdout
%26 = load i32, i32* %12
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0), i32 %26)
%28 = load i32, i32* @stdout
%29 = call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %13
br label %30
30: ; preds = %42, %6
%31 = load i32, i32* %13
%32 = load i32, i32* %7
%33 = icmp slt i32 %31, %32
br i1 %33, label %34, label %45
34: ; preds = %30
%35 = load i32, i32* @stdout
%36 = load i8**, i8*** %8
%37 = load i32, i32* %13
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i8*, i8** %36, i64 %38
%40 = load i8*, i8** %39
%41 = call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* %40)
br label %42
42: ; preds = %34
%43 = load i32, i32* %13
%44 = add nsw i32 %43, 1
store i32 %44, i32* %13
br label %30
45: ; preds = %30
%46 = load i32, i32* @stdout
%47 = call i32 (i32, i8*, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [18 x i8] c"Mini Serveur Web\0A\00"
@.str.1 = [37 x i8] c"Le serveur \C3\A9coute sur le port : %s\0A\00"
@.str.2 = [38 x i8] c"La racine des fichiers HTML est : %s\0A\00"
@.str.3 = [41 x i8] c"La taille taille du fichier log : %d Ko\0A\00"
@.str.4 = [47 x i8] c"Le nombre maximum de clients simultan\C3\A9s : %d\0A\00"
@.str.5 = [29 x i8] c"Argument suppl\C3\A9mentaires : \00"
@.str.6 = [6 x i8] c"%s - \00"
@.str.7 = [2 x i8] c"\0A\00"
define void @testoption(i32 %0, i8** nocapture %1, i8* %2, i8* %3, i32 %4, i32 %5) {
%7 = load i32, i32* @stdout
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @stdout
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%11 = load i32, i32* @stdout
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%13 = load i32, i32* @stdout
%14 = tail call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0), i32 %4)
%15 = load i32, i32* @stdout
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.4, i64 0, i64 0), i32 %5)
%17 = load i32, i32* @stdout
%18 = tail call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%19 = icmp sgt i32 %0, 0
br i1 %19, label %20, label %22
20: ; preds = %6
%21 = zext i32 %0 to i64
br label %25
22: ; preds = %25, %6
%23 = load i32, i32* @stdout
%24 = tail call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
ret void
25: ; preds = %20, %25
%26 = phi i64 [ 0, %20 ], [ %31, %25 ]
%27 = load i32, i32* @stdout
%28 = getelementptr inbounds i8*, i8** %1, i64 %26
%29 = load i8*, i8** %28
%30 = tail call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* %29)
%31 = add nuw nsw i64 %26, 1
%32 = icmp eq i64 %31, %21
br i1 %32, label %22, label %25
}