#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*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "\nUsage: dcc6502 [options] FILENAME\n");
  fprintf(stderr, "  -?/-h        : Show this help message\n");
  fprintf(stderr, "  -o ORIGIN    : Set the origin (base address of "
                  "disassembly) [default: 0x8000]\n");
  fprintf(stderr,
          "  -m NUM_BYTES : Only disassemble the first NUM_BYTES bytes\n");
  fprintf(stderr, "  -s NUM_BYTES : Disassemble after skipping NUM_BYTES from "
                  "start of input file\n");
  fprintf(stderr, "  -d           : Enable hex dump within disassembly\n");
  fprintf(stderr, "  -n           : Enable NES register annotations\n");
  fprintf(stderr, "  -v           : Get only version information\n");
  fprintf(stderr, "  -c           : Enable cycle counting annotations\n");
  fprintf(stderr, "\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xeeb(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xeff(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
lea    0xf3b(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
lea    0xf63(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%edi
lea    0xf9e(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e47(%rip),%rax
mov    (%rax),%edi
lea    0xfbe(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e32(%rip),%rax
mov    (%rax),%edi
lea    0xfdb(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e1d(%rip),%rax
mov    (%rax),%edi
lea    0xff5(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e08(%rip),%rax
mov    (%rax),%edi
lea    0xe41(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xef5(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf10(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf53(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf82(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfc4(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfeb(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x100f(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1030(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xe83(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"\0AUsage: dcc6502 [options] FILENAME\0A\00"
@.str.1 = [41 x i8] c" -?/-h : Show this help message\0A\00"
@.str.2 = [81 x i8] c" -o ORIGIN : Set the origin (base address of disassembly) [default: 0x8000]\0A\00"
@.str.3 = [61 x i8] c" -m NUM_BYTES : Only disassemble the first NUM_BYTES bytes\0A\00"
@.str.4 = [80 x i8] c" -s NUM_BYTES : Disassemble after skipping NUM_BYTES from start of input file\0A\00"
@.str.5 = [53 x i8] c" -d : Enable hex dump within disassembly\0A\00"
@.str.6 = [50 x i8] c" -n : Enable NES register annotations\0A\00"
@.str.7 = [47 x i8] c" -v : Get only version information\0A\00"
@.str.8 = [52 x i8] c" -c : Enable cycle counting annotations\0A\00"
@.str.9 = [2 x i8] c"\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.4, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0))
%17 = load i32, i32* @stderr
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.8, i64 0, i64 0))
%19 = load i32, i32* @stderr
%20 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"\0AUsage: dcc6502 [options] FILENAME\0A\00"
@.str.1 = [41 x i8] c" -?/-h : Show this help message\0A\00"
@.str.2 = [81 x i8] c" -o ORIGIN : Set the origin (base address of disassembly) [default: 0x8000]\0A\00"
@.str.3 = [61 x i8] c" -m NUM_BYTES : Only disassemble the first NUM_BYTES bytes\0A\00"
@.str.4 = [80 x i8] c" -s NUM_BYTES : Disassemble after skipping NUM_BYTES from start of input file\0A\00"
@.str.5 = [53 x i8] c" -d : Enable hex dump within disassembly\0A\00"
@.str.6 = [50 x i8] c" -n : Enable NES register annotations\0A\00"
@.str.7 = [47 x i8] c" -v : Get only version information\0A\00"
@.str.8 = [52 x i8] c" -c : Enable cycle counting annotations\0A\00"
@.str.9 = [2 x i8] c"\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.4, i64 0, i64 0))
%11 = load i32, i32* @stderr
%12 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* @stderr
%14 = tail call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0))
%15 = load i32, i32* @stderr
%16 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0))
%17 = load i32, i32* @stderr
%18 = tail call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.8, i64 0, i64 0))
%19 = load i32, i32* @stderr
%20 = tail call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
ret void
}