#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 *, ...);
void help(char *name) {
  printf("Help for %s, %s\n", name, "v0.1.0-d");
  printf("Command Line:\n");
  printf("  %s dec base [digits [decimalpoint]]\n", name);
  printf("  %s --help\n\n", name);
  printf("  --help  Outputs this help text.\n");
  printf("  dec     This is the decimal input.\n");
  printf("  base    This is the base to convert it to.\n");
  printf("  digits  These are the digits for the base.\n");
  printf("          If not supplied, the following will be used:\n");
  printf("          0123456789abcdefghijklmnopqrstuvwxyz\n");
  printf("  decimalpoint  This goes after the unit digit.\n");
  printf("                If not specified, '.' is used.\n\n");
  printf("  Examples:\n");
  printf("    %s 1729 6\n", name);
  printf("    %s 42 16\n", name);
  printf("    %s 10 2 O|\n", name);
  printf("    %s 126 12 0123456789XE ;\n\n\n", name);
  printf("Return Values:\n");
  printf("  0   OK\n");
  printf("  1   No Arguments\n");
  printf("  2   Invalid Arguments\n");
  printf("  3   Base Too Large For Automatic Digits\n");
  printf("  4   Not Enough Digits For Base\n");
  printf("  5   Couldn't Allocate Memory For Digits\n");
  printf("  6   Couldn't Allocate Memory For Output\n");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
lea    0xee3(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xef0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfa9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfcc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xfea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xfe7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xfe3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xfe1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1002(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x101f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1033(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1050(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
lea    0xedf(%rip),%rdx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf59(%rip),%rdi
call   1030 <puts@plt>
lea    0xecb(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee1(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf39(%rip),%rdi
call   1030 <puts@plt>
lea    0xf4f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf68(%rip),%rdi
call   1030 <puts@plt>
lea    0xf89(%rip),%rdi
call   1030 <puts@plt>
lea    0xfaa(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd5(%rip),%rdi
call   1030 <puts@plt>
lea    0xff8(%rip),%rdi
call   1030 <puts@plt>
lea    0x101c(%rip),%rdi
call   1030 <puts@plt>
lea    0x1040(%rip),%rdi
call   1030 <puts@plt>
lea    0xe72(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe70(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe6d(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe6c(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xffc(%rip),%rdi
call   1030 <puts@plt>
lea    0xfff(%rip),%rdi
call   1030 <puts@plt>
lea    0xffc(%rip),%rdi
call   1030 <puts@plt>
lea    0x1003(%rip),%rdi
call   1030 <puts@plt>
lea    0x100f(%rip),%rdi
call   1030 <puts@plt>
lea    0x102d(%rip),%rdi
call   1030 <puts@plt>
lea    0x1042(%rip),%rdi
call   1030 <puts@plt>
lea    0x1060(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Help for %s, %s\0A\00"
@.str.1 = [9 x i8] c"v0.1.0-d\00"
@.str.2 = [15 x i8] c"Command Line:\0A\00"
@.str.3 = [39 x i8] c" %s dec base [digits [decimalpoint]]\0A\00"
@.str.4 = [14 x i8] c" %s --help\0A\0A\00"
@.str.5 = [35 x i8] c" --help Outputs this help text.\0A\00"
@.str.6 = [38 x i8] c" dec This is the decimal input.\0A\00"
@.str.7 = [46 x i8] c" base This is the base to convert it to.\0A\00"
@.str.8 = [46 x i8] c" digits These are the digits for the base.\0A\00"
@.str.9 = [56 x i8] c" If not supplied, the following will be used:\0A\00"
@.str.10 = [48 x i8] c" 0123456789abcdefghijklmnopqrstuvwxyz\0A\00"
@.str.11 = [49 x i8] c" decimalpoint This goes after the unit digit.\0A\00"
@.str.12 = [49 x i8] c" If not specified, '.' is used.\0A\0A\00"
@.str.13 = [13 x i8] c" Examples:\0A\00"
@.str.14 = [15 x i8] c" %s 1729 6\0A\00"
@.str.15 = [14 x i8] c" %s 42 16\0A\00"
@.str.16 = [16 x i8] c" %s 10 2 O|\0A\00"
@.str.17 = [32 x i8] c" %s 126 12 0123456789XE ;\0A\0A\0A\00"
@.str.18 = [16 x i8] c"Return Values:\0A\00"
@.str.19 = [10 x i8] c" 0 OK\0A\00"
@.str.20 = [20 x i8] c" 1 No Arguments\0A\00"
@.str.21 = [25 x i8] c" 2 Invalid Arguments\0A\00"
@.str.22 = [43 x i8] c" 3 Base Too Large For Automatic Digits\0A\00"
@.str.23 = [34 x i8] c" 4 Not Enough Digits For Base\0A\00"
@.str.24 = [43 x i8] c" 5 Couldn't Allocate Memory For Digits\0A\00"
@.str.25 = [43 x i8] c" 6 Couldn't Allocate Memory For Output\0A\00"
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%6 = load i8*, i8** %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8* %8)
%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 ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.8, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.9, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.10, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.11, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.12, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0))
%19 = load i8*, i8** %2
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0), i8* %19)
%21 = load i8*, i8** %2
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* %21)
%23 = load i8*, i8** %2
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0), i8* %23)
%25 = load i8*, i8** %2
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.17, i64 0, i64 0), i8* %25)
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.18, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.19, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.20, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.21, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.22, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.23, i64 0, i64 0))
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.24, i64 0, i64 0))
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.25, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"Help for %s, %s\0A\00"
@.str.1 = [9 x i8] c"v0.1.0-d\00"
@.str.3 = [39 x i8] c" %s dec base [digits [decimalpoint]]\0A\00"
@.str.4 = [14 x i8] c" %s --help\0A\0A\00"
@.str.14 = [15 x i8] c" %s 1729 6\0A\00"
@.str.15 = [14 x i8] c" %s 42 16\0A\00"
@.str.16 = [16 x i8] c" %s 10 2 O|\0A\00"
@.str.17 = [32 x i8] c" %s 126 12 0123456789XE ;\0A\0A\0A\00"
@str = [14 x i8] c"Command Line:\00"
@str.26 = [34 x i8] c" --help Outputs this help text.\00"
@str.27 = [37 x i8] c" dec This is the decimal input.\00"
@str.28 = [45 x i8] c" base This is the base to convert it to.\00"
@str.29 = [45 x i8] c" digits These are the digits for the base.\00"
@str.30 = [55 x i8] c" If not supplied, the following will be used:\00"
@str.31 = [47 x i8] c" 0123456789abcdefghijklmnopqrstuvwxyz\00"
@str.32 = [48 x i8] c" decimalpoint This goes after the unit digit.\00"
@str.33 = [48 x i8] c" If not specified, '.' is used.\0A\00"
@str.34 = [12 x i8] c" Examples:\00"
@str.35 = [15 x i8] c"Return Values:\00"
@str.36 = [9 x i8] c" 0 OK\00"
@str.37 = [19 x i8] c" 1 No Arguments\00"
@str.38 = [24 x i8] c" 2 Invalid Arguments\00"
@str.39 = [42 x i8] c" 3 Base Too Large For Automatic Digits\00"
@str.40 = [33 x i8] c" 4 Not Enough Digits For Base\00"
@str.41 = [42 x i8] c" 5 Couldn't Allocate Memory For Digits\00"
@str.42 = [42 x i8] c" 6 Couldn't Allocate Memory For Output\00"
define void @help(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8* %0)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.26, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.27, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.28, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.29, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.30, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.31, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.32, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.33, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.34, i64 0, i64 0))
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0), i8* %0)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i8* %0)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0), i8* %0)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.17, i64 0, i64 0), i8* %0)
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.35, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.36, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.37, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.38, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.39, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.40, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.41, i64 0, i64 0))
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.42, i64 0, i64 0))
ret void
}