#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 *pname) {
  printf("Program '%s' v%s, Copyright (c) %s %s\n", "Pico Assembler", "0.1",
         "2010", "Jan Viktorin");
  printf("Usage: %s %s\n", pname,
         "[-i<srcfile>] [-o<hexfile>] [-l<listing>] [-qh]");
  printf("\t-i<srcfile> Source file\n"
         "\t-o<hexfile> Output file, contains instructions in HEX form\n"
         "\t-l<listing> Listing file\n"
         "\t-q          Quite mode, no output messages\n"
         "\t-h          Prints this help\n");
  printf("This program is under GNU GPL license, please see www.gnu.org\n");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
lea    0xefd(%rip),%rsi
lea    0xf05(%rip),%rdx
lea    0xf02(%rip),%rcx
lea    0xf00(%rip),%r8
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xefb(%rip),%rdi
lea    0xf02(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf24(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd0(%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    0xef5(%rip),%rsi
lea    0xefd(%rip),%rdx
lea    0xefa(%rip),%rcx
lea    0xef8(%rip),%r8
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef7(%rip),%rdi
lea    0xefe(%rip),%rdx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf1d(%rip),%rdi
call   1030 <puts@plt>
lea    0xfca(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Program '%s' v%s, Copyright (c) %s %s\0A\00"
@.str.1 = [15 x i8] c"Pico Assembler\00"
@.str.2 = [4 x i8] c"0.1\00"
@.str.3 = [5 x i8] c"2010\00"
@.str.4 = [13 x i8] c"Jan Viktorin\00"
@.str.5 = [14 x i8] c"Usage: %s %s\0A\00"
@.str.6 = [48 x i8] c"[-i<srcfile>] [-o<hexfile>] [-l<listing>] [-qh]\00"
@.str.7 = [186 x i8] c"\09-i<srcfile> Source file\0A\09-o<hexfile> Output file, contains instructions in HEX form\0A\09-l<listing> Listing file\0A\09-q Quite mode, no output messages\0A\09-h Prints this help\0A\00"
@.str.8 = [63 x i8] c"This program is under GNU GPL license, please see www.gnu.org\0A\00"
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i8* %4, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([186 x i8], [186 x i8]* @.str.7, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.8, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Program '%s' v%s, Copyright (c) %s %s\0A\00"
@.str.1 = [15 x i8] c"Pico Assembler\00"
@.str.2 = [4 x i8] c"0.1\00"
@.str.3 = [5 x i8] c"2010\00"
@.str.4 = [13 x i8] c"Jan Viktorin\00"
@.str.5 = [14 x i8] c"Usage: %s %s\0A\00"
@.str.6 = [48 x i8] c"[-i<srcfile>] [-o<hexfile>] [-l<listing>] [-qh]\00"
@str = [185 x i8] c"\09-i<srcfile> Source file\0A\09-o<hexfile> Output file, contains instructions in HEX form\0A\09-l<listing> Listing file\0A\09-q Quite mode, no output messages\0A\09-h Prints this help\00"
@str.9 = [62 x i8] c"This program is under GNU GPL license, please see www.gnu.org\00"
define void @help(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([185 x i8], [185 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.9, i64 0, i64 0))
ret void
}