#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(void) {
  printf("/h    Help message\n");
  printf("/s    Convert to 'Spoon' (default)\n");
  printf("/b    Convert to 'Brain'\n");
  printf("/p    Pad destination\n");
  printf("/i    Ignore commented code\n");
  printf("/lx   Enfore constant line width of 'x' characters (Spoon files "
         "only)\n");
  printf("/0x   Specify the '0' token as 'x'\n");
  printf("/1x   Specify the '1' token as 'x'\n");
  printf("\n");
  printf("This program performs conversion between the two Esoteric languages "
         "of\n");
  printf("BrainF*** & Spoon.\n");
  printf("Both languages have identical syntax, only the tokens differs. Spoon "
         "uses\n");
  printf("Huffman encoded tokens in order to reduce the total number of "
         "different\n");
  printf("symbols to two: '0' and '1'.\n\n");
  printf("The mapping is:\n");
  printf("\t+ 1\n");
  printf("\t- 000\n");
  printf("\t> 010\n");
  printf("\t< 011\n");
  printf("\t] 0011\n");
  printf("\t[ 00100\n");
  printf("\t. 001010\n");
  printf("\t, 0010110\n");
  printf("\t# 00101110\n");
  printf("\tX 00101111 (exit program - not available in Brain)\n\n");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
