#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 */
struct sNodeProperty {
  int dummy;
};
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ checkMachineFile(char *, struct sNodeProperty **);
int /*<<< orphan*/ checkNodeProperties(struct sNodeProperty **);
int /*<<< orphan*/ delAllNodes(struct sNodeProperty **);
int /*<<< orphan*/ deployWrekavoc(struct sNodeProperty **);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ likeScrollBarStart(int /*<<< orphan*/ **);
int /*<<< orphan*/ likeScrollBarStop(int /*<<< orphan*/ **);
char *malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ rapportBandwidth(struct sNodeProperty **);
int /*<<< orphan*/ rapportCpu(struct sNodeProperty **);
int /*<<< orphan*/ rapportLatency(struct sNodeProperty **);
int /*<<< orphan*/ startDaemon(struct sNodeProperty **);
int /*<<< orphan*/ startWrekavoc();
int /*<<< orphan*/ stopDaemon(struct sNodeProperty **);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int /*<<< orphan*/ testBp(struct sNodeProperty **);
int /*<<< orphan*/ testCpu(struct sNodeProperty **);
int /*<<< orphan*/ testLatence(struct sNodeProperty **);
int /*<<< orphan*/ writeConfigurationFileLatence(struct sNodeProperty **,
                                                 char *);
