#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 *, char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
void ShowHelp(char *str) {
  printf("*************************************************************\n");
  fprintf(stdout,
          "*                FRU BIN PARSER TOOL V%s                 *\n",
          "0.1.2");
  printf("*************************************************************\n");
  printf("Usage: %s [OPTIONS...]\n", str);
  printf("OPTIONS:\n");
  printf("\t-f        Specify input FRU file\n");
  printf("\t-o        Specify output configure\n");
  printf("\t-v        Verbose show multiple level message\n");
  printf("\t            0 -- Total record number\n");
  printf("\t            1 -- Check all record ID\n");
  printf("\t            2 -- Byte level parser\n");
  printf("\t            3 -- Bit level parser\n");
  printf("\t-h|?      This help text\n");
  printf("\t-V        Print version\n");
}


x86 assembly (clang, -O0):
<ShowHelp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
lea    0xef5(%rip),%rsi
lea    0xf2a(%rip),%rdx
call   1040 <fprintf@plt>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf2d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf44(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf7f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfc5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ShowHelp>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xf1c(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
lea    0xedf(%rip),%rdx
call   1050 <fprintf@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xed1(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf16(%rip),%rdi
call   1030 <puts@plt>
lea    0xf13(%rip),%rdi
call   1030 <puts@plt>
lea    0xf29(%rip),%rdi
call   1030 <puts@plt>
lea    0xf41(%rip),%rdi
call   1030 <puts@plt>
lea    0xf64(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf98(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb0(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc7(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd5(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [63 x i8] c"*************************************************************\0A\00"
@stdout = global i32 0
@.str.1 = [60 x i8] c"* FRU BIN PARSER TOOL V%s *\0A\00"
@.str.2 = [6 x i8] c"0.1.2\00"
@.str.3 = [24 x i8] c"Usage: %s [OPTIONS...]\0A\00"
@.str.4 = [10 x i8] c"OPTIONS:\0A\00"
@.str.5 = [35 x i8] c"\09-f Specify input FRU file\0A\00"
@.str.6 = [37 x i8] c"\09-o Specify output configure\0A\00"
@.str.7 = [48 x i8] c"\09-v Verbose show multiple level message\0A\00"
@.str.8 = [39 x i8] c"\09 0 -- Total record number\0A\00"
@.str.9 = [39 x i8] c"\09 1 -- Check all record ID\0A\00"
@.str.10 = [37 x i8] c"\09 2 -- Byte level parser\0A\00"
@.str.11 = [36 x i8] c"\09 3 -- Bit level parser\0A\00"
@.str.12 = [27 x i8] c"\09-h|? This help text\0A\00"
@.str.13 = [26 x i8] c"\09-V Print version\0A\00"
define void @ShowHelp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.7, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.8, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.9, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.10, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str.1 = [60 x i8] c"* FRU BIN PARSER TOOL V%s *\0A\00"
@.str.2 = [6 x i8] c"0.1.2\00"
@.str.3 = [24 x i8] c"Usage: %s [OPTIONS...]\0A\00"
@str.14 = [62 x i8] c"*************************************************************\00"
@str.15 = [9 x i8] c"OPTIONS:\00"
@str.16 = [34 x i8] c"\09-f Specify input FRU file\00"
@str.17 = [36 x i8] c"\09-o Specify output configure\00"
@str.18 = [47 x i8] c"\09-v Verbose show multiple level message\00"
@str.19 = [38 x i8] c"\09 0 -- Total record number\00"
@str.20 = [38 x i8] c"\09 1 -- Check all record ID\00"
@str.21 = [36 x i8] c"\09 2 -- Byte level parser\00"
@str.22 = [35 x i8] c"\09 3 -- Bit level parser\00"
@str.23 = [26 x i8] c"\09-h|? This help text\00"
@str.24 = [25 x i8] c"\09-V Print version\00"
define void @ShowHelp(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.14, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.14, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.15, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.16, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.17, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.18, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.19, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.20, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.21, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.22, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.23, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.24, i64 0, i64 0))
ret void
}