#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 helpb(char **args) {
  printf("---SimpleShell---\n");
  printf("cd PATH\n\tTo change directory\n");
  printf("exit\n\tTo exit the shell\n");
  printf("COMMAND [<args>] [> FILE | >> FILE] [< FILE] [>& FILE | 2>&1 FILE] "
         "[&]\n\tTo execute a command in $PATH variable\n");
  printf("\nAuthor:G. Hunter Anderson (2016)\n");
  printf("GNU General Public License\n\n");
}


x86 assembly (clang, -O0):
<helpb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
call   1030 <printf@plt>
lea    0xf67(%rip),%rdi
call   1030 <printf@plt>
lea    0xf7e(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<helpb>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeee(%rip),%rdi
call   1030 <puts@plt>
lea    0xeff(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf6e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf84(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"---SimpleShell---\0A\00"
@.str.1 = [30 x i8] c"cd PATH\0A\09To change directory\0A\00"
@.str.2 = [25 x i8] c"exit\0A\09To exit the shell\0A\00"
@.str.3 = [112 x i8] c"COMMAND [<args>] [> FILE | >> FILE] [< FILE] [>& FILE | 2>&1 FILE] [&]\0A\09To execute a command in $PATH variable\0A\00"
@.str.4 = [35 x i8] c"\0AAuthor:G. Hunter Anderson (2016)\0A\00"
@.str.5 = [29 x i8] c"GNU General Public License\0A\0A\00"
define void @helpb(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c"---SimpleShell---\00"
@str.6 = [29 x i8] c"cd PATH\0A\09To change directory\00"
@str.7 = [24 x i8] c"exit\0A\09To exit the shell\00"
@str.8 = [111 x i8] c"COMMAND [<args>] [> FILE | >> FILE] [< FILE] [>& FILE | 2>&1 FILE] [&]\0A\09To execute a command in $PATH variable\00"
@str.9 = [34 x i8] c"\0AAuthor:G. Hunter Anderson (2016)\00"
@str.10 = [28 x i8] c"GNU General Public License\0A\00"
define void @helpb(i8** nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([111 x i8], [111 x i8]* @str.8, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.9, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.10, i64 0, i64 0))
ret void
}