int main(int argc, char **argv) {
  int iIndexArg;
  char *strFile = NULL;
  char *strUser = NULL;
  struct sNodeProperty *pNodeListe = NULL;
  pthread_t *threadScrollBar = NULL;
  if (argc < 2) {
    printf("Correct syntax is : %s -m <machine_file> -u <user>\n", argv[0]);
    return 0;
  }
  for (iIndexArg = 1; iIndexArg < argc; iIndexArg++) {
    if (strcmp(argv[iIndexArg], "-m") == 0) {
      if (iIndexArg + 1 < argc) {
        iIndexArg++;
        strFile = malloc(strlen(argv[iIndexArg]));
        strcpy(strFile, argv[iIndexArg]);
      } else {
        printf("Argument in -m is missing !\n");
        return -1;
      }
    }
    if (strcmp(argv[iIndexArg], "-u") == 0) {
      if (iIndexArg + 1 < argc) {
        iIndexArg++;
        strUser = malloc(strlen(argv[iIndexArg]));
        strcpy(strFile, argv[iIndexArg]);
      } else {
        printf("Argument in -u is missing !\n");
        return -1;
      }
    }
  }
  if (strUser == NULL) {
    strUser = malloc(4 * sizeof(char));
    strcpy(strUser, "basil");
    strUser[5] = '\0';
  }
  if (strFile != NULL) {
    if (!checkMachineFile(strFile, &pNodeListe)) {
      return -2;
    }
    checkNodeProperties(&pNodeListe);
    printf("\n*********************************************************\n");
    printf("Starting all daemons ...\n");
    printf("*********************************************************\n\n");
    deployWrekavoc(&pNodeListe);
    likeScrollBarStart(&threadScrollBar);
    startDaemon(&pNodeListe);
    likeScrollBarStop(&threadScrollBar);
    printf("\r*********************************************************\n");
    printf("Sending new configuration ...\n");
    printf("*********************************************************\n\n");
    likeScrollBarStart(&threadScrollBar);
    writeConfigurationFileLatence(&pNodeListe, strUser);
    startWrekavoc();
    likeScrollBarStop(&threadScrollBar);
    printf("\r*********************************************************\n");
    printf("Testing latency ...\n");
    printf("*********************************************************\n\n");
    testLatence(&pNodeListe);
    rapportLatency(&pNodeListe);
    printf("\r*********************************************************\n");
    printf("Testing bandwidth ...\n");
    printf("*********************************************************\n\n");
    likeScrollBarStart(&threadScrollBar);
    testBp(&pNodeListe);
    likeScrollBarStop(&threadScrollBar);
    rapportBandwidth(&pNodeListe);
    printf("\n*********************************************************\n");
    printf("Testing cpu ...\n");
    printf("*********************************************************\n\n");
    likeScrollBarStart(&threadScrollBar);
    testCpu(&pNodeListe);
    likeScrollBarStop(&threadScrollBar);
    rapportCpu(&pNodeListe);
    printf("\n*********************************************************\n");
    printf("All daemons are stopped ...\n");
    printf("*********************************************************\n\n");
    stopDaemon(&pNodeListe);
    free(strFile);
    free(strUser);
  }
  delAllNodes(&pNodeListe);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    12c1 <main+0x61>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xd52(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1637 <main+0x3d7>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1405 <main+0x1a5>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd4d(%rip),%rsi
call   10d0 <strcmp@plt>
cmp    $0x0,%rax
jne    1363 <main+0x103>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
cmp    -0x8(%rbp),%eax
jge    1344 <main+0xe4>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1090 <strlen@plt>
mov    %eax,%edi
call   1120 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1070 <strcpy@plt>
jmp    135e <main+0xfe>
lea    0xcec(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1637 <main+0x3d7>
jmp    1363 <main+0x103>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xcde(%rip),%rsi
call   10d0 <strcmp@plt>
cmp    $0x0,%rax
jne    13f2 <main+0x192>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
cmp    -0x8(%rbp),%eax
jge    13d3 <main+0x173>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1090 <strlen@plt>
mov    %eax,%edi
call   1120 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1070 <strcpy@plt>
jmp    13ed <main+0x18d>
lea    0xc7d(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1637 <main+0x3d7>
jmp    13f2 <main+0x192>
jmp    13f7 <main+0x197>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12c8 <main+0x68>
cmpq   $0x0,-0x28(%rbp)
jne    1436 <main+0x1d6>
mov    $0x4,%edi
call   1120 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xc4b(%rip),%rsi
call   1070 <strcpy@plt>
mov    -0x28(%rbp),%rax
movb   $0x0,0x5(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1627 <main+0x3c7>
mov    -0x20(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1100 <checkMachineFile@plt>
cmp    $0x0,%eax
jne    1463 <main+0x203>
movl   $0xfffffffe,-0x4(%rbp)
jmp    1637 <main+0x3d7>
lea    -0x30(%rbp),%rdi
call   1180 <checkNodeProperties@plt>
lea    0xc07(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xc35(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xc41(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1130 <deployWrekavoc@plt>
lea    -0x38(%rbp),%rdi
call   1050 <likeScrollBarStart@plt>
lea    -0x30(%rbp),%rdi
call   10f0 <startDaemon@plt>
lea    -0x38(%rbp),%rdi
call   1030 <likeScrollBarStop@plt>
lea    0xc4b(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xc79(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xbf3(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    -0x38(%rbp),%rdi
call   1050 <likeScrollBarStart@plt>
mov    -0x28(%rbp),%rsi
lea    -0x30(%rbp),%rdi
call   1140 <writeConfigurationFileLatence@plt>
mov    $0x0,%al
call   1170 <startWrekavoc@plt>
lea    -0x38(%rbp),%rdi
call   1030 <likeScrollBarStop@plt>
lea    0xbfb(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xc48(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xba3(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1150 <testLatence@plt>
lea    -0x30(%rbp),%rdi
call   1060 <rapportLatency@plt>
lea    0xbbf(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xc21(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xb67(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    -0x38(%rbp),%rdi
call   1050 <likeScrollBarStart@plt>
lea    -0x30(%rbp),%rdi
call   10b0 <testBp@plt>
lea    -0x38(%rbp),%rdi
call   1030 <likeScrollBarStop@plt>
lea    -0x30(%rbp),%rdi
call   10c0 <rapportBandwidth@plt>
lea    0xadf(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xbea(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xb19(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    -0x38(%rbp),%rdi
call   1050 <likeScrollBarStart@plt>
lea    -0x30(%rbp),%rdi
call   1110 <testCpu@plt>
lea    -0x38(%rbp),%rdi
call   1030 <likeScrollBarStop@plt>
lea    -0x30(%rbp),%rdi
call   1080 <rapportCpu@plt>
lea    0xa91(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xbad(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xacb(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    -0x30(%rbp),%rdi
call   10e0 <stopDaemon@plt>
mov    -0x20(%rbp),%rdi
call   1040 <free@plt>
mov    -0x28(%rbp),%rdi
call   1040 <free@plt>
lea    -0x30(%rbp),%rdi
call   1160 <delAllNodes@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
movq   $0x0,(%rsp)
movq   $0x0,0x10(%rsp)
cmp    $0x2,%edi
jge    12af <main+0x3f>
mov    (%rbx),%rsi
lea    0xd5f(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   10b0 <printf@plt>
jmp    156b <main+0x2fb>
mov    %edi,%r13d
mov    $0x1,%r14d
xor    %eax,%eax
mov    %rax,0x8(%rsp)
lea    0xd6e(%rip),%r15
xor    %ebp,%ebp
jmp    12dd <main+0x6d>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r14d
cmp    %r13d,%r14d
jge    136d <main+0xfd>
movslq %r14d,%r12
mov    (%rbx,%r12,8),%rdi
mov    %r15,%rsi
call   10e0 <strcmp@plt>
test   %rax,%rax
jne    1320 <main+0xb0>
add    $0x1,%r14d
cmp    %r13d,%r14d
jge    1381 <main+0x111>
movslq %r14d,%r12
mov    (%rbx,%r12,8),%rdi
call   10a0 <strlen@plt>
mov    %eax,%edi
call   1130 <malloc@plt>
mov    %rax,%rbp
mov    (%rbx,%r12,8),%rsi
mov    %rax,%rdi
call   1070 <strcpy@plt>
mov    (%rbx,%r12,8),%rdi
lea    0xd0c(%rip),%rsi
call   10e0 <strcmp@plt>
test   %rax,%rax
jne    12d0 <main+0x60>
add    $0x1,%r14d
cmp    %r13d,%r14d
jge    138a <main+0x11a>
mov    %rbp,%r12
movslq %r14d,%rbp
mov    (%rbx,%rbp,8),%rdi
call   10a0 <strlen@plt>
mov    %eax,%edi
call   1130 <malloc@plt>
mov    %rax,0x8(%rsp)
mov    (%rbx,%rbp,8),%rsi
mov    %r12,%rbp
mov    %r12,%rdi
call   1070 <strcpy@plt>
jmp    12d0 <main+0x60>
mov    0x8(%rsp),%rbx
test   %rbx,%rbx
je     13a0 <main+0x130>
test   %rbp,%rbp
jne    13c9 <main+0x159>
jmp    155a <main+0x2ea>
lea    0xe12(%rip),%rdi
jmp    1391 <main+0x121>
lea    0xded(%rip),%rdi
call   1090 <puts@plt>
mov    $0xffffffff,%ebx
jmp    156b <main+0x2fb>
mov    $0x4,%edi
call   1130 <malloc@plt>
mov    %rax,%rbx
lea    0xc86(%rip),%rsi
mov    %rax,%rdi
call   1070 <strcpy@plt>
movb   $0x0,0x5(%rbx)
test   %rbp,%rbp
je     155a <main+0x2ea>
mov    %rsp,%rsi
mov    %rbp,%rdi
call   1110 <checkMachineFile@plt>
test   %eax,%eax
je     1566 <main+0x2f6>
mov    %rsp,%r15
mov    %r15,%rdi
call   1190 <checkNodeProperties@plt>
lea    0xcfe(%rip),%rdi
call   1090 <puts@plt>
lea    0xc46(%rip),%rdi
call   1090 <puts@plt>
lea    0xd3d(%rip),%r13
mov    %r13,%rdi
call   1090 <puts@plt>
mov    %r15,%rdi
call   1140 <deployWrekavoc@plt>
mov    %rbp,%r12
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
call   1050 <likeScrollBarStart@plt>
mov    %r15,%rdi
call   1100 <startDaemon@plt>
mov    %rbp,%rdi
call   1030 <likeScrollBarStop@plt>
lea    0xc4e(%rip),%r14
mov    %r14,%rdi
call   1090 <puts@plt>
lea    0xc0d(%rip),%rdi
call   1090 <puts@plt>
mov    %r13,%rdi
call   1090 <puts@plt>
mov    %rbp,%rdi
call   1050 <likeScrollBarStart@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1150 <writeConfigurationFileLatence@plt>
xor    %eax,%eax
call   1180 <startWrekavoc@plt>
mov    %rbp,%rdi
call   1030 <likeScrollBarStop@plt>
mov    %r14,%rdi
call   1090 <puts@plt>
lea    0xbed(%rip),%rdi
call   1090 <puts@plt>
mov    %r13,%rdi
call   1090 <puts@plt>
mov    %r15,%rdi
call   1160 <testLatence@plt>
mov    %r15,%rdi
call   1060 <rapportLatency@plt>
mov    %r14,%rdi
call   1090 <puts@plt>
lea    0xc10(%rip),%rdi
call   1090 <puts@plt>
mov    %r13,%rdi
call   1090 <puts@plt>
mov    %rbp,%rdi
call   1050 <likeScrollBarStart@plt>
mov    %r15,%rdi
call   10c0 <testBp@plt>
mov    %rbp,%rdi
call   1030 <likeScrollBarStop@plt>
mov    %r15,%rdi
call   10d0 <rapportBandwidth@plt>
lea    0xc02(%rip),%r14
mov    %r14,%rdi
call   1090 <puts@plt>
lea    0xbe3(%rip),%rdi
call   1090 <puts@plt>
mov    %r13,%rdi
call   1090 <puts@plt>
mov    %rbp,%rdi
call   1050 <likeScrollBarStart@plt>
mov    %r15,%rdi
call   1120 <testCpu@plt>
mov    %rbp,%rdi
call   1030 <likeScrollBarStop@plt>
mov    %r15,%rdi
call   1080 <rapportCpu@plt>
mov    %r14,%rdi
call   1090 <puts@plt>
lea    0xbf2(%rip),%rdi
call   1090 <puts@plt>
mov    %r13,%rdi
call   1090 <puts@plt>
mov    %r15,%rdi
call   10f0 <stopDaemon@plt>
mov    %r12,%rdi
call   1040 <free@plt>
mov    %rbx,%rdi
call   1040 <free@plt>
mov    %rsp,%rdi
call   1170 <delAllNodes@plt>
xor    %ebx,%ebx
jmp    156b <main+0x2fb>
mov    $0xfffffffe,%ebx
mov    %ebx,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.sNodeProperty = type { i32 }
@.str = [52 x i8] c"Correct syntax is : %s -m <machine_file> -u <user>\0A\00"
@.str.1 = [3 x i8] c"-m\00"
@.str.2 = [29 x i8] c"Argument in -m is missing !\0A\00"
@.str.3 = [3 x i8] c"-u\00"
@.str.4 = [29 x i8] c"Argument in -u is missing !\0A\00"
@.str.5 = [6 x i8] c"basil\00"
@.str.6 = [60 x i8] c"\0A*********************************************************\0A\00"
@.str.7 = [26 x i8] c"Starting all daemons ...\0A\00"
@.str.8 = [60 x i8] c"*********************************************************\0A\0A\00"
@.str.9 = [60 x i8] c"\0D*********************************************************\0A\00"
@.str.10 = [31 x i8] c"Sending new configuration ...\0A\00"
@.str.11 = [21 x i8] c"Testing latency ...\0A\00"
@.str.12 = [23 x i8] c"Testing bandwidth ...\0A\00"
@.str.13 = [17 x i8] c"Testing cpu ...\0A\00"
@.str.14 = [29 x i8] c"All daemons are stopped ...\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca %struct.sNodeProperty*
%10 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %7
store i8* null, i8** %8
store %struct.sNodeProperty* null, %struct.sNodeProperty** %9
store i32* null, i32** %10
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 2
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 0
%16 = load i8*, i8** %15
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %16)
store i32 0, i32* %3
br label %156
18: ; preds = %2
store i32 1, i32* %6
br label %19
19: ; preds = %90, %18
%20 = load i32, i32* %6
%21 = load i32, i32* %4
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %93
23: ; preds = %19
%24 = load i8**, i8*** %5
%25 = load i32, i32* %6
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8*, i8** %24, i64 %26
%28 = load i8*, i8** %27
%29 = call i64 @strcmp(i8* %28, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %56
31: ; preds = %23
%32 = load i32, i32* %6
%33 = add nsw i32 %32, 1
%34 = load i32, i32* %4
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %53
36: ; preds = %31
%37 = load i32, i32* %6
%38 = add nsw i32 %37, 1
store i32 %38, i32* %6
%39 = load i8**, i8*** %5
%40 = load i32, i32* %6
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i8*, i8** %39, i64 %41
%43 = load i8*, i8** %42
%44 = call i32 @strlen(i8* %43)
%45 = call i8* @malloc(i32 %44)
store i8* %45, i8** %7
%46 = load i8*, i8** %7
%47 = load i8**, i8*** %5
%48 = load i32, i32* %6
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i8*, i8** %47, i64 %49
%51 = load i8*, i8** %50
%52 = call i32 @strcpy(i8* %46, i8* %51)
br label %55
53: ; preds = %31
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %3
br label %156
55: ; preds = %36
br label %56
56: ; preds = %55, %23
%57 = load i8**, i8*** %5
%58 = load i32, i32* %6
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds i8*, i8** %57, i64 %59
%61 = load i8*, i8** %60
%62 = call i64 @strcmp(i8* %61, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%63 = icmp eq i64 %62, 0
br i1 %63, label %64, label %89
64: ; preds = %56
%65 = load i32, i32* %6
%66 = add nsw i32 %65, 1
%67 = load i32, i32* %4
%68 = icmp slt i32 %66, %67
br i1 %68, label %69, label %86
69: ; preds = %64
%70 = load i32, i32* %6
%71 = add nsw i32 %70, 1
store i32 %71, i32* %6
%72 = load i8**, i8*** %5
%73 = load i32, i32* %6
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i8*, i8** %72, i64 %74
%76 = load i8*, i8** %75
%77 = call i32 @strlen(i8* %76)
%78 = call i8* @malloc(i32 %77)
store i8* %78, i8** %8
%79 = load i8*, i8** %7
%80 = load i8**, i8*** %5
%81 = load i32, i32* %6
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds i8*, i8** %80, i64 %82
%84 = load i8*, i8** %83
%85 = call i32 @strcpy(i8* %79, i8* %84)
br label %88
86: ; preds = %64
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
store i32 -1, i32* %3
br label %156
88: ; preds = %69
br label %89
89: ; preds = %88, %56
br label %90
90: ; preds = %89
%91 = load i32, i32* %6
%92 = add nsw i32 %91, 1
store i32 %92, i32* %6
br label %19
93: ; preds = %19
%94 = load i8*, i8** %8
%95 = icmp eq i8* %94, null
br i1 %95, label %96, label %102
96: ; preds = %93
%97 = call i8* @malloc(i32 4)
store i8* %97, i8** %8
%98 = load i8*, i8** %8
%99 = call i32 @strcpy(i8* %98, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%100 = load i8*, i8** %8
%101 = getelementptr inbounds i8, i8* %100, i64 5
store i8 0, i8* %101
br label %102
102: ; preds = %96, %93
%103 = load i8*, i8** %7
%104 = icmp ne i8* %103, null
br i1 %104, label %105, label %154
105: ; preds = %102
%106 = load i8*, i8** %7
%107 = call i32 @checkMachineFile(i8* %106, %struct.sNodeProperty** %9)
%108 = icmp ne i32 %107, 0
br i1 %108, label %110, label %109
109: ; preds = %105
store i32 -2, i32* %3
br label %156
110: ; preds = %105
%111 = call i32 @checkNodeProperties(%struct.sNodeProperty** %9)
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.6, i64 0, i64 0))
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.8, i64 0, i64 0))
%115 = call i32 @deployWrekavoc(%struct.sNodeProperty** %9)
%116 = call i32 @likeScrollBarStart(i32** %10)
%117 = call i32 @startDaemon(%struct.sNodeProperty** %9)
%118 = call i32 @likeScrollBarStop(i32** %10)
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.10, i64 0, i64 0))
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.8, i64 0, i64 0))
%122 = call i32 @likeScrollBarStart(i32** %10)
%123 = load i8*, i8** %8
%124 = call i32 @writeConfigurationFileLatence(%struct.sNodeProperty** %9, i8* %123)
%125 = call i32 (...) @startWrekavoc()
%126 = call i32 @likeScrollBarStop(i32** %10)
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
%128 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0))
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.8, i64 0, i64 0))
%130 = call i32 @testLatence(%struct.sNodeProperty** %9)
%131 = call i32 @rapportLatency(%struct.sNodeProperty** %9)
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i64 0, i64 0))
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0))
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.8, i64 0, i64 0))
%135 = call i32 @likeScrollBarStart(i32** %10)
%136 = call i32 @testBp(%struct.sNodeProperty** %9)
%137 = call i32 @likeScrollBarStop(i32** %10)
%138 = call i32 @rapportBandwidth(%struct.sNodeProperty** %9)
%139 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.6, i64 0, i64 0))
%140 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0))
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.8, i64 0, i64 0))
%142 = call i32 @likeScrollBarStart(i32** %10)
%143 = call i32 @testCpu(%struct.sNodeProperty** %9)
%144 = call i32 @likeScrollBarStop(i32** %10)
%145 = call i32 @rapportCpu(%struct.sNodeProperty** %9)
%146 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.6, i64 0, i64 0))
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.14, i64 0, i64 0))
%148 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.8, i64 0, i64 0))
%149 = call i32 @stopDaemon(%struct.sNodeProperty** %9)
%150 = load i8*, i8** %7
%151 = call i32 @free(i8* %150)
%152 = load i8*, i8** %8
%153 = call i32 @free(i8* %152)
br label %154
154: ; preds = %110, %102
%155 = call i32 @delAllNodes(%struct.sNodeProperty** %9)
store i32 0, i32* %3
br label %156
156: ; preds = %154, %109, %86, %53, %13
%157 = load i32, i32* %3
ret i32 %157
}

LLVM IR (-O2):
%struct.sNodeProperty = type { i32 }
@.str = [52 x i8] c"Correct syntax is : %s -m <machine_file> -u <user>\0A\00"
@.str.1 = [3 x i8] c"-m\00"
@.str.3 = [3 x i8] c"-u\00"
@.str.5 = [6 x i8] c"basil\00"
@str.15 = [25 x i8] c"Starting all daemons ...\00"
@str.18 = [30 x i8] c"Sending new configuration ...\00"
@str.21 = [20 x i8] c"Testing latency ...\00"
@str.23 = [59 x i8] c"\0D*********************************************************\00"
@str.24 = [22 x i8] c"Testing bandwidth ...\00"
@str.27 = [16 x i8] c"Testing cpu ...\00"
@str.29 = [59 x i8] c"\0A*********************************************************\00"
@str.30 = [28 x i8] c"All daemons are stopped ...\00"
@str.31 = [59 x i8] c"*********************************************************\0A\00"
@str.32 = [28 x i8] c"Argument in -u is missing !\00"
@str.33 = [28 x i8] c"Argument in -m is missing !\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.sNodeProperty*
%4 = alloca i32*
%5 = bitcast %struct.sNodeProperty** %3 to i8*
store %struct.sNodeProperty* null, %struct.sNodeProperty** %3
%6 = bitcast i32** %4 to i8*
store i32* null, i32** %4
%7 = icmp slt i32 %0, 2
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8*, i8** %1
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %114
11: ; preds = %2, %54
%12 = phi i8* [ %56, %54 ], [ null, %2 ]
%13 = phi i8* [ %36, %54 ], [ null, %2 ]
%14 = phi i32 [ %57, %54 ], [ 1, %2 ]
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %1, i64 %15
%17 = load i8*, i8** %16
%18 = tail call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %33
20: ; preds = %11
%21 = add nsw i32 %14, 1
%22 = icmp slt i32 %21, %0
br i1 %22, label %23, label %31
23: ; preds = %20
%24 = sext i32 %21 to i64
%25 = getelementptr inbounds i8*, i8** %1, i64 %24
%26 = load i8*, i8** %25
%27 = tail call i32 @strlen(i8* %26)
%28 = tail call i8* @malloc(i32 %27)
%29 = load i8*, i8** %25
%30 = tail call i32 @strcpy(i8* %28, i8* %29)
br label %33
31: ; preds = %20
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.33, i64 0, i64 0))
br label %114
33: ; preds = %23, %11
%34 = phi i64 [ %24, %23 ], [ %15, %11 ]
%35 = phi i32 [ %21, %23 ], [ %14, %11 ]
%36 = phi i8* [ %28, %23 ], [ %13, %11 ]
%37 = getelementptr inbounds i8*, i8** %1, i64 %34
%38 = load i8*, i8** %37
%39 = tail call i64 @strcmp(i8* %38, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %54
41: ; preds = %33
%42 = add nsw i32 %35, 1
%43 = icmp slt i32 %42, %0
br i1 %43, label %44, label %52
44: ; preds = %41
%45 = sext i32 %42 to i64
%46 = getelementptr inbounds i8*, i8** %1, i64 %45
%47 = load i8*, i8** %46
%48 = tail call i32 @strlen(i8* %47)
%49 = tail call i8* @malloc(i32 %48)
%50 = load i8*, i8** %46
%51 = tail call i32 @strcpy(i8* %36, i8* %50)
br label %54
52: ; preds = %41
%53 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.32, i64 0, i64 0))
br label %114
54: ; preds = %33, %44
%55 = phi i32 [ %42, %44 ], [ %35, %33 ]
%56 = phi i8* [ %49, %44 ], [ %12, %33 ]
%57 = add nsw i32 %55, 1
%58 = icmp slt i32 %57, %0
br i1 %58, label %11, label %59
59: ; preds = %54
%60 = icmp eq i8* %56, null
br i1 %60, label %61, label %65
61: ; preds = %59
%62 = tail call dereferenceable_or_null(4) i8* @malloc(i32 4)
%63 = tail call i32 @strcpy(i8* %62, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%64 = getelementptr inbounds i8, i8* %62, i64 5
store i8 0, i8* %64
br label %65
65: ; preds = %61, %59
%66 = phi i8* [ %62, %61 ], [ %56, %59 ]
%67 = icmp eq i8* %36, null
br i1 %67, label %112, label %68
68: ; preds = %65
%69 = call i32 @checkMachineFile(i8* %36, %struct.sNodeProperty** %3)
%70 = icmp eq i32 %69, 0
br i1 %70, label %114, label %71
71: ; preds = %68
%72 = call i32 @checkNodeProperties(%struct.sNodeProperty** %3)
%73 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.29, i64 0, i64 0))
%74 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.15, i64 0, i64 0))
%75 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.31, i64 0, i64 0))
%76 = call i32 @deployWrekavoc(%struct.sNodeProperty** %3)
%77 = call i32 @likeScrollBarStart(i32** %4)
%78 = call i32 @startDaemon(%struct.sNodeProperty** %3)
%79 = call i32 @likeScrollBarStop(i32** %4)
%80 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.23, i64 0, i64 0))
%81 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.18, i64 0, i64 0))
%82 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.31, i64 0, i64 0))
%83 = call i32 @likeScrollBarStart(i32** %4)
%84 = call i32 @writeConfigurationFileLatence(%struct.sNodeProperty** %3, i8* %66)
%85 = call i32 (...) @startWrekavoc()
%86 = call i32 @likeScrollBarStop(i32** %4)
%87 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.23, i64 0, i64 0))
%88 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.21, i64 0, i64 0))
%89 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.31, i64 0, i64 0))
%90 = call i32 @testLatence(%struct.sNodeProperty** %3)
%91 = call i32 @rapportLatency(%struct.sNodeProperty** %3)
%92 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.23, i64 0, i64 0))
%93 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.24, i64 0, i64 0))
%94 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.31, i64 0, i64 0))
%95 = call i32 @likeScrollBarStart(i32** %4)
%96 = call i32 @testBp(%struct.sNodeProperty** %3)
%97 = call i32 @likeScrollBarStop(i32** %4)
%98 = call i32 @rapportBandwidth(%struct.sNodeProperty** %3)
%99 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.29, i64 0, i64 0))
%100 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.27, i64 0, i64 0))
%101 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.31, i64 0, i64 0))
%102 = call i32 @likeScrollBarStart(i32** %4)
%103 = call i32 @testCpu(%struct.sNodeProperty** %3)
%104 = call i32 @likeScrollBarStop(i32** %4)
%105 = call i32 @rapportCpu(%struct.sNodeProperty** %3)
%106 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.29, i64 0, i64 0))
%107 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.30, i64 0, i64 0))
%108 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.31, i64 0, i64 0))
%109 = call i32 @stopDaemon(%struct.sNodeProperty** %3)
%110 = call i32 @free(i8* %36)
%111 = call i32 @free(i8* %66)
br label %112
112: ; preds = %71, %65
%113 = call i32 @delAllNodes(%struct.sNodeProperty** %3)
br label %114
114: ; preds = %68, %112, %52, %31, %8
%115 = phi i32 [ 0, %8 ], [ -1, %52 ], [ -1, %31 ], [ 0, %112 ], [ -2, %68 ]
ret i32 %115
}