#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");
  printf("Options:\n");
  printf("%-18s %s\n", "   -h <X>", "Number of default geometry heads");
  printf("%-18s %s\n", "   -s <X>", "Number of default geometry sectors");
  printf("%-18s %s\n", "   -e --entry", "Specify partition entry number (1-4)");
  printf("%-18s %s\n", "   -o --offset",
         "Specify partition offset (default 0)");
  printf("%-18s %s\n", "   -t --type", "Specify partition type (default 0x17)");
  printf("%-18s %s\n", "   -i --id", "Specify MBR ID (default random)");
  printf("\n");
  printf("%-18s %s\n", "   --forcehd0", "Assume we are loaded as disk ID 0");
  printf("%-18s %s\n", "   --ctrlhd0",
         "Assume disk ID 0 if the Ctrl key is pressed");
  printf("%-18s %s\n", "   --partok", "Allow booting from within a partition");
  printf("\n");
  printf("%-18s %s\n", "   -? --help", "Display this help");
  printf("%-18s %s\n", "   -v --verbose", "Display verbose output");
  printf("%-18s %s\n", "   -V --version", "Display version information");
  printf("\n");
  printf("Report 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    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
lea    0xebf(%rip),%rsi
lea    0xec2(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea0(%rip),%rdi
lea    0xece(%rip),%rsi
lea    0xed1(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe84(%rip),%rdi
lea    0xedf(%rip),%rsi
lea    0xee6(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe68(%rip),%rdi
lea    0xef6(%rip),%rsi
lea    0xefe(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe4c(%rip),%rdi
lea    0xf0e(%rip),%rsi
lea    0xf14(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe30(%rip),%rdi
lea    0xf25(%rip),%rsi
lea    0xf29(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe06(%rip),%rdi
lea    0xf26(%rip),%rsi
lea    0xf2d(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdea(%rip),%rdi
lea    0xf3a(%rip),%rsi
lea    0xf40(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdce(%rip),%rdi
lea    0xf57(%rip),%rsi
lea    0xf5c(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xda4(%rip),%rdi
lea    0xf5f(%rip),%rsi
lea    0xf65(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd88(%rip),%rdi
lea    0xf62(%rip),%rsi
lea    0xf6b(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd6c(%rip),%rdi
lea    0xf6d(%rip),%rsi
lea    0xf76(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf76(%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>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x10db(%rip),%rdi
call   1040 <puts@plt>
lea    0xe9b(%rip),%rbx
lea    0xe9e(%rip),%rsi
lea    0xea1(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb1(%rip),%rsi
lea    0xeb4(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec6(%rip),%rsi
lea    0xecd(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xee1(%rip),%rsi
lea    0xee9(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xefd(%rip),%rsi
lea    0xf03(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf18(%rip),%rsi
lea    0xf1c(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf21(%rip),%rsi
lea    0xf28(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf39(%rip),%rsi
lea    0xf3f(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf5a(%rip),%rsi
lea    0xf5f(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf6a(%rip),%rsi
lea    0xf70(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf71(%rip),%rsi
lea    0xf7a(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf80(%rip),%rsi
lea    0xf89(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf93(%rip),%rdi
pop    %rbx
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [10 x i8] c"Options:\0A\00"
@.str.2 = [10 x i8] c"%-18s %s\0A\00"
@.str.3 = [10 x i8] c" -h <X>\00"
@.str.4 = [33 x i8] c"Number of default geometry heads\00"
@.str.5 = [10 x i8] c" -s <X>\00"
@.str.6 = [35 x i8] c"Number of default geometry sectors\00"
@.str.7 = [14 x i8] c" -e --entry\00"
@.str.8 = [37 x i8] c"Specify partition entry number (1-4)\00"
@.str.9 = [15 x i8] c" -o --offset\00"
@.str.10 = [37 x i8] c"Specify partition offset (default 0)\00"
@.str.11 = [13 x i8] c" -t --type\00"
@.str.12 = [38 x i8] c"Specify partition type (default 0x17)\00"
@.str.13 = [11 x i8] c" -i --id\00"
@.str.14 = [32 x i8] c"Specify MBR ID (default random)\00"
@.str.15 = [14 x i8] c" --forcehd0\00"
@.str.16 = [34 x i8] c"Assume we are loaded as disk ID 0\00"
@.str.17 = [13 x i8] c" --ctrlhd0\00"
@.str.18 = [44 x i8] c"Assume disk ID 0 if the Ctrl key is pressed\00"
@.str.19 = [12 x i8] c" --partok\00"
@.str.20 = [38 x i8] c"Allow booting from within a partition\00"
@.str.21 = [13 x i8] c" -? --help\00"
@.str.22 = [18 x i8] c"Display this help\00"
@.str.23 = [16 x i8] c" -v --verbose\00"
@.str.24 = [23 x i8] c"Display verbose output\00"
@.str.25 = [16 x i8] c" -V --version\00"
@.str.26 = [28 x i8] c"Display version information\00"
@.str.27 = [40 x i8] c"Report bugs to <pj.pandit@yahoo.co.in>\0A\00"
define void @printh() {
%1 = call i32 (...) @usage()
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 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))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.12, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.14, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.16, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.18, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.20, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.22, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.24, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.25, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.26, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.27, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.2 = [10 x i8] c"%-18s %s\0A\00"
@.str.3 = [10 x i8] c" -h <X>\00"
@.str.4 = [33 x i8] c"Number of default geometry heads\00"
@.str.5 = [10 x i8] c" -s <X>\00"
@.str.6 = [35 x i8] c"Number of default geometry sectors\00"
@.str.7 = [14 x i8] c" -e --entry\00"
@.str.8 = [37 x i8] c"Specify partition entry number (1-4)\00"
@.str.9 = [15 x i8] c" -o --offset\00"
@.str.10 = [37 x i8] c"Specify partition offset (default 0)\00"
@.str.11 = [13 x i8] c" -t --type\00"
@.str.12 = [38 x i8] c"Specify partition type (default 0x17)\00"
@.str.13 = [11 x i8] c" -i --id\00"
@.str.14 = [32 x i8] c"Specify MBR ID (default random)\00"
@.str.15 = [14 x i8] c" --forcehd0\00"
@.str.16 = [34 x i8] c"Assume we are loaded as disk ID 0\00"
@.str.17 = [13 x i8] c" --ctrlhd0\00"
@.str.18 = [44 x i8] c"Assume disk ID 0 if the Ctrl key is pressed\00"
@.str.19 = [12 x i8] c" --partok\00"
@.str.20 = [38 x i8] c"Allow booting from within a partition\00"
@.str.21 = [13 x i8] c" -? --help\00"
@.str.22 = [18 x i8] c"Display this help\00"
@.str.23 = [16 x i8] c" -v --verbose\00"
@.str.24 = [23 x i8] c"Display verbose output\00"
@.str.25 = [16 x i8] c" -V --version\00"
@.str.26 = [28 x i8] c"Display version information\00"
@str = [9 x i8] c"Options:\00"
@str.28 = [39 x i8] c"Report bugs to <pj.pandit@yahoo.co.in>\00"
define void @printh() {
%1 = tail call i32 (...) @usage()
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.12, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.14, i64 0, i64 0))
%10 = tail call i32 @putchar(i32 10)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.16, i64 0, i64 0))
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.18, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.20, i64 0, i64 0))
%14 = tail call i32 @putchar(i32 10)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.21, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.22, i64 0, i64 0))
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.23, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.24, i64 0, i64 0))
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.25, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.26, i64 0, i64 0))
%18 = tail call i32 @putchar(i32 10)
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str.28, i64 0, i64 0))
ret void
}