#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ arch_usage(int /*<<< orphan*/ *);
int /*<<< orphan*/ compiler_usage(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ *stdout;
int /*<<< orphan*/ version(int /*<<< orphan*/ *);
void usage(void) {
  FILE *fp = stdout;
  version(fp);
  fprintf(fp, "\nUsage: romcc [options] <source>.c\n"
              "Compile a C source file generating a binary that does not "
              "implicilty use RAM\n"
              "Options: \n"
              "-o <output file name>\n"
              "-f<option>            Specify a generic compiler option\n"
              "-m<option>            Specify a arch dependent option\n"
              "--                    Specify this is the last option\n"
              "\nGeneric compiler options:\n");
  compiler_usage(fp);
  fprintf(fp, "\nArchitecture compiler options:\n");
  arch_usage(fp);
  fprintf(fp, "\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2e91(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <version@plt>
mov    -0x8(%rbp),%rdi
lea    0xe96(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <compiler_usage@plt>
mov    -0x8(%rbp),%rdi
lea    0xfcd(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1060 <arch_usage@plt>
mov    -0x8(%rbp),%rdi
lea    0xfb2(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2e88(%rip),%rax
mov    (%rax),%rbx
mov    %rbx,%rdi
call   1050 <version@plt>
lea    0xe96(%rip),%rdi
mov    $0x14f,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <compiler_usage@plt>
lea    0xfc5(%rip),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %rbx,%rdi
call   1070 <arch_usage@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <fputc@plt>

LLVM IR (-O0):
@stdout = global i32* null
@.str = [336 x i8] c"\0AUsage: romcc [options] <source>.c\0ACompile a C source file generating a binary that does not implicilty use RAM\0AOptions: \0A-o <output file name>\0A-f<option> Specify a generic compiler option\0A-m<option> Specify a arch dependent option\0A-- Specify this is the last option\0A\0AGeneric compiler options:\0A\00"
@.str.1 = [33 x i8] c"\0AArchitecture compiler options:\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @usage() {
%1 = alloca i32*
%2 = load i32*, i32** @stdout
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @version(i32* %3)
%5 = load i32*, i32** %1
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([336 x i8], [336 x i8]* @.str, i64 0, i64 0))
%7 = load i32*, i32** %1
%8 = call i32 @compiler_usage(i32* %7)
%9 = load i32*, i32** %1
%10 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32*, i32** %1
%12 = call i32 @arch_usage(i32* %11)
%13 = load i32*, i32** %1
%14 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32* null
@.str = [336 x i8] c"\0AUsage: romcc [options] <source>.c\0ACompile a C source file generating a binary that does not implicilty use RAM\0AOptions: \0A-o <output file name>\0A-f<option> Specify a generic compiler option\0A-m<option> Specify a arch dependent option\0A-- Specify this is the last option\0A\0AGeneric compiler options:\0A\00"
@.str.1 = [33 x i8] c"\0AArchitecture compiler options:\0A\00"
define void @usage() {
%1 = load i32*, i32** @stdout
%2 = tail call i32 @version(i32* %1)
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([336 x i8], [336 x i8]* @.str, i64 0, i64 0), i64 335, i64 1, i32* %1)
%4 = tail call i32 @compiler_usage(i32* %1)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i64 32, i64 1, i32* %1)
%6 = tail call i32 @arch_usage(i32* %1)
%7 = tail call i32 @fputc(i32 10, i32* %1)
ret void
}