#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*/ puts(char *);
void print_help(bool is_err) {
  if (is_err)
    puts("use `nbc -h` for help");
  else {
    puts("usage: nbc [-h|-m|-f] [-i <in base>]");
    puts("           [-o <out base>] [<value>]");
    puts("options:");
    puts("  -h         print this help message");
    puts("  -m         print more prog's info");
    puts("  -f         force interactive mode");
    puts("  -i <base>  set input number base");
    puts("  -o <base>  set output number base");
    puts("  <value>    input number value\n");
    puts("in/out base:");
    puts("  b, bin, binary");
    puts("  o, oct, octal");
    puts("  d, dec, decimal");
    puts("  h, hex, hexdecimal\n");
    puts("both -i and -o options need to be used at");
    puts("the same time, and <value> can't be empty");
  }
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1136 <print_help+0x26>
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
jmp    11f6 <print_help+0xe6>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf08(%rip),%rdi
call   1030 <puts@plt>
lea    0xf21(%rip),%rdi
call   1030 <puts@plt>
lea    0xf39(%rip),%rdi
call   1030 <puts@plt>
lea    0xf51(%rip),%rdi
call   1030 <puts@plt>
lea    0xf68(%rip),%rdi
call   1030 <puts@plt>
lea    0xf80(%rip),%rdi
call   1030 <puts@plt>
lea    0xf95(%rip),%rdi
call   1030 <puts@plt>
lea    0xf96(%rip),%rdi
call   1030 <puts@plt>
lea    0xf9b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf9f(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa5(%rip),%rdi
call   1030 <puts@plt>
lea    0xfaf(%rip),%rdi
call   1030 <puts@plt>
lea    0xfcd(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
test   %edi,%edi
je     1120 <print_help+0x10>
lea    0xee5(%rip),%rdi
jmp    1030 <puts@plt>
push   %rax
lea    0xeee(%rip),%rdi
call   1030 <puts@plt>
lea    0xf07(%rip),%rdi
call   1030 <puts@plt>
lea    0xf20(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf36(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf66(%rip),%rdi
call   1030 <puts@plt>
lea    0xf7d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf95(%rip),%rdi
call   1030 <puts@plt>
lea    0xfaa(%rip),%rdi
call   1030 <puts@plt>
lea    0xfab(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb0(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb4(%rip),%rdi
call   1030 <puts@plt>
lea    0xfba(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc4(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe2(%rip),%rdi
add    $0x8,%rsp
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"use `nbc -h` for help\00"
@.str.1 = [37 x i8] c"usage: nbc [-h|-m|-f] [-i <in base>]\00"
@.str.2 = [37 x i8] c" [-o <out base>] [<value>]\00"
@.str.3 = [9 x i8] c"options:\00"
@.str.4 = [37 x i8] c" -h print this help message\00"
@.str.5 = [36 x i8] c" -m print more prog's info\00"
@.str.6 = [36 x i8] c" -f force interactive mode\00"
@.str.7 = [35 x i8] c" -i <base> set input number base\00"
@.str.8 = [36 x i8] c" -o <base> set output number base\00"
@.str.9 = [33 x i8] c" <value> input number value\0A\00"
@.str.10 = [13 x i8] c"in/out base:\00"
@.str.11 = [17 x i8] c" b, bin, binary\00"
@.str.12 = [16 x i8] c" o, oct, octal\00"
@.str.13 = [18 x i8] c" d, dec, decimal\00"
@.str.14 = [22 x i8] c" h, hex, hexdecimal\0A\00"
@.str.15 = [42 x i8] c"both -i and -o options need to be used at\00"
@.str.16 = [42 x i8] c"the same time, and <value> can't be empty\00"
define void @print_help(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @puts(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %24
7: ; preds = %1
%8 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 @puts(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 @puts(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 @puts(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0))
%15 = call i32 @puts(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0))
%16 = call i32 @puts(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0))
%17 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0))
%18 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
%19 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
%20 = call i32 @puts(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0))
%21 = call i32 @puts(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0))
%22 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.15, i64 0, i64 0))
%23 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.16, i64 0, i64 0))
br label %24
24: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"use `nbc -h` for help\00"
@.str.1 = [37 x i8] c"usage: nbc [-h|-m|-f] [-i <in base>]\00"
@.str.2 = [37 x i8] c" [-o <out base>] [<value>]\00"
@.str.3 = [9 x i8] c"options:\00"
@.str.4 = [37 x i8] c" -h print this help message\00"
@.str.5 = [36 x i8] c" -m print more prog's info\00"
@.str.6 = [36 x i8] c" -f force interactive mode\00"
@.str.7 = [35 x i8] c" -i <base> set input number base\00"
@.str.8 = [36 x i8] c" -o <base> set output number base\00"
@.str.9 = [33 x i8] c" <value> input number value\0A\00"
@.str.10 = [13 x i8] c"in/out base:\00"
@.str.11 = [17 x i8] c" b, bin, binary\00"
@.str.12 = [16 x i8] c" o, oct, octal\00"
@.str.13 = [18 x i8] c" d, dec, decimal\00"
@.str.14 = [22 x i8] c" h, hex, hexdecimal\0A\00"
@.str.15 = [42 x i8] c"both -i and -o options need to be used at\00"
@.str.16 = [42 x i8] c"the same time, and <value> can't be empty\00"
define void @print_help(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %19
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.15, i64 0, i64 0))
br label %19
19: ; preds = %1, %3
%20 = phi i8* [ getelementptr inbounds ([42 x i8], [42 x i8]* @.str.16, i64 0, i64 0), %3 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), %1 ]
%21 = tail call i32 @puts(i8* dereferenceable(1) %20)
ret void
}