#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*/ stdout;
void cir_cli_show_usage() {
  fprintf(stdout, "Cirugía - A Surgical Tool for NES ROMs\n");
  fprintf(stdout, "Usage: cirugia [options] [FILE]\n");
  fprintf(stdout, "\nOptions:\n");
  fprintf(stdout, "  -v        Set Version (1-2)\n");
  fprintf(stdout, "  -m        Set Mapper (0-4095)\n");
  fprintf(stdout, "  -s        Set Submapper (0-15)\n");
  fprintf(stdout, "  -i        Set Mirroring (0-2)\n");
  fprintf(stdout, "  -j        Set PRG RAM Present (0-1)\n");
  fprintf(stdout, "  -t        Set Trainer (0-1)\n");
  fprintf(stdout, "  -q        Set System Type (0-2)\n");
  fprintf(stdout, "  -r        Set TV System/Region (0-2)\n");
  fprintf(stdout, "  -k        Set VS PPU Chip (0-12)\n");
  fprintf(stdout, "  -l        Set VS PPU Mode (0-3)\n");
  fprintf(stdout, "  -b        Set PRG ROM size (0-4095)\n");
  fprintf(stdout, "  -f        Set PRG RAM size (0-14)\n");
  fprintf(stdout, "  -g        Set PRG NVRAM size (0-14)\n");
  fprintf(stdout, "  -c        Set CHR ROM size (0-4095)\n");
  fprintf(stdout, "  -d        Set CHR RAM size (0-14)\n");
  fprintf(stdout, "  -e        Set CHR NVRAM size (0-14)\n");
  fprintf(stdout, "  -a        Apply IPS Patch (filename)\n");
  fprintf(stdout, "  -p        IPS Output File (filename)\n");
  fprintf(stdout, "  -x        Diff ROM (filename)\n");
  fprintf(stdout, "  -o        Output File (filename)\n");
}


