#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*/ print_usage(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void print_help(void) {
  print_usage(stdout);
  printf("\nThis program converts a binary number to a decimal number.\n");
  printf("\nOptions:\n");
  printf("  -h or --help\tPrint this help text\n");
  printf("  --version\tPrint version and author info\n");
  printf("  -\t\tRead from stdin\n");
  printf("  -v\t\tEnable verbose output (print what type each result is)\n");
  printf("  -d\t\tDecimal output (default)\n");
  printf("  -b\t\tBinary output\n");
  printf("  -o\t\tOctal output\n");
  printf("  -x\t\tHexadecimal output\n");
  printf("  -X\t\tHex output with capital letters\n");
  printf("  -a\t\tPrecise hex output (printf %%a, see 'man 3 printf')\n");
  printf("  -A\t\tSame, but with capital letters\n");
  printf("  -s\t\tOutput in 4-character sections, space-separated\n");
  printf("  -l\t\tPrint a new line between sections of text\n");
  printf("  -t\t\tText conversion mode\n");
  printf("  -e\t\tRead binary numbers as little-endian\n");
  printf("  -E\t\tRead binary numbers as big-endian (default)\n");
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1040 <print_usage@plt>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
call   1030 <printf@plt>
lea    0xf10(%rip),%rdi
call   1030 <printf@plt>
lea    0xf2f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf39(%rip),%rdi
call   1030 <printf@plt>
lea    0xf6b(%rip),%rdi
call   1030 <printf@plt>
lea    0xf7f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf88(%rip),%rdi
call   1030 <printf@plt>
lea    0xf90(%rip),%rdi
call   1030 <printf@plt>
lea    0xf9e(%rip),%rdi
call   1030 <printf@plt>
lea    0xfb9(%rip),%rdi
call   1030 <printf@plt>
lea    0xfe8(%rip),%rdi
call   1030 <printf@plt>
lea    0x1002(%rip),%rdi
call   1030 <printf@plt>
lea    0x102d(%rip),%rdi
call   1030 <printf@plt>
lea    0x1052(%rip),%rdi
call   1030 <printf@plt>
lea    0x1062(%rip),%rdi
call   1030 <printf@plt>
lea    0x1082(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1050 <print_usage@plt>
lea    0xef5(%rip),%rdi
call   1030 <puts@plt>
lea    0xf25(%rip),%rdi
call   1030 <puts@plt>
lea    0xf23(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf59(%rip),%rdi
call   1030 <puts@plt>
lea    0xf62(%rip),%rdi
call   1030 <puts@plt>
lea    0xf93(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa6(%rip),%rdi
call   1030 <puts@plt>
lea    0xfae(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb5(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc2(%rip),%rdi
call   1030 <puts@plt>
lea    0xe36(%rip),%rdi
call   1040 <printf@plt>
lea    0xfd0(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe9(%rip),%rdi
call   1030 <puts@plt>
lea    0x1013(%rip),%rdi
call   1030 <puts@plt>
lea    0x1037(%rip),%rdi
call   1030 <puts@plt>
lea    0x1046(%rip),%rdi
call   1030 <puts@plt>
lea    0x1065(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [61 x i8] c"\0AThis program converts a binary number to a decimal number.\0A\00"
@.str.1 = [11 x i8] c"\0AOptions:\0A\00"
@.str.2 = [37 x i8] c" -h or --help\09Print this help text\0A\00"
@.str.3 = [43 x i8] c" --version\09Print version and author info\0A\00"
@.str.4 = [22 x i8] c" -\09\09Read from stdin\0A\00"
@.str.5 = [62 x i8] c" -v\09\09Enable verbose output (print what type each result is)\0A\00"
@.str.6 = [32 x i8] c" -d\09\09Decimal output (default)\0A\00"
@.str.7 = [21 x i8] c" -b\09\09Binary output\0A\00"
@.str.8 = [20 x i8] c" -o\09\09Octal output\0A\00"
@.str.9 = [26 x i8] c" -x\09\09Hexadecimal output\0A\00"
@.str.10 = [39 x i8] c" -X\09\09Hex output with capital letters\0A\00"
@.str.11 = [59 x i8] c" -a\09\09Precise hex output (printf %%a, see 'man 3 printf')\0A\00"
@.str.12 = [38 x i8] c" -A\09\09Same, but with capital letters\0A\00"
@.str.13 = [55 x i8] c" -s\09\09Output in 4-character sections, space-separated\0A\00"
@.str.14 = [49 x i8] c" -l\09\09Print a new line between sections of text\0A\00"
@.str.15 = [28 x i8] c" -t\09\09Text conversion mode\0A\00"
@.str.16 = [44 x i8] c" -e\09\09Read binary numbers as little-endian\0A\00"
@.str.17 = [51 x i8] c" -E\09\09Read binary numbers as big-endian (default)\0A\00"
define void @print_help() {
%1 = load i32, i32* @stdout
%2 = call i32 @print_usage(i32 %1)
%3 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.5, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.10, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.11, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.12, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.13, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.14, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.15, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.16, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.17, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str.11 = [59 x i8] c" -a\09\09Precise hex output (printf %%a, see 'man 3 printf')\0A\00"
@str = [60 x i8] c"\0AThis program converts a binary number to a decimal number.\00"
@str.18 = [10 x i8] c"\0AOptions:\00"
@str.19 = [36 x i8] c" -h or --help\09Print this help text\00"
@str.20 = [42 x i8] c" --version\09Print version and author info\00"
@str.21 = [21 x i8] c" -\09\09Read from stdin\00"
@str.22 = [61 x i8] c" -v\09\09Enable verbose output (print what type each result is)\00"
@str.23 = [31 x i8] c" -d\09\09Decimal output (default)\00"
@str.24 = [20 x i8] c" -b\09\09Binary output\00"
@str.25 = [19 x i8] c" -o\09\09Octal output\00"
@str.26 = [25 x i8] c" -x\09\09Hexadecimal output\00"
@str.27 = [38 x i8] c" -X\09\09Hex output with capital letters\00"
@str.28 = [37 x i8] c" -A\09\09Same, but with capital letters\00"
@str.29 = [54 x i8] c" -s\09\09Output in 4-character sections, space-separated\00"
@str.30 = [48 x i8] c" -l\09\09Print a new line between sections of text\00"
@str.31 = [27 x i8] c" -t\09\09Text conversion mode\00"
@str.32 = [43 x i8] c" -e\09\09Read binary numbers as little-endian\00"
@str.33 = [50 x i8] c" -E\09\09Read binary numbers as big-endian (default)\00"
define void @print_help() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @print_usage(i32 %1)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.18, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.19, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.20, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.21, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.22, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.23, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.24, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.25, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.26, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.27, i64 0, i64 0))
%14 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.11, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.28, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.29, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.30, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.31, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.32, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.33, i64 0, i64 0))
ret void
}