call   1030 <printf@plt>
lea    0xf05(%rip),%rdi
call   1030 <printf@plt>
lea    0xf13(%rip),%rdi
call   1030 <printf@plt>
lea    0xf1e(%rip),%rdi
call   1030 <printf@plt>
lea    0xf2f(%rip),%rdi
call   1030 <printf@plt>
lea    0xf6a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf82(%rip),%rdi
call   1030 <printf@plt>
lea    0x1143(%rip),%rdi
call   1030 <printf@plt>
lea    0xf8e(%rip),%rdi
call   1030 <printf@plt>
lea    0xfca(%rip),%rdi
call   1030 <printf@plt>
lea    0xfd2(%rip),%rdi
call   1030 <printf@plt>
lea    0x1011(%rip),%rdi
call   1030 <printf@plt>
lea    0x104e(%rip),%rdi
call   1030 <printf@plt>
lea    0x1061(%rip),%rdi
call   1030 <printf@plt>
lea    0x1066(%rip),%rdi
call   1030 <printf@plt>
lea    0x1060(%rip),%rdi
call   1030 <printf@plt>
lea    0x105c(%rip),%rdi
call   1030 <printf@plt>
lea    0x1058(%rip),%rdi
call   1030 <printf@plt>
lea    0x1054(%rip),%rdi
call   1030 <printf@plt>
lea    0x1051(%rip),%rdi
call   1030 <printf@plt>
lea    0x104f(%rip),%rdi
call   1030 <printf@plt>
lea    0x104e(%rip),%rdi
call   1030 <printf@plt>
lea    0x104e(%rip),%rdi
call   1030 <printf@plt>
lea    0x104f(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
lea    0xedf(%rip),%rdi
call   1040 <puts@plt>
lea    0xef6(%rip),%rdi
call   1040 <puts@plt>
lea    0xf03(%rip),%rdi
call   1040 <puts@plt>
lea    0xf0d(%rip),%rdi
call   1040 <puts@plt>
lea    0xf1d(%rip),%rdi
call   1040 <puts@plt>
lea    0xf57(%rip),%rdi
call   1040 <puts@plt>
lea    0xf6e(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf7b(%rip),%rdi
call   1040 <puts@plt>
lea    0xfb6(%rip),%rdi
call   1040 <puts@plt>
lea    0xfbd(%rip),%rdi
call   1040 <puts@plt>
lea    0xffb(%rip),%rdi
call   1040 <puts@plt>
lea    0x1037(%rip),%rdi
call   1040 <puts@plt>
lea    0x1049(%rip),%rdi
call   1040 <puts@plt>
lea    0x104d(%rip),%rdi
call   1040 <puts@plt>
lea    0x1046(%rip),%rdi
call   1040 <puts@plt>
lea    0x1041(%rip),%rdi
call   1040 <puts@plt>
lea    0x103c(%rip),%rdi
call   1040 <puts@plt>
lea    0x1037(%rip),%rdi
call   1040 <puts@plt>
lea    0x1033(%rip),%rdi
call   1040 <puts@plt>
lea    0x1030(%rip),%rdi
call   1040 <puts@plt>
lea    0x102e(%rip),%rdi
call   1040 <puts@plt>
lea    0x102d(%rip),%rdi
call   1040 <puts@plt>
lea    0x102d(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"/h Help message\0A\00"
@.str.1 = [36 x i8] c"/s Convert to 'Spoon' (default)\0A\00"
@.str.2 = [26 x i8] c"/b Convert to 'Brain'\0A\00"
@.str.3 = [23 x i8] c"/p Pad destination\0A\00"
@.str.4 = [29 x i8] c"/i Ignore commented code\0A\00"
@.str.5 = [71 x i8] c"/lx Enfore constant line width of 'x' characters (Spoon files only)\0A\00"
@.str.6 = [36 x i8] c"/0x Specify the '0' token as 'x'\0A\00"
@.str.7 = [36 x i8] c"/1x Specify the '1' token as 'x'\0A\00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [72 x i8] c"This program performs conversion between the two Esoteric languages of\0A\00"
@.str.10 = [20 x i8] c"BrainF*** & Spoon.\0A\00"
@.str.11 = [75 x i8] c"Both languages have identical syntax, only the tokens differs. Spoon uses\0A\00"
@.str.12 = [73 x i8] c"Huffman encoded tokens in order to reduce the total number of different\0A\00"
@.str.13 = [31 x i8] c"symbols to two: '0' and '1'.\0A\0A\00"
@.str.14 = [17 x i8] c"The mapping is:\0A\00"
@.str.15 = [6 x i8] c"\09+ 1\0A\00"
@.str.16 = [8 x i8] c"\09- 000\0A\00"
@.str.17 = [8 x i8] c"\09> 010\0A\00"
@.str.18 = [8 x i8] c"\09< 011\0A\00"
@.str.19 = [9 x i8] c"\09] 0011\0A\00"
@.str.20 = [10 x i8] c"\09[ 00100\0A\00"
@.str.21 = [11 x i8] c"\09. 001010\0A\00"
@.str.22 = [12 x i8] c"\09, 0010110\0A\00"
@.str.23 = [13 x i8] c"\09# 00101110\0A\00"
@.str.24 = [54 x i8] c"\09X 00101111 (exit program - not available in Brain)\0A\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.20, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.21, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.22, i64 0, i64 0))
%24 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.23, i64 0, i64 0))
%25 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.24, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"/h Help message\00"
@str.25 = [35 x i8] c"/s Convert to 'Spoon' (default)\00"
@str.26 = [25 x i8] c"/b Convert to 'Brain'\00"
@str.27 = [22 x i8] c"/p Pad destination\00"
@str.28 = [28 x i8] c"/i Ignore commented code\00"
@str.29 = [70 x i8] c"/lx Enfore constant line width of 'x' characters (Spoon files only)\00"
@str.30 = [35 x i8] c"/0x Specify the '0' token as 'x'\00"
@str.31 = [35 x i8] c"/1x Specify the '1' token as 'x'\00"
@str.32 = [71 x i8] c"This program performs conversion between the two Esoteric languages of\00"
@str.33 = [19 x i8] c"BrainF*** & Spoon.\00"
@str.34 = [74 x i8] c"Both languages have identical syntax, only the tokens differs. Spoon uses\00"
@str.35 = [72 x i8] c"Huffman encoded tokens in order to reduce the total number of different\00"
@str.36 = [30 x i8] c"symbols to two: '0' and '1'.\0A\00"
@str.37 = [16 x i8] c"The mapping is:\00"
@str.38 = [5 x i8] c"\09+ 1\00"
@str.39 = [7 x i8] c"\09- 000\00"
@str.40 = [7 x i8] c"\09> 010\00"
@str.41 = [7 x i8] c"\09< 011\00"
@str.42 = [8 x i8] c"\09] 0011\00"
@str.43 = [9 x i8] c"\09[ 00100\00"
@str.44 = [10 x i8] c"\09. 001010\00"
@str.45 = [11 x i8] c"\09, 0010110\00"
@str.46 = [12 x i8] c"\09# 00101110\00"
@str.47 = [53 x i8] c"\09X 00101111 (exit program - not available in Brain)\0A\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.25, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.26, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.27, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.28, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str.29, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.30, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.31, i64 0, i64 0))
%9 = tail call i32 @putchar(i32 10)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.32, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.33, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.34, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.35, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.36, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.37, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.38, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.39, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.40, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.41, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.42, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.43, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.44, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.45, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.46, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.47, i64 0, i64 0))
ret void
}