#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*/ Quit();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdout;
void Usage(const char *ProgramName, const char *Message) {
  if (Message)
    fprintf(stdout, "%s\n\n", Message);
  fprintf(stdout, "Usage: %s [<options>] <binaryfile>\n", ProgramName);
  fprintf(stdout, "Run, debug and profile a Z80 program compiled with SDCC\n");
  fprintf(stdout,
          "\n<binaryfile> contains a raw Z80 program, which is loaded at\n");
  fprintf(stdout, "location 0x0000 by default.\n");
  fprintf(stdout, "<options> can be one or more of the following:\n");
  fprintf(
      stdout,
      "  --trace              shows the state of the processor after each\n");
  fprintf(stdout, "                       instruction executed\n");
  fprintf(stdout,
          "  --symbols <file.sym> uses a .sym file as generated by SDCC\n");
  fprintf(stdout,
          "                       to learn about global symbols used in\n");
  fprintf(stdout, "                       the program\n");
  fprintf(
      stdout,
      "  --dbg <file.dbg>     uses a .dbg file as generated by MakeDBG to\n");
  fprintf(stdout,
          "                       be able to refer to C source code lines\n");
  fprintf(stdout, "\n");
  Quit();
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1156 <Usage+0x36>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xeb1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe9b(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
lea    0xea8(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e51(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e3a(%rip),%rax
mov    (%rax),%edi
lea    0xef1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e23(%rip),%rax
mov    (%rax),%edi
lea    0xef7(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e0c(%rip),%rax
mov    (%rax),%edi
lea    0xf10(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2df5(%rip),%rax
mov    (%rax),%edi
lea    0xf3d(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2dde(%rip),%rax
mov    (%rax),%edi
lea    0xf53(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2dc7(%rip),%rax
mov    (%rax),%edi
lea    0xf7a(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2db0(%rip),%rax
mov    (%rax),%edi
lea    0xfa1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d99(%rip),%rax
mov    (%rax),%edi
lea    0xfae(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d82(%rip),%rax
mov    (%rax),%edi
lea    0xfdb(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d6b(%rip),%rax
mov    (%rax),%edi
lea    0xd85(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <Quit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %rsi,%rsi
je     1146 <Usage+0x26>
mov    %rsi,%rdx
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    0x2e93(%rip),%rbx
mov    (%rbx),%edi
lea    0xeaf(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xec0(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xee9(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf17(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf24(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf44(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf78(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf95(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfc3(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xff1(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1005(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1039(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xdea(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <Quit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [5 x i8] c"%s\0A\0A\00"
@.str.1 = [36 x i8] c"Usage: %s [<options>] <binaryfile>\0A\00"
@.str.2 = [57 x i8] c"Run, debug and profile a Z80 program compiled with SDCC\0A\00"
@.str.3 = [62 x i8] c"\0A<binaryfile> contains a raw Z80 program, which is loaded at\0A\00"
@.str.4 = [29 x i8] c"location 0x0000 by default.\0A\00"
@.str.5 = [48 x i8] c"<options> can be one or more of the following:\0A\00"
@.str.6 = [68 x i8] c" --trace shows the state of the processor after each\0A\00"
@.str.7 = [45 x i8] c" instruction executed\0A\00"
@.str.8 = [62 x i8] c" --symbols <file.sym> uses a .sym file as generated by SDCC\0A\00"
@.str.9 = [62 x i8] c" to learn about global symbols used in\0A\00"
@.str.10 = [36 x i8] c" the program\0A\00"
@.str.11 = [68 x i8] c" --dbg <file.dbg> uses a .dbg file as generated by MakeDBG to\0A\00"
@.str.12 = [64 x i8] c" be able to refer to C source code lines\0A\00"
@.str.13 = [2 x i8] c"\0A\00"
define void @Usage(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* @stdout
%9 = load i8*, i8** %4
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %7, %2
%12 = load i32, i32* @stdout
%13 = load i8*, i8** %3
%14 = call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%15 = load i32, i32* @stdout
%16 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%17 = load i32, i32* @stdout
%18 = call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.3, i64 0, i64 0))
%19 = load i32, i32* @stdout
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%21 = load i32, i32* @stdout
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0))
%23 = load i32, i32* @stdout
%24 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.6, i64 0, i64 0))
%25 = load i32, i32* @stdout
%26 = call i32 (i32, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0))
%27 = load i32, i32* @stdout
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.8, i64 0, i64 0))
%29 = load i32, i32* @stdout
%30 = call i32 (i32, i8*, ...) @fprintf(i32 %29, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.9, i64 0, i64 0))
%31 = load i32, i32* @stdout
%32 = call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0))
%33 = load i32, i32* @stdout
%34 = call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.11, i64 0, i64 0))
%35 = load i32, i32* @stdout
%36 = call i32 (i32, i8*, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.12, i64 0, i64 0))
%37 = load i32, i32* @stdout
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%39 = call i32 (...) @Quit()
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [5 x i8] c"%s\0A\0A\00"
@.str.1 = [36 x i8] c"Usage: %s [<options>] <binaryfile>\0A\00"
@.str.2 = [57 x i8] c"Run, debug and profile a Z80 program compiled with SDCC\0A\00"
@.str.3 = [62 x i8] c"\0A<binaryfile> contains a raw Z80 program, which is loaded at\0A\00"
@.str.4 = [29 x i8] c"location 0x0000 by default.\0A\00"
@.str.5 = [48 x i8] c"<options> can be one or more of the following:\0A\00"
@.str.6 = [68 x i8] c" --trace shows the state of the processor after each\0A\00"
@.str.7 = [45 x i8] c" instruction executed\0A\00"
@.str.8 = [62 x i8] c" --symbols <file.sym> uses a .sym file as generated by SDCC\0A\00"
@.str.9 = [62 x i8] c" to learn about global symbols used in\0A\00"
@.str.10 = [36 x i8] c" the program\0A\00"
@.str.11 = [68 x i8] c" --dbg <file.dbg> uses a .dbg file as generated by MakeDBG to\0A\00"
@.str.12 = [64 x i8] c" be able to refer to C source code lines\0A\00"
@.str.13 = [2 x i8] c"\0A\00"
define void @Usage(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stdout
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %7
7: ; preds = %4, %2
%8 = load i32, i32* @stdout
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%10 = load i32, i32* @stdout
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%12 = load i32, i32* @stdout
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.3, i64 0, i64 0))
%14 = load i32, i32* @stdout
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%16 = load i32, i32* @stdout
%17 = tail call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.5, i64 0, i64 0))
%18 = load i32, i32* @stdout
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.6, i64 0, i64 0))
%20 = load i32, i32* @stdout
%21 = tail call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.7, i64 0, i64 0))
%22 = load i32, i32* @stdout
%23 = tail call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.8, i64 0, i64 0))
%24 = load i32, i32* @stdout
%25 = tail call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.9, i64 0, i64 0))
%26 = load i32, i32* @stdout
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.10, i64 0, i64 0))
%28 = load i32, i32* @stdout
%29 = tail call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.11, i64 0, i64 0))
%30 = load i32, i32* @stdout
%31 = tail call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.12, i64 0, i64 0))
%32 = load i32, i32* @stdout
%33 = tail call i32 (i32, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%34 = tail call i32 (...) @Quit()
ret void
}