#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
void wr_help() {
  printf("Usage: ./mkbench [-c N] [-l N] [-s N] -p PID http://URL\n\n");
  printf("%sAvailable options%s\n", "\033[1m", "\033[0m");
  printf("  -p  \tserver process ID to test\n");
  printf("  -r  \tnumber of requests (default: %i)\n", 500000);
  printf("  -c  \tinitial concurrency (default: %i)\n", 100);
  printf("  -t  \tnumber of threads (default: %i)\n", 1);
  printf("  -l  \tmax concurrency after each step (default: %i)\n", 500);
  printf("  -s  \tnumber of concurrency steps (default: %i)\n", 20);
  printf("  -N  \tdo not gather system resources usage\n");
  printf("  -v  \tshow version number\n");
  printf("  -h, \tprint this help\n\n");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<wr_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf01(%rip),%rdi
lea    0xf11(%rip),%rsi
lea    0xf0f(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1a(%rip),%rdi
mov    $0x7a120,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf30(%rip),%rdi
mov    $0x64,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf47(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf5c(%rip),%rdi
mov    $0x1f4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf7f(%rip),%rdi
mov    $0x14,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfbd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfcb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2df4(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wr_help>:
push   %rax
lea    0xfcc(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0xecc(%rip),%rsi
lea    0xeca(%rip),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfdd(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb5(%rip),%rdi
mov    $0x7a120,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x1f4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf1a(%rip),%rdi
mov    $0x14,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf93(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb3(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc2(%rip),%rdi
call   1030 <puts@plt>
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1050 <fflush@plt>

LLVM IR (-O0):
@.str = [58 x i8] c"Usage: ./mkbench [-c N] [-l N] [-s N] -p PID http://URL\0A\0A\00"
@.str.1 = [23 x i8] c"%sAvailable options%s\0A\00"
@.str.2 = [5 x i8] c"\1B[1m\00"
@.str.3 = [5 x i8] c"\1B[0m\00"
@.str.4 = [34 x i8] c" -p \09server process ID to test\0A\00"
@.str.5 = [41 x i8] c" -r \09number of requests (default: %i)\0A\00"
@.str.6 = [42 x i8] c" -c \09initial concurrency (default: %i)\0A\00"
@.str.7 = [40 x i8] c" -t \09number of threads (default: %i)\0A\00"
@.str.8 = [54 x i8] c" -l \09max concurrency after each step (default: %i)\0A\00"
@.str.9 = [50 x i8] c" -s \09number of concurrency steps (default: %i)\0A\00"
@.str.10 = [45 x i8] c" -N \09do not gather system resources usage\0A\00"
@.str.11 = [28 x i8] c" -v \09show version number\0A\00"
@.str.12 = [25 x i8] c" -h, \09print this help\0A\0A\00"
@stdout = global i32 0
define void @wr_help() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i32 500000)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), i32 100)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0), i32 1)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0), i32 500)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0), i32 20)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.10, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.12, i64 0, i64 0))
%12 = load i32, i32* @stdout
%13 = call i32 @fflush(i32 %12)
ret void
}

LLVM IR (-O2):
@.str.1 = [23 x i8] c"%sAvailable options%s\0A\00"
@.str.2 = [5 x i8] c"\1B[1m\00"
@.str.3 = [5 x i8] c"\1B[0m\00"
@.str.5 = [41 x i8] c" -r \09number of requests (default: %i)\0A\00"
@.str.6 = [42 x i8] c" -c \09initial concurrency (default: %i)\0A\00"
@.str.7 = [40 x i8] c" -t \09number of threads (default: %i)\0A\00"
@.str.8 = [54 x i8] c" -l \09max concurrency after each step (default: %i)\0A\00"
@.str.9 = [50 x i8] c" -s \09number of concurrency steps (default: %i)\0A\00"
@stdout = global i32 0
@str = [57 x i8] c"Usage: ./mkbench [-c N] [-l N] [-s N] -p PID http://URL\0A\00"
@str.13 = [33 x i8] c" -p \09server process ID to test\00"
@str.14 = [44 x i8] c" -N \09do not gather system resources usage\00"
@str.15 = [27 x i8] c" -v \09show version number\00"
@str.16 = [24 x i8] c" -h, \09print this help\0A\00"
define void @wr_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.13, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), i32 500000)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), i32 100)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.7, i64 0, i64 0), i32 1)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.8, i64 0, i64 0), i32 500)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.9, i64 0, i64 0), i32 20)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.14, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.15, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.16, i64 0, i64 0))
%12 = load i32, i32* @stdout
%13 = tail call i32 @fflush(i32 %12)
ret void
}