#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*/ stderr;
void usage(void) {
  fprintf(stderr, "mcb -- simple memcached benchmark\n");
  fprintf(stderr, "usage: mcb -c {set|add|get} [OPTIONS]\n");
  fprintf(stderr, "\t-c {set|add|get}\t command type\n");
  fprintf(stderr, "\t-a <address>\t\t memcached address[127.0.0.1]\n");
  fprintf(stderr, "\t-p <num>\t\t memcached port[%d]\n", 11211);
  fprintf(stderr, "\t-T {TCP|UDP|UNIX_SOCKET} connection type[TCP]\n");
  fprintf(stderr, "\t-f <filepath>\t\t unix socket path\n");
  fprintf(stderr, "\t-t <1-%d>\t\t number of threads to run[%d]\n", 1024, 1);
  fprintf(stderr, "\t-n <1-%d>\t\t number of commands to send[%d]\n", 65535, 1);
  fprintf(stderr, "\t-m <1-%d>\t\t max key[%d]\n", 65535, 1000);
  fprintf(stderr, "\t-l <1-%d>\t\t average data length[%d]\n", 40960, 1024);
  fprintf(stderr, "\t-v\t\t\t verbose\n");
  fprintf(stderr, "\t-s\t\t\t connect to memcached for each command\n");
  fprintf(stderr, "\t-h\t\t\t help\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xee8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xef8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
lea    0xf02(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%edi
lea    0xf19(%rip),%rsi
mov    $0x2bcb,%edx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e4d(%rip),%rax
mov    (%rax),%edi
lea    0xf1d(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e36(%rip),%rax
mov    (%rax),%edi
lea    0xf36(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e1f(%rip),%rax
mov    (%rax),%edi
lea    0xf42(%rip),%rsi
mov    $0x400,%edx
mov    $0x1,%ecx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2dfe(%rip),%rax
mov    (%rax),%edi
lea    0xf4c(%rip),%rsi
mov    $0xffff,%edx
mov    $0x1,%ecx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ddd(%rip),%rax
mov    (%rax),%edi
lea    0xf58(%rip),%rsi
mov    $0xffff,%edx
mov    $0x3e8,%ecx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2dbc(%rip),%rax
mov    (%rax),%edi
lea    0xf51(%rip),%rsi
mov    $0xa000,%edx
mov    $0x400,%ecx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d9b(%rip),%rax
mov    (%rax),%edi
lea    0xf56(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d84(%rip),%rax
mov    (%rax),%edi
lea    0xf4f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d6d(%rip),%rax
mov    (%rax),%edi
lea    0xf66(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef2(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf09(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf1a(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf38(%rip),%rsi
mov    $0x2bcb,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf43(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf63(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf76(%rip),%rsi
mov    $0x400,%edx
mov    $0x1,%ecx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf87(%rip),%rsi
mov    $0xffff,%edx
mov    $0x1,%ecx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf9a(%rip),%rsi
mov    $0xffff,%edx
mov    $0x3e8,%ecx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf9a(%rip),%rsi
mov    $0xa000,%edx
mov    $0x400,%ecx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfa6(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfa6(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfc4(%rip),%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"mcb -- simple memcached benchmark\0A\00"
@.str.1 = [39 x i8] c"usage: mcb -c {set|add|get} [OPTIONS]\0A\00"
@.str.2 = [33 x i8] c"\09-c {set|add|get}\09 command type\0A\00"
@.str.3 = [46 x i8] c"\09-a <address>\09\09 memcached address[127.0.0.1]\0A\00"
@.str.4 = [32 x i8] c"\09-p <num>\09\09 memcached port[%d]\0A\00"
@.str.5 = [48 x i8] c"\09-T {TCP|UDP|UNIX_SOCKET} connection type[TCP]\0A\00"
@.str.6 = [35 x i8] c"\09-f <filepath>\09\09 unix socket path\0A\00"
@.str.7 = [43 x i8] c"\09-t <1-%d>\09\09 number of threads to run[%d]\0A\00"
@.str.8 = [45 x i8] c"\09-n <1-%d>\09\09 number of commands to send[%d]\0A\00"
@.str.9 = [26 x i8] c"\09-m <1-%d>\09\09 max key[%d]\0A\00"
@.str.10 = [38 x i8] c"\09-l <1-%d>\09\09 average data length[%d]\0A\00"
@.str.11 = [16 x i8] c"\09-v\09\09\09 verbose\0A\00"
@.str.12 = [46 x i8] c"\09-s\09\09\09 connect to memcached for each command\0A\00"
@.str.13 = [13 x i8] c"\09-h\09\09\09 help\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 11211)
%11 = load i32, i32* @stderr
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i32 1024, i32 1)
%17 = load i32, i32* @stderr
%18 = call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.8, i64 0, i64 0), i32 65535, i32 1)
%19 = load i32, i32* @stderr
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i32 65535, i32 1000)
%21 = load i32, i32* @stderr
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), i32 40960, i32 1024)
%23 = load i32, i32* @stderr
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
%25 = load i32, i32* @stderr
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.12, i64 0, i64 0))
%27 = load i32, i32* @stderr
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"mcb -- simple memcached benchmark\0A\00"
@.str.1 = [39 x i8] c"usage: mcb -c {set|add|get} [OPTIONS]\0A\00"
@.str.2 = [33 x i8] c"\09-c {set|add|get}\09 command type\0A\00"
@.str.3 = [46 x i8] c"\09-a <address>\09\09 memcached address[127.0.0.1]\0A\00"
@.str.4 = [32 x i8] c"\09-p <num>\09\09 memcached port[%d]\0A\00"
@.str.5 = [48 x i8] c"\09-T {TCP|UDP|UNIX_SOCKET} connection type[TCP]\0A\00"
@.str.6 = [35 x i8] c"\09-f <filepath>\09\09 unix socket path\0A\00"
@.str.7 = [43 x i8] c"\09-t <1-%d>\09\09 number of threads to run[%d]\0A\00"
@.str.8 = [45 x i8] c"\09-n <1-%d>\09\09 number of commands to send[%d]\0A\00"
@.str.9 = [26 x i8] c"\09-m <1-%d>\09\09 max key[%d]\0A\00"
@.str.10 = [38 x i8] c"\09-l <1-%d>\09\09 average data length[%d]\0A\00"
@.str.11 = [16 x i8] c"\09-v\09\09\09 verbose\0A\00"
@.str.12 = [46 x i8] c"\09-s\09\09\09 connect to memcached for each command\0A\00"
@.str.13 = [13 x i8] c"\09-h\09\09\09 help\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 11211)
%11 = load i32, i32* @stderr
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = tail call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i32 1024, i32 1)
%17 = load i32, i32* @stderr
%18 = tail call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.8, i64 0, i64 0), i32 65535, i32 1)
%19 = load i32, i32* @stderr
%20 = tail call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i32 65535, i32 1000)
%21 = load i32, i32* @stderr
%22 = tail call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), i32 40960, i32 1024)
%23 = load i32, i32* @stderr
%24 = tail call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
%25 = load i32, i32* @stderr
%26 = tail call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.12, i64 0, i64 0))
%27 = load i32, i32* @stderr
%28 = tail call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0))
ret void
}