#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*/ stdout;
void show_usage() {
  fprintf(stdout, "pearldb - a key value server\n");
  fprintf(stdout, "\n");
  fprintf(stdout, "Usage:\n");
  fprintf(stdout, "  pearldb [--daemonize | -P DB_PATH | -H HOST | -p PORT | "
                  "-w WORKERS | -s SIZE | -i PID_FILE]\n");
  fprintf(stdout, "  pearldb stat [-P DB_PATH]\n");
  fprintf(stdout, "  pearldb drop [-P DB_PATH]\n");
  fprintf(stdout, "  pearldb --version\n");
  fprintf(stdout, "  pearldb --help\n");
  fprintf(stdout, "\n");
  fprintf(stdout, "Options:\n");
  fprintf(stdout, "  -d --daemonize           Run as a daemon.\n");
  fprintf(stdout, "  -P --path DB_PATH        Path where database files will "
                  "be kept [default: store]\n");
  fprintf(
      stdout,
      "  -H --host HOST           Host to listen on [default: 127.0.0.1]\n");
  fprintf(stdout,
          "  -p --port PORT           Port to listen on [default: 8888]\n");
  fprintf(stdout,
          "  -w --workers WORKERS     Number of worker threads [default: 8]\n");
  fprintf(stdout, "  -s --db_size SIZE        Size of database in megabytes "
                  "[default: 1000]\n");
  fprintf(
      stdout,
      "  -i --pid_file PID_FILE   Pid file [default: /var/run/pearl.pid]\n");
  fprintf(stdout, "  -v --version             Display version.\n");
  fprintf(stdout, "  -h --help                Prints a short usage summary.\n");
  fprintf(stdout, "\n");
  fprintf(stdout, "Commands:\n");
  fprintf(stdout, "  stat                     Show statistics\n");
  fprintf(stdout, "  drop                     Delete database\n");
  fprintf(stdout, "\n");
}


x86 assembly (clang, -O0):
<show_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0x11b3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
lea    0xec3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
lea    0xf0d(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%edi
lea    0xf15(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e47(%rip),%rax
mov    (%rax),%edi
lea    0xf1d(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e32(%rip),%rax
mov    (%rax),%edi
lea    0xf1d(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e1d(%rip),%rax
mov    (%rax),%edi
lea    0x1120(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e08(%rip),%rax
mov    (%rax),%edi
lea    0xf05(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2df3(%rip),%rax
mov    (%rax),%edi
lea    0xefa(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2dde(%rip),%rax
mov    (%rax),%edi
lea    0xf12(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2dc9(%rip),%rax
mov    (%rax),%edi
lea    0xf51(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2db4(%rip),%rax
mov    (%rax),%edi
lea    0xf7f(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2d9f(%rip),%rax
mov    (%rax),%edi
lea    0xfa8(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2d8a(%rip),%rax
mov    (%rax),%edi
lea    0xfd5(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2d75(%rip),%rax
mov    (%rax),%edi
lea    0x100a(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2d60(%rip),%rax
mov    (%rax),%edi
lea    0x1038(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2d4b(%rip),%rax
mov    (%rax),%edi
lea    0x1050(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2d36(%rip),%rax
mov    (%rax),%edi
lea    0x1039(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2d21(%rip),%rax
mov    (%rax),%edi
lea    0x1060(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2d0c(%rip),%rax
mov    (%rax),%edi
lea    0x1056(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2cf7(%rip),%rax
mov    (%rax),%edi
lea    0x106d(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ce2(%rip),%rax
mov    (%rax),%edi
lea    0xfe5(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_usage>:
push   %r14
push   %rbx
push   %rax
mov    0x2ec5(%rip),%rbx
mov    (%rbx),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x11ba(%rip),%r14
mov    %r14,%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xedb(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed5(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf26(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf35(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf44(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf4b(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
mov    %r14,%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf45(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf41(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf60(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfa6(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfdb(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x100b(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x103f(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x107b(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x10b0(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x10cf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
mov    %r14,%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x10f1(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x10ee(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x110c(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [30 x i8] c"pearldb - a key value server\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [8 x i8] c"Usage:\0A\00"
@.str.3 = [95 x i8] c" pearldb [--daemonize | -P DB_PATH | -H HOST | -p PORT | -w WORKERS | -s SIZE | -i PID_FILE]\0A\00"
@.str.4 = [29 x i8] c" pearldb stat [-P DB_PATH]\0A\00"
@.str.5 = [29 x i8] c" pearldb drop [-P DB_PATH]\0A\00"
@.str.6 = [21 x i8] c" pearldb --version\0A\00"
@.str.7 = [18 x i8] c" pearldb --help\0A\00"
@.str.8 = [10 x i8] c"Options:\0A\00"
@.str.9 = [45 x i8] c" -d --daemonize Run as a daemon.\0A\00"
@.str.10 = [84 x i8] c" -P --path DB_PATH Path where database files will be kept [default: store]\0A\00"
@.str.11 = [67 x i8] c" -H --host HOST Host to listen on [default: 127.0.0.1]\0A\00"
@.str.12 = [62 x i8] c" -p --port PORT Port to listen on [default: 8888]\0A\00"
@.str.13 = [66 x i8] c" -w --workers WORKERS Number of worker threads [default: 8]\0A\00"
@.str.14 = [74 x i8] c" -s --db_size SIZE Size of database in megabytes [default: 1000]\0A\00"
@.str.15 = [67 x i8] c" -i --pid_file PID_FILE Pid file [default: /var/run/pearl.pid]\0A\00"
@.str.16 = [45 x i8] c" -v --version Display version.\0A\00"
@.str.17 = [58 x i8] c" -h --help Prints a short usage summary.\0A\00"
@.str.18 = [11 x i8] c"Commands:\0A\00"
@.str.19 = [44 x i8] c" stat Show statistics\0A\00"
@.str.20 = [44 x i8] c" drop Delete database\0A\00"
define void @show_usage() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32, i32* @stdout
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%11 = load i32, i32* @stdout
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* @stdout
%14 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%15 = load i32, i32* @stdout
%16 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%17 = load i32, i32* @stdout
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%19 = load i32, i32* @stdout
%20 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
%21 = load i32, i32* @stdout
%22 = call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.9, i64 0, i64 0))
%23 = load i32, i32* @stdout
%24 = call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.10, i64 0, i64 0))
%25 = load i32, i32* @stdout
%26 = call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.11, i64 0, i64 0))
%27 = load i32, i32* @stdout
%28 = call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.12, i64 0, i64 0))
%29 = load i32, i32* @stdout
%30 = call i32 @fprintf(i32 %29, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.13, i64 0, i64 0))
%31 = load i32, i32* @stdout
%32 = call i32 @fprintf(i32 %31, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.14, i64 0, i64 0))
%33 = load i32, i32* @stdout
%34 = call i32 @fprintf(i32 %33, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.15, i64 0, i64 0))
%35 = load i32, i32* @stdout
%36 = call i32 @fprintf(i32 %35, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.16, i64 0, i64 0))
%37 = load i32, i32* @stdout
%38 = call i32 @fprintf(i32 %37, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.17, i64 0, i64 0))
%39 = load i32, i32* @stdout
%40 = call i32 @fprintf(i32 %39, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%41 = load i32, i32* @stdout
%42 = call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.18, i64 0, i64 0))
%43 = load i32, i32* @stdout
%44 = call i32 @fprintf(i32 %43, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.19, i64 0, i64 0))
%45 = load i32, i32* @stdout
%46 = call i32 @fprintf(i32 %45, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.20, i64 0, i64 0))
%47 = load i32, i32* @stdout
%48 = call i32 @fprintf(i32 %47, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [30 x i8] c"pearldb - a key value server\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [8 x i8] c"Usage:\0A\00"
@.str.3 = [95 x i8] c" pearldb [--daemonize | -P DB_PATH | -H HOST | -p PORT | -w WORKERS | -s SIZE | -i PID_FILE]\0A\00"
@.str.4 = [29 x i8] c" pearldb stat [-P DB_PATH]\0A\00"
@.str.5 = [29 x i8] c" pearldb drop [-P DB_PATH]\0A\00"
@.str.6 = [21 x i8] c" pearldb --version\0A\00"
@.str.7 = [18 x i8] c" pearldb --help\0A\00"
@.str.8 = [10 x i8] c"Options:\0A\00"
@.str.9 = [45 x i8] c" -d --daemonize Run as a daemon.\0A\00"
@.str.10 = [84 x i8] c" -P --path DB_PATH Path where database files will be kept [default: store]\0A\00"
@.str.11 = [67 x i8] c" -H --host HOST Host to listen on [default: 127.0.0.1]\0A\00"
@.str.12 = [62 x i8] c" -p --port PORT Port to listen on [default: 8888]\0A\00"
@.str.13 = [66 x i8] c" -w --workers WORKERS Number of worker threads [default: 8]\0A\00"
@.str.14 = [74 x i8] c" -s --db_size SIZE Size of database in megabytes [default: 1000]\0A\00"
@.str.15 = [67 x i8] c" -i --pid_file PID_FILE Pid file [default: /var/run/pearl.pid]\0A\00"
@.str.16 = [45 x i8] c" -v --version Display version.\0A\00"
@.str.17 = [58 x i8] c" -h --help Prints a short usage summary.\0A\00"
@.str.18 = [11 x i8] c"Commands:\0A\00"
@.str.19 = [44 x i8] c" stat Show statistics\0A\00"
@.str.20 = [44 x i8] c" drop Delete database\0A\00"
define void @show_usage() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32, i32* @stdout
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%11 = load i32, i32* @stdout
%12 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* @stdout
%14 = tail call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%15 = load i32, i32* @stdout
%16 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0))
%17 = load i32, i32* @stdout
%18 = tail call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%19 = load i32, i32* @stdout
%20 = tail call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
%21 = load i32, i32* @stdout
%22 = tail call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.9, i64 0, i64 0))
%23 = load i32, i32* @stdout
%24 = tail call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.10, i64 0, i64 0))
%25 = load i32, i32* @stdout
%26 = tail call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.11, i64 0, i64 0))
%27 = load i32, i32* @stdout
%28 = tail call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.12, i64 0, i64 0))
%29 = load i32, i32* @stdout
%30 = tail call i32 @fprintf(i32 %29, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.13, i64 0, i64 0))
%31 = load i32, i32* @stdout
%32 = tail call i32 @fprintf(i32 %31, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.14, i64 0, i64 0))
%33 = load i32, i32* @stdout
%34 = tail call i32 @fprintf(i32 %33, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.15, i64 0, i64 0))
%35 = load i32, i32* @stdout
%36 = tail call i32 @fprintf(i32 %35, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.16, i64 0, i64 0))
%37 = load i32, i32* @stdout
%38 = tail call i32 @fprintf(i32 %37, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.17, i64 0, i64 0))
%39 = load i32, i32* @stdout
%40 = tail call i32 @fprintf(i32 %39, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%41 = load i32, i32* @stdout
%42 = tail call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.18, i64 0, i64 0))
%43 = load i32, i32* @stdout
%44 = tail call i32 @fprintf(i32 %43, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.19, i64 0, i64 0))
%45 = load i32, i32* @stdout
%46 = tail call i32 @fprintf(i32 %45, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.20, i64 0, i64 0))
%47 = load i32, i32* @stdout
%48 = tail call i32 @fprintf(i32 %47, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}