#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
int show_help(void) {
  printf("bp - A binary parse tool\n");
  printf("   Version: %s\n", "0.27.2");
  printf("   Usage: bp -a | -h | <options> <bpf_file> [bin_file]\n");
  printf("   Options:\n");
  printf("     -a         Show \"about\" information (and exit).\n");
  printf("     -c         Validate the BPF file (stop after 2nd stage "
         "compile).\n");
  printf("     -e         Swap endianness of the data\n");
  printf("     -f X       Output separator ---> <label>X<value>\n");
  printf("     -h         Show \"help\" information (and exit).\n");
  printf("     -l         Simplified output ---> <value>\n");
  printf("     -t         Use tag instead of label in output ---> "
         "<tag>:<value>\n");
  printf("     -v         Be verbose\n");
  printf("     -x         Dump output in Hex (0xdeadbeef)\n");
  printf("     -X         Dump output in Hex (0XDEADBEEF)\n");
  printf("\n");
  printf("    Double dash options:\n");
  printf("      --help/-h           --about/-a          --validate/-c\n");
  printf(
      "      --verbose/-v        --endian_swap/-e    --field_separator/-f\n");
  printf("      --passes/-p         --no_labels/-l      --show_tag/-t\n");
  printf("      --dump_hex/-x       --dump_HEX/-X\n");
  fflush(stdout);
  return (0);
}


x86 assembly (clang, -O0):
<show_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
lea    0xeea(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf34(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf6d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfdc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xffe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1037(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1045(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1068(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1089(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x107d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1089(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10b8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10ee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x111d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d96(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_help>:
push   %rax
lea    0xecf(%rip),%rdi
call   1040 <puts@plt>
lea    0xeac(%rip),%rdi
lea    0xeb5(%rip),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec7(%rip),%rdi
call   1040 <puts@plt>
lea    0xef2(%rip),%rdi
call   1040 <puts@plt>
lea    0xef2(%rip),%rdi
call   1040 <puts@plt>
lea    0xf1b(%rip),%rdi
call   1040 <puts@plt>
lea    0xf55(%rip),%rdi
call   1040 <puts@plt>
lea    0xf75(%rip),%rdi
call   1040 <puts@plt>
lea    0xf9f(%rip),%rdi
call   1040 <puts@plt>
lea    0xfc7(%rip),%rdi
call   1040 <puts@plt>
lea    0xfea(%rip),%rdi
call   1040 <puts@plt>
lea    0x1024(%rip),%rdi
call   1040 <puts@plt>
lea    0x1033(%rip),%rdi
call   1040 <puts@plt>
lea    0x1057(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1071(%rip),%rdi
call   1040 <puts@plt>
lea    0x107e(%rip),%rdi
call   1040 <puts@plt>
lea    0x10ae(%rip),%rdi
call   1040 <puts@plt>
lea    0x10e5(%rip),%rdi
call   1040 <puts@plt>
lea    0x1115(%rip),%rdi
call   1040 <puts@plt>
mov    0x2da1(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"bp - A binary parse tool\0A\00"
@.str.1 = [16 x i8] c" Version: %s\0A\00"
@.str.2 = [7 x i8] c"0.27.2\00"
@.str.3 = [56 x i8] c" Usage: bp -a | -h | <options> <bpf_file> [bin_file]\0A\00"
@.str.4 = [13 x i8] c" Options:\0A\00"
@.str.5 = [54 x i8] c" -a Show \22about\22 information (and exit).\0A\00"
@.str.6 = [71 x i8] c" -c Validate the BPF file (stop after 2nd stage compile).\0A\00"
@.str.7 = [45 x i8] c" -e Swap endianness of the data\0A\00"
@.str.8 = [55 x i8] c" -f X Output separator ---> <label>X<value>\0A\00"
@.str.9 = [53 x i8] c" -h Show \22help\22 information (and exit).\0A\00"
@.str.10 = [48 x i8] c" -l Simplified output ---> <value>\0A\00"
@.str.11 = [71 x i8] c" -t Use tag instead of label in output ---> <tag>:<value>\0A\00"
@.str.12 = [28 x i8] c" -v Be verbose\0A\00"
@.str.13 = [49 x i8] c" -x Dump output in Hex (0xdeadbeef)\0A\00"
@.str.14 = [49 x i8] c" -X Dump output in Hex (0XDEADBEEF)\0A\00"
@.str.15 = [2 x i8] c"\0A\00"
@.str.16 = [26 x i8] c" Double dash options:\0A\00"
@.str.17 = [61 x i8] c" --help/-h --about/-a --validate/-c\0A\00"
@.str.18 = [68 x i8] c" --verbose/-v --endian_swap/-e --field_separator/-f\0A\00"
@.str.19 = [61 x i8] c" --passes/-p --no_labels/-l --show_tag/-t\0A\00"
@.str.20 = [41 x i8] c" --dump_hex/-x --dump_HEX/-X\0A\00"
@stdout = global i32 0
define i32 @show_help() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.5, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.6, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.8, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.9, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.10, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.11, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.13, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.14, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.17, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.18, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.19, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.20, i64 0, i64 0))
%21 = load i32, i32* @stdout
%22 = call i32 @fflush(i32 %21)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [16 x i8] c" Version: %s\0A\00"
@.str.2 = [7 x i8] c"0.27.2\00"
@stdout = global i32 0
@str = [25 x i8] c"bp - A binary parse tool\00"
@str.21 = [55 x i8] c" Usage: bp -a | -h | <options> <bpf_file> [bin_file]\00"
@str.22 = [12 x i8] c" Options:\00"
@str.23 = [53 x i8] c" -a Show \22about\22 information (and exit).\00"
@str.24 = [70 x i8] c" -c Validate the BPF file (stop after 2nd stage compile).\00"
@str.25 = [44 x i8] c" -e Swap endianness of the data\00"
@str.26 = [54 x i8] c" -f X Output separator ---> <label>X<value>\00"
@str.27 = [52 x i8] c" -h Show \22help\22 information (and exit).\00"
@str.28 = [47 x i8] c" -l Simplified output ---> <value>\00"
@str.29 = [70 x i8] c" -t Use tag instead of label in output ---> <tag>:<value>\00"
@str.30 = [27 x i8] c" -v Be verbose\00"
@str.31 = [48 x i8] c" -x Dump output in Hex (0xdeadbeef)\00"
@str.32 = [48 x i8] c" -X Dump output in Hex (0XDEADBEEF)\00"
@str.33 = [25 x i8] c" Double dash options:\00"
@str.34 = [60 x i8] c" --help/-h --about/-a --validate/-c\00"
@str.35 = [67 x i8] c" --verbose/-v --endian_swap/-e --field_separator/-f\00"
@str.36 = [60 x i8] c" --passes/-p --no_labels/-l --show_tag/-t\00"
@str.37 = [40 x i8] c" --dump_hex/-x --dump_HEX/-X\00"
define i32 @show_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.21, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.22, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.23, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.24, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.25, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.26, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.27, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.28, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.29, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.30, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.31, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.32, i64 0, i64 0))
%15 = tail call i32 @putchar(i32 10)
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.33, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.34, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.35, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.36, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.37, i64 0, i64 0))
%21 = load i32, i32* @stdout
%22 = tail call i32 @fflush(i32 %21)
ret i32 0
}