#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 *, char const *);
void print_help(const char *arg1) {
  printf(
      "%s [-h] [-v] [-f] [-s <save_path> | -n] [<rom_path>] ...\n"
      "\n"
      "basic options:\n"
      "    -h, --help        show this help message and exit\n"
      "    -v, --version     show crater's version number and exit\n"
      "    -f, --fullscreen  enable fullscreen mode\n"
      "    -s, --save <path> save cartridge RAM (\"battery save\") to the "
      "given file\n"
      "                      (defaults to <rom_path>.sav)\n"
      "    -n, --no-save     disable saving cartridge RAM entirely\n"
      "    <rom_path>        path to the rom file to execute; if not given, "
      "will look\n"
      "                      in the roms/ directory and prompt the user\n"
      "\n"
      "advanced options:\n"
      "    -g, --debug       show logging information while running; add twice "
      "(-gg)\n"
      "                      to show more detailed logs, including an emulator "
      "trace\n"
      "    -b, --bios <path> load BIOS from the given ROM file (no default;\n"
      "                      the Game Gear does not usually require BIOS)\n"
      "    -x, --scale <n>   scale the game screen by an integer factor\n"
      "                      (applies to windowed mode only; defaults to 4)\n"
      "    -q, --square      force a square pixel aspect ratio instead of the "
      "more\n"
      "                      faithful 8:7 PAR\n"
      "    -a, --assemble <in> [<out>]\n"
      "                      convert z80 assembly source code into a binary "
      "file that\n"
      "                      can be run by crater\n"
      "    -d, --disassemble <in> [<out>]\n"
      "                      convert a binary file into z80 assembly source "
      "code\n"
      "    -r, --overwrite   allow crater to write assembler output to the "
      "same\n"
      "                      filename as the input\n",
      arg1);
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [1504 x i8] c"%s [-h] [-v] [-f] [-s <save_path> | -n] [<rom_path>] ...\0A\0Abasic options:\0A -h, --help show this help message and exit\0A -v, --version show crater's version number and exit\0A -f, --fullscreen enable fullscreen mode\0A -s, --save <path> save cartridge RAM (\22battery save\22) to the given file\0A (defaults to <rom_path>.sav)\0A -n, --no-save disable saving cartridge RAM entirely\0A <rom_path> path to the rom file to execute; if not given, will look\0A in the roms/ directory and prompt the user\0A\0Aadvanced options:\0A -g, --debug show logging information while running; add twice (-gg)\0A to show more detailed logs, including an emulator trace\0A -b, --bios <path> load BIOS from the given ROM file (no default;\0A the Game Gear does not usually require BIOS)\0A -x, --scale <n> scale the game screen by an integer factor\0A (applies to windowed mode only; defaults to 4)\0A -q, --square force a square pixel aspect ratio instead of the more\0A faithful 8:7 PAR\0A -a, --assemble <in> [<out>]\0A convert z80 assembly source code into a binary file that\0A can be run by crater\0A -d, --disassemble <in> [<out>]\0A convert a binary file into z80 assembly source code\0A -r, --overwrite allow crater to write assembler output to the same\0A filename as the input\0A\00"
define void @print_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([1504 x i8], [1504 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [1504 x i8] c"%s [-h] [-v] [-f] [-s <save_path> | -n] [<rom_path>] ...\0A\0Abasic options:\0A -h, --help show this help message and exit\0A -v, --version show crater's version number and exit\0A -f, --fullscreen enable fullscreen mode\0A -s, --save <path> save cartridge RAM (\22battery save\22) to the given file\0A (defaults to <rom_path>.sav)\0A -n, --no-save disable saving cartridge RAM entirely\0A <rom_path> path to the rom file to execute; if not given, will look\0A in the roms/ directory and prompt the user\0A\0Aadvanced options:\0A -g, --debug show logging information while running; add twice (-gg)\0A to show more detailed logs, including an emulator trace\0A -b, --bios <path> load BIOS from the given ROM file (no default;\0A the Game Gear does not usually require BIOS)\0A -x, --scale <n> scale the game screen by an integer factor\0A (applies to windowed mode only; defaults to 4)\0A -q, --square force a square pixel aspect ratio instead of the more\0A faithful 8:7 PAR\0A -a, --assemble <in> [<out>]\0A convert z80 assembly source code into a binary file that\0A can be run by crater\0A -d, --disassemble <in> [<out>]\0A convert a binary file into z80 assembly source code\0A -r, --overwrite allow crater to write assembler output to the same\0A filename as the input\0A\00"
define void @print_help(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([1504 x i8], [1504 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}