#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 *, ...);
int /*<<< orphan*/ usage();
void printh(void) {
  usage();
  printf("\n Options:\n");
  printf("%-17s %s\n", "   -c <value>", "specify path to config file");
  printf("%-17s %s\n", "   -d <value>", "print debug messages");
  printf("%-17s %s\n", "   -D", "start server as daemon");
  printf("%-17s %s\n", "   -l <value>", "specify path to log file");
  printf("%-17s %s\n", "   -p <value>", "specify path to pid file");
  printf("\n");
  printf("%-17s %s\n", "   -h --help", "print this help");
  printf("%-17s %s\n", "   -v --version", "print version information");
  printf("\nReport bugs to <pj.pandit@yahoo.co.in>\n");
}


x86 assembly (clang, -O0):
<printh>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <usage@plt>
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
lea    0xecf(%rip),%rsi
lea    0xed6(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
lea    0xedd(%rip),%rsi
lea    0xee4(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe94(%rip),%rdi
lea    0xee4(%rip),%rsi
lea    0xee3(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe78(%rip),%rdi
lea    0xee5(%rip),%rsi
lea    0xeec(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe5c(%rip),%rdi
lea    0xef0(%rip),%rsi
lea    0xef7(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe3e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe32(%rip),%rdi
lea    0xeed(%rip),%rsi
lea    0xef3(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe16(%rip),%rdi
lea    0xeee(%rip),%rsi
lea    0xef7(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printh>:
push   %rbx
xor    %eax,%eax
call   1060 <usage@plt>
lea    0xfba(%rip),%rdi
call   1040 <puts@plt>
lea    0xea5(%rip),%rbx
lea    0xea8(%rip),%rsi
lea    0xeaf(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeba(%rip),%rsi
lea    0xec1(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec5(%rip),%rsi
lea    0xec4(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeca(%rip),%rsi
lea    0xed1(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xed9(%rip),%rsi
lea    0xee0(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xede(%rip),%rsi
lea    0xee4(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xee3(%rip),%rsi
lea    0xeec(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf00(%rip),%rdi
pop    %rbx
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"\0A Options:\0A\00"
@.str.1 = [10 x i8] c"%-17s %s\0A\00"
@.str.2 = [14 x i8] c" -c <value>\00"
@.str.3 = [28 x i8] c"specify path to config file\00"
@.str.4 = [14 x i8] c" -d <value>\00"
@.str.5 = [21 x i8] c"print debug messages\00"
@.str.6 = [6 x i8] c" -D\00"
@.str.7 = [23 x i8] c"start server as daemon\00"
@.str.8 = [14 x i8] c" -l <value>\00"
@.str.9 = [25 x i8] c"specify path to log file\00"
@.str.10 = [14 x i8] c" -p <value>\00"
@.str.11 = [25 x i8] c"specify path to pid file\00"
@.str.12 = [2 x i8] c"\0A\00"
@.str.13 = [13 x i8] c" -h --help\00"
@.str.14 = [16 x i8] c"print this help\00"
@.str.15 = [16 x i8] c" -v --version\00"
@.str.16 = [26 x i8] c"print version information\00"
@.str.17 = [41 x i8] c"\0AReport bugs to <pj.pandit@yahoo.co.in>\0A\00"
define void @printh() {
%1 = call i32 (...) @usage()
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.17, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"%-17s %s\0A\00"
@.str.2 = [14 x i8] c" -c <value>\00"
@.str.3 = [28 x i8] c"specify path to config file\00"
@.str.4 = [14 x i8] c" -d <value>\00"
@.str.5 = [21 x i8] c"print debug messages\00"
@.str.6 = [6 x i8] c" -D\00"
@.str.7 = [23 x i8] c"start server as daemon\00"
@.str.8 = [14 x i8] c" -l <value>\00"
@.str.9 = [25 x i8] c"specify path to log file\00"
@.str.10 = [14 x i8] c" -p <value>\00"
@.str.11 = [25 x i8] c"specify path to pid file\00"
@.str.13 = [13 x i8] c" -h --help\00"
@.str.14 = [16 x i8] c"print this help\00"
@.str.15 = [16 x i8] c" -v --version\00"
@.str.16 = [26 x i8] c"print version information\00"
@str = [11 x i8] c"\0A Options:\00"
@str.18 = [40 x i8] c"\0AReport bugs to <pj.pandit@yahoo.co.in>\00"
define void @printh() {
%1 = tail call i32 (...) @usage()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.11, i64 0, i64 0))
%8 = tail call i32 @putchar(i32 10)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.14, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.18, i64 0, i64 0))
ret void
}