#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*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdout;
void usage(char *command) {
  fputs("Usage: ", stdout);
  fputs(command, stdout);
  puts(" program final-states [tape-length] [initial-state] [initial-tape] "
       "[final-tape]");
  puts("\tprogram: Program file consisting of rules of the following form");
  puts("\t\t(old-state,old-tape-symbol)->(new-state,new-tape-symbol,move) with "
       "move one of l=left,r=right,n=none,h=halt");
  puts("\tfinal-states: Comma-separated list of final states to stop in");
  puts("\tape-length: Optional length of the storage tape (default 4096)");
  puts("\tinitial-state: Optional state to start in (default 0)");
  puts("\tinitial-tape: Optional data to be stored on the tape before the "
       "program is ran");
  puts("\tfinal-tape: Optional file to store the tape to after program "
       "finished");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xec4(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e94(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
lea    0xeae(%rip),%rdi
call   1030 <puts@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
lea    0xf27(%rip),%rdi
call   1030 <puts@plt>
lea    0xf89(%rip),%rdi
call   1030 <puts@plt>
lea    0xfbc(%rip),%rdi
call   1030 <puts@plt>
lea    0xff0(%rip),%rdi
call   1030 <puts@plt>
lea    0x101b(%rip),%rdi
call   1030 <puts@plt>
lea    0x105f(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%esi
lea    0xec8(%rip),%rdi
call   1040 <fputs@plt>
mov    (%r14),%esi
mov    %rbx,%rdi
call   1040 <fputs@plt>
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xf32(%rip),%rdi
call   1030 <puts@plt>
lea    0xf94(%rip),%rdi
call   1030 <puts@plt>
lea    0xfc7(%rip),%rdi
call   1030 <puts@plt>
lea    0xffb(%rip),%rdi
call   1030 <puts@plt>
lea    0x1026(%rip),%rdi
call   1030 <puts@plt>
lea    0x106a(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Usage: \00"
@stdout = global i32 0
@.str.1 = [80 x i8] c" program final-states [tape-length] [initial-state] [initial-tape] [final-tape]\00"
@.str.2 = [65 x i8] c"\09program: Program file consisting of rules of the following form\00"
@.str.3 = [110 x i8] c"\09\09(old-state,old-tape-symbol)->(new-state,new-tape-symbol,move) with move one of l=left,r=right,n=none,h=halt\00"
@.str.4 = [63 x i8] c"\09final-states: Comma-separated list of final states to stop in\00"
@.str.5 = [64 x i8] c"\09ape-length: Optional length of the storage tape (default 4096)\00"
@.str.6 = [55 x i8] c"\09initial-state: Optional state to start in (default 0)\00"
@.str.7 = [80 x i8] c"\09initial-tape: Optional data to be stored on the tape before the program is ran\00"
@.str.8 = [71 x i8] c"\09final-tape: Optional file to store the tape to after program finished\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = call i32 @fputs(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i8*, i8** %2
%6 = load i32, i32* @stdout
%7 = call i32 @fputs(i8* %5, i32 %6)
%8 = call i32 @puts(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @puts(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @puts(i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @puts(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 @puts(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 @puts(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 @puts(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.7, i64 0, i64 0))
%15 = call i32 @puts(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str.8, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"Usage: \00"
@stdout = global i32 0
@.str.1 = [80 x i8] c" program final-states [tape-length] [initial-state] [initial-tape] [final-tape]\00"
@.str.2 = [65 x i8] c"\09program: Program file consisting of rules of the following form\00"
@.str.3 = [110 x i8] c"\09\09(old-state,old-tape-symbol)->(new-state,new-tape-symbol,move) with move one of l=left,r=right,n=none,h=halt\00"
@.str.4 = [63 x i8] c"\09final-states: Comma-separated list of final states to stop in\00"
@.str.5 = [64 x i8] c"\09ape-length: Optional length of the storage tape (default 4096)\00"
@.str.6 = [55 x i8] c"\09initial-state: Optional state to start in (default 0)\00"
@.str.7 = [80 x i8] c"\09initial-tape: Optional data to be stored on the tape before the program is ran\00"
@.str.8 = [71 x i8] c"\09final-tape: Optional file to store the tape to after program finished\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fputs(i8* %0, i32 %4)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([110 x i8], [110 x i8]* @.str.3, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.5, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.6, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @.str.7, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @.str.8, i64 0, i64 0))
ret void
}