#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(char *exefile) {
  fprintf(stderr, "#=======================================\n");
  fprintf(stderr, "# TieMa(Tiny&Mini) Memory Cached\n");
  fprintf(stderr, "# Version %s\n", "1.0.0_alpha");
  fprintf(stderr, "# \n");
  fprintf(stderr, "# heiyeluren <blog.csdn.net/heiyeshuwu>\n");
  fprintf(stderr, "#=======================================\n\n");
  fprintf(stderr, "usage: %s [OPTION] ... \n", exefile);
  fprintf(
      stderr,
      "\nOptions: \n  -p <num>	port number to listen on,default 11211\n  "
      "-d		run as a daemon, default No\n  -m <num>	max memory to "
      "use for items in megabytes, default is 16M\n  -c <num>	max "
      "simultaneous connections, default is 1024\n  -v		print version "
      "information\n  -h		print this help and exit\n");
  fprintf(stderr, "\nExample: \n  %s -p 11211 -m 16 -c 1024 -d\n", exefile);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
lea    0xee7(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
lea    0xef2(%rip),%rsi
lea    0xef9(%rip),%rdx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
lea    0xeee(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e43(%rip),%rax
mov    (%rax),%edi
lea    0xeed(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e2c(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xefd(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e11(%rip),%rax
mov    (%rax),%edi
lea    0xeff(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2dfa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x1000(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    0x2ec2(%rip),%rbx
mov    (%rbx),%edi
lea    0xed9(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef3(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf05(%rip),%rsi
lea    0xf0c(%rip),%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf08(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xefc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf15(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf30(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf36(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1042(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"#=======================================\0A\00"
@.str.1 = [34 x i8] c"# TieMa(Tiny&Mini) Memory Cached\0A\00"
@.str.2 = [14 x i8] c"# Version %s\0A\00"
@.str.3 = [12 x i8] c"1.0.0_alpha\00"
@.str.4 = [4 x i8] c"# \0A\00"
@.str.5 = [41 x i8] c"# heiyeluren <blog.csdn.net/heiyeshuwu>\0A\00"
@.str.6 = [43 x i8] c"#=======================================\0A\0A\00"
@.str.7 = [25 x i8] c"usage: %s [OPTION] ... \0A\00"
@.str.8 = [284 x i8] c"\0AOptions: \0A -p <num>\09port number to listen on,default 11211\0A -d\09\09run as a daemon, default No\0A -m <num>\09max memory to use for items in megabytes, default is 16M\0A -c <num>\09max simultaneous connections, default is 1024\0A -v\09\09print version information\0A -h\09\09print this help and exit\0A\00"
@.str.9 = [43 x i8] c"\0AExample: \0A %s -p 11211 -m 16 -c 1024 -d\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = load i8*, i8** %2
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i8* %16)
%18 = load i32, i32* @stderr
%19 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([284 x i8], [284 x i8]* @.str.8, i64 0, i64 0))
%20 = load i32, i32* @stderr
%21 = load i8*, i8** %2
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.9, i64 0, i64 0), i8* %21)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"#=======================================\0A\00"
@.str.1 = [34 x i8] c"# TieMa(Tiny&Mini) Memory Cached\0A\00"
@.str.2 = [14 x i8] c"# Version %s\0A\00"
@.str.3 = [12 x i8] c"1.0.0_alpha\00"
@.str.4 = [4 x i8] c"# \0A\00"
@.str.5 = [41 x i8] c"# heiyeluren <blog.csdn.net/heiyeshuwu>\0A\00"
@.str.6 = [43 x i8] c"#=======================================\0A\0A\00"
@.str.7 = [25 x i8] c"usage: %s [OPTION] ... \0A\00"
@.str.8 = [284 x i8] c"\0AOptions: \0A -p <num>\09port number to listen on,default 11211\0A -d\09\09run as a daemon, default No\0A -m <num>\09max memory to use for items in megabytes, default is 16M\0A -c <num>\09max simultaneous connections, default is 1024\0A -v\09\09print version information\0A -h\09\09print this help and exit\0A\00"
@.str.9 = [43 x i8] c"\0AExample: \0A %s -p 11211 -m 16 -c 1024 -d\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0))
%14 = load i32, i32* @stderr
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i8* %0)
%16 = load i32, i32* @stderr
%17 = tail call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([284 x i8], [284 x i8]* @.str.8, i64 0, i64 0))
%18 = load i32, i32* @stderr
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.9, i64 0, i64 0), i8* %0)
ret void
}