x86 assembly (clang, -O0):
<cir_cli_show_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    0xef0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xefc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
lea    0xef2(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
lea    0xefc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%edi
lea    0xf08(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e47(%rip),%rax
mov    (%rax),%edi
lea    0xf15(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e32(%rip),%rax
mov    (%rax),%edi
lea    0xf21(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e1d(%rip),%rax
mov    (%rax),%edi
lea    0xf33(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e08(%rip),%rax
mov    (%rax),%edi
lea    0xf3d(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2df3(%rip),%rax
mov    (%rax),%edi
lea    0xf4b(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2dde(%rip),%rax
mov    (%rax),%edi
lea    0xf5e(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2dc9(%rip),%rax
mov    (%rax),%edi
lea    0xf6d(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2db4(%rip),%rax
mov    (%rax),%edi
lea    0xf7b(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2d9f(%rip),%rax
mov    (%rax),%edi
lea    0xf8d(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2d8a(%rip),%rax
mov    (%rax),%edi
lea    0xf9d(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2d75(%rip),%rax
mov    (%rax),%edi
lea    0xfaf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2d60(%rip),%rax
mov    (%rax),%edi
lea    0xfc1(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2d4b(%rip),%rax
mov    (%rax),%edi
lea    0xfd1(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2d36(%rip),%rax
mov    (%rax),%edi
lea    0xfe3(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2d21(%rip),%rax
mov    (%rax),%edi
lea    0xff6(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2d0c(%rip),%rax
mov    (%rax),%edi
lea    0x1009(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2cf7(%rip),%rax
mov    (%rax),%edi
lea    0x1015(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cir_cli_show_usage>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xefa(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf0d(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf0a(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf1b(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf2e(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf42(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf55(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf6e(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf7f(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf94(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfae(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfc4(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xfd9(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xff2(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1009(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1022(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x103b(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1052(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x106b(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x1085(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x109f(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0x10b2(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [41 x i8] c"Cirug\C3\ADa - A Surgical Tool for NES ROMs\0A\00"
@.str.1 = [33 x i8] c"Usage: cirugia [options] [FILE]\0A\00"
@.str.2 = [11 x i8] c"\0AOptions:\0A\00"
@.str.3 = [31 x i8] c" -v Set Version (1-2)\0A\00"
@.str.4 = [33 x i8] c" -m Set Mapper (0-4095)\0A\00"
@.str.5 = [34 x i8] c" -s Set Submapper (0-15)\0A\00"
@.str.6 = [33 x i8] c" -i Set Mirroring (0-2)\0A\00"
@.str.7 = [39 x i8] c" -j Set PRG RAM Present (0-1)\0A\00"
@.str.8 = [31 x i8] c" -t Set Trainer (0-1)\0A\00"
@.str.9 = [35 x i8] c" -q Set System Type (0-2)\0A\00"
@.str.10 = [40 x i8] c" -r Set TV System/Region (0-2)\0A\00"
@.str.11 = [36 x i8] c" -k Set VS PPU Chip (0-12)\0A\00"
@.str.12 = [35 x i8] c" -l Set VS PPU Mode (0-3)\0A\00"
@.str.13 = [39 x i8] c" -b Set PRG ROM size (0-4095)\0A\00"
@.str.14 = [37 x i8] c" -f Set PRG RAM size (0-14)\0A\00"
@.str.15 = [39 x i8] c" -g Set PRG NVRAM size (0-14)\0A\00"
@.str.16 = [39 x i8] c" -c Set CHR ROM size (0-4095)\0A\00"
@.str.17 = [37 x i8] c" -d Set CHR RAM size (0-14)\0A\00"
@.str.18 = [39 x i8] c" -e Set CHR NVRAM size (0-14)\0A\00"
@.str.19 = [40 x i8] c" -a Apply IPS Patch (filename)\0A\00"
@.str.20 = [40 x i8] c" -p IPS Output File (filename)\0A\00"
@.str.21 = [33 x i8] c" -x Diff ROM (filename)\0A\00"
@.str.22 = [36 x i8] c" -o Output File (filename)\0A\00"
define void @cir_cli_show_usage() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32, i32* @stdout
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
%11 = load i32, i32* @stdout
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* @stdout
%14 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0))
%15 = load i32, i32* @stdout
%16 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0))
%17 = load i32, i32* @stdout
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0))
%19 = load i32, i32* @stdout
%20 = call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0))
%21 = load i32, i32* @stdout
%22 = call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0))
%23 = load i32, i32* @stdout
%24 = call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0))
%25 = load i32, i32* @stdout
%26 = call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.12, i64 0, i64 0))
%27 = load i32, i32* @stdout
%28 = call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.13, i64 0, i64 0))
%29 = load i32, i32* @stdout
%30 = call i32 @fprintf(i32 %29, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.14, i64 0, i64 0))
%31 = load i32, i32* @stdout
%32 = call i32 @fprintf(i32 %31, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0))
%33 = load i32, i32* @stdout
%34 = call i32 @fprintf(i32 %33, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.16, i64 0, i64 0))
%35 = load i32, i32* @stdout
%36 = call i32 @fprintf(i32 %35, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.17, i64 0, i64 0))
%37 = load i32, i32* @stdout
%38 = call i32 @fprintf(i32 %37, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.18, i64 0, i64 0))
%39 = load i32, i32* @stdout
%40 = call i32 @fprintf(i32 %39, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.19, i64 0, i64 0))
%41 = load i32, i32* @stdout
%42 = call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.20, i64 0, i64 0))
%43 = load i32, i32* @stdout
%44 = call i32 @fprintf(i32 %43, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.21, i64 0, i64 0))
%45 = load i32, i32* @stdout
%46 = call i32 @fprintf(i32 %45, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.22, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [41 x i8] c"Cirug\C3\ADa - A Surgical Tool for NES ROMs\0A\00"
@.str.1 = [33 x i8] c"Usage: cirugia [options] [FILE]\0A\00"
@.str.2 = [11 x i8] c"\0AOptions:\0A\00"
@.str.3 = [31 x i8] c" -v Set Version (1-2)\0A\00"
@.str.4 = [33 x i8] c" -m Set Mapper (0-4095)\0A\00"
@.str.5 = [34 x i8] c" -s Set Submapper (0-15)\0A\00"
@.str.6 = [33 x i8] c" -i Set Mirroring (0-2)\0A\00"
@.str.7 = [39 x i8] c" -j Set PRG RAM Present (0-1)\0A\00"
@.str.8 = [31 x i8] c" -t Set Trainer (0-1)\0A\00"
@.str.9 = [35 x i8] c" -q Set System Type (0-2)\0A\00"
@.str.10 = [40 x i8] c" -r Set TV System/Region (0-2)\0A\00"
@.str.11 = [36 x i8] c" -k Set VS PPU Chip (0-12)\0A\00"
@.str.12 = [35 x i8] c" -l Set VS PPU Mode (0-3)\0A\00"
@.str.13 = [39 x i8] c" -b Set PRG ROM size (0-4095)\0A\00"
@.str.14 = [37 x i8] c" -f Set PRG RAM size (0-14)\0A\00"
@.str.15 = [39 x i8] c" -g Set PRG NVRAM size (0-14)\0A\00"
@.str.16 = [39 x i8] c" -c Set CHR ROM size (0-4095)\0A\00"
@.str.17 = [37 x i8] c" -d Set CHR RAM size (0-14)\0A\00"
@.str.18 = [39 x i8] c" -e Set CHR NVRAM size (0-14)\0A\00"
@.str.19 = [40 x i8] c" -a Apply IPS Patch (filename)\0A\00"
@.str.20 = [40 x i8] c" -p IPS Output File (filename)\0A\00"
@.str.21 = [33 x i8] c" -x Diff ROM (filename)\0A\00"
@.str.22 = [36 x i8] c" -o Output File (filename)\0A\00"
define void @cir_cli_show_usage() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32, i32* @stdout
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
%11 = load i32, i32* @stdout
%12 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* @stdout
%14 = tail call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0))
%15 = load i32, i32* @stdout
%16 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0))
%17 = load i32, i32* @stdout
%18 = tail call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.8, i64 0, i64 0))
%19 = load i32, i32* @stdout
%20 = tail call i32 @fprintf(i32 %19, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0))
%21 = load i32, i32* @stdout
%22 = tail call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0))
%23 = load i32, i32* @stdout
%24 = tail call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0))
%25 = load i32, i32* @stdout
%26 = tail call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.12, i64 0, i64 0))
%27 = load i32, i32* @stdout
%28 = tail call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.13, i64 0, i64 0))
%29 = load i32, i32* @stdout
%30 = tail call i32 @fprintf(i32 %29, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.14, i64 0, i64 0))
%31 = load i32, i32* @stdout
%32 = tail call i32 @fprintf(i32 %31, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0))
%33 = load i32, i32* @stdout
%34 = tail call i32 @fprintf(i32 %33, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.16, i64 0, i64 0))
%35 = load i32, i32* @stdout
%36 = tail call i32 @fprintf(i32 %35, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.17, i64 0, i64 0))
%37 = load i32, i32* @stdout
%38 = tail call i32 @fprintf(i32 %37, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.18, i64 0, i64 0))
%39 = load i32, i32* @stdout
%40 = tail call i32 @fprintf(i32 %39, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.19, i64 0, i64 0))
%41 = load i32, i32* @stdout
%42 = tail call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.20, i64 0, i64 0))
%43 = load i32, i32* @stdout
%44 = tail call i32 @fprintf(i32 %43, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.21, i64 0, i64 0))
%45 = load i32, i32* @stdout
%46 = tail call i32 @fprintf(i32 %45, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.22, i64 0, i64 0))
ret void
}