#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*/ printf(char *, char *);
void usage(void) {
  int i;
  char *usage_str =
      "\nUsage:\n gvd [config parameters]\n\nConfig Parameters:\n";
  char *cfg[] = {" -a <addr>\t\tIp Address\n",
                 " -p <port>\t\tPort\n",
                 " -S <mbps>\t\tOveral Speed measured in bit per seconds\n",
                 " -s <mbps>\t\tSocket Speed: Maximun per socket speed "
                 "measured in bit per seconds\n",
                 " -r <bytes>\t\tRead Max Buffer Per Socket\n",
                 " -w <byets>\t\tWrite Max Buffer Per Socket\n",
                 " -m <bytes>\t\tMtu Size\n",
                 " -l <path>\t\tUnix Socket Api\n",
                 " -P <path>\t\tPid File\n",
                 " -n <path>\t\tNetstat File\n",
                 " -e <path>\t\tError File\n",
                 " -d       \t\tDaemon Mode\n",
                 " -h       \t\tShow This Help\n",
                 NULL};
  char *end = "\nReport Bugs to: <emiliano.billi@gmail.com>\n";
  printf("%s", usage_str);
  for (i = 0; cfg[i]; i++)
    printf("%s", cfg[i]);
  printf("%s", end);
  return;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
lea    0xece(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
lea    0x2c6f(%rip),%rsi
mov    $0x70,%edx
call   1040 <memcpy@plt>
lea    0x1098(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    -0x10(%rbp),%rsi
lea    0x10b3(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
movslq -0x4(%rbp),%rax
cmpq   $0x0,-0x80(%rbp,%rax,8)
je     11a3 <usage+0x83>
movslq -0x4(%rbp),%rax
mov    -0x80(%rbp,%rax,8),%rsi
lea    0x1087(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1170 <usage+0x50>
mov    -0x88(%rbp),%rsi
lea    0x1066(%rip),%rdi
call   1030 <printf@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
lea    0x10ff(%rip),%rbx
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf08(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf11(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf14(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf3b(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf7c(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf96(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xfb1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xfb9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xfc7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xfce(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xfd9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xfe2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xfec(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xff9(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"\0AUsage:\0A gvd [config parameters]\0A\0AConfig Parameters:\0A\00"
@.str.1 = [24 x i8] c" -a <addr>\09\09Ip Address\0A\00"
@.str.2 = [18 x i8] c" -p <port>\09\09Port\0A\00"
@.str.3 = [54 x i8] c" -S <mbps>\09\09Overal Speed measured in bit per seconds\0A\00"
@.str.4 = [80 x i8] c" -s <mbps>\09\09Socket Speed: Maximun per socket speed measured in bit per seconds\0A\00"
@.str.5 = [41 x i8] c" -r <bytes>\09\09Read Max Buffer Per Socket\0A\00"
@.str.6 = [42 x i8] c" -w <byets>\09\09Write Max Buffer Per Socket\0A\00"
@.str.7 = [23 x i8] c" -m <bytes>\09\09Mtu Size\0A\00"
@.str.8 = [29 x i8] c" -l <path>\09\09Unix Socket Api\0A\00"
@.str.9 = [22 x i8] c" -P <path>\09\09Pid File\0A\00"
@.str.10 = [26 x i8] c" -n <path>\09\09Netstat File\0A\00"
@.str.11 = [24 x i8] c" -e <path>\09\09Error File\0A\00"
@.str.12 = [25 x i8] c" -d \09\09Daemon Mode\0A\00"
@.str.13 = [28 x i8] c" -h \09\09Show This Help\0A\00"
@__const.usage.cfg = [14 x i8*] [i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i32 0, i32 0), i8* null]
@.str.14 = [45 x i8] c"\0AReport Bugs to: <emiliano.billi@gmail.com>\0A\00"
@.str.15 = [3 x i8] c"%s\00"
define void @usage() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca [14 x i8*]
%4 = alloca i8*
store i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8** %2
%5 = bitcast [14 x i8*]* %3 to i8*
store i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.14, i64 0, i64 0), i8** %4
%6 = load i8*, i8** %2
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %6)
store i32 0, i32* %1
br label %8
8: ; preds = %20, %0
%9 = load i32, i32* %1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [14 x i8*], [14 x i8*]* %3, i64 0, i64 %10
%12 = load i8*, i8** %11
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %23
14: ; preds = %8
%15 = load i32, i32* %1
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [14 x i8*], [14 x i8*]* %3, i64 0, i64 %16
%18 = load i8*, i8** %17
%19 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %18)
br label %20
20: ; preds = %14
%21 = load i32, i32* %1
%22 = add nsw i32 %21, 1
store i32 %22, i32* %1
br label %8
23: ; preds = %8
%24 = load i8*, i8** %4
%25 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* %24)
ret void
}

LLVM IR (-O2):
@.str = [54 x i8] c"\0AUsage:\0A gvd [config parameters]\0A\0AConfig Parameters:\0A\00"
@.str.1 = [24 x i8] c" -a <addr>\09\09Ip Address\0A\00"
@.str.2 = [18 x i8] c" -p <port>\09\09Port\0A\00"
@.str.3 = [54 x i8] c" -S <mbps>\09\09Overal Speed measured in bit per seconds\0A\00"
@.str.4 = [80 x i8] c" -s <mbps>\09\09Socket Speed: Maximun per socket speed measured in bit per seconds\0A\00"
@.str.5 = [41 x i8] c" -r <bytes>\09\09Read Max Buffer Per Socket\0A\00"
@.str.6 = [42 x i8] c" -w <byets>\09\09Write Max Buffer Per Socket\0A\00"
@.str.7 = [23 x i8] c" -m <bytes>\09\09Mtu Size\0A\00"
@.str.8 = [29 x i8] c" -l <path>\09\09Unix Socket Api\0A\00"
@.str.9 = [22 x i8] c" -P <path>\09\09Pid File\0A\00"
@.str.10 = [26 x i8] c" -n <path>\09\09Netstat File\0A\00"
@.str.11 = [24 x i8] c" -e <path>\09\09Error File\0A\00"
@.str.12 = [25 x i8] c" -d \09\09Daemon Mode\0A\00"
@.str.13 = [28 x i8] c" -h \09\09Show This Help\0A\00"
@.str.14 = [45 x i8] c"\0AReport Bugs to: <emiliano.billi@gmail.com>\0A\00"
@.str.15 = [3 x i8] c"%s\00"
define void @usage() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0))
%8 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%9 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0))
%11 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0))
%12 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0))
%13 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0))
%14 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.13, i64 0, i64 0))
%15 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.14, i64 0, i64 0))
ret void
}