#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*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void usage(char *name) {
  printf("Usage: %s [ OPTION... ] COMMAND [ ARG... ]\n", name);
  printf("\n");
  printf("Options:\n");
  printf(" --force              force writing of ROMs from different models "
         "of Game Boy\n");
  printf(" --verbose            displays more information and a progress "
         "bar\n");
  printf(" --page PAGE          select cart page (1 or 2).\n");
  printf(" --save               force restore/dump to/from SRAM\n");
  printf(" --rom                force restore/dump to/from Flash\n");
  printf("\n");
  printf("Commands:\n");
  printf(" --read BANK:FILE...  read ROMs with the specified banks to "
         "files\n");
  printf(" --write FILE...      write ROM file(s) to cart\n");
  printf(" --dump               dump an entire page of Flash or SRAM to "
         "a file\n");
  printf(" --restore            restore an entire page of Flash or SRAM "
         "to a file\n");
  printf(" --delete BANK...     delete ROMs with the specified banks\n");
  printf(" --format             delete all ROMs of the specified page\n");
  printf(" --title              list page content\n");
  printf(" --version            print version number\n");
  printf(" --help               show this help\n");
  printf("\n");
  printf("You MUST supply exactly one command.\n");
  printf("ROMs specified in --read and --delete are designated by the bank "
         "number printed\nby the --title command.\n");
  printf("Dumping or restoring with a file ending in .sav will read/write to "
         "SRAM.\n");
  printf("To select between ROM and SRAM, use ONE of the --save / --rom "
         "options.\n");
  printf("\n");
  printf("Written by Mike Ryan <mikeryan@lacklustre.net> and others\n");
  printf("See web site for more info:\n");
  printf("    http://lacklustre.net/gb/ems/\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf16(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf4c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x100a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1042(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x107d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10ab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10da(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10f5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1113(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x111d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1135(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1190(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x11cc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x11f8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1225(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1234(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xec9(%rip),%rdi
call   1040 <puts@plt>
lea    0xec6(%rip),%rdi
call   1040 <puts@plt>
lea    0xf08(%rip),%rdi
call   1040 <puts@plt>
lea    0xf3f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf64(%rip),%rdi
call   1040 <puts@plt>
lea    0xf8e(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xfaf(%rip),%rdi
call   1040 <puts@plt>
lea    0xfad(%rip),%rdi
call   1040 <puts@plt>
lea    0xfe3(%rip),%rdi
call   1040 <puts@plt>
lea    0x1007(%rip),%rdi
call   1040 <puts@plt>
lea    0x1040(%rip),%rdi
call   1040 <puts@plt>
lea    0x107c(%rip),%rdi
call   1040 <puts@plt>
lea    0x10ab(%rip),%rdi
call   1040 <puts@plt>
lea    0x10db(%rip),%rdi
call   1040 <puts@plt>
lea    0x10f7(%rip),%rdi
call   1040 <puts@plt>
lea    0x1116(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1125(%rip),%rdi
call   1040 <puts@plt>
lea    0x113e(%rip),%rdi
call   1040 <puts@plt>
lea    0x119a(%rip),%rdi
call   1040 <puts@plt>
lea    0x11d7(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1208(%rip),%rdi
call   1040 <puts@plt>
lea    0x1236(%rip),%rdi
call   1040 <puts@plt>
lea    0x1246(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"Usage: %s [ OPTION... ] COMMAND [ ARG... ]\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [10 x i8] c"Options:\0A\00"
@.str.3 = [79 x i8] c" --force force writing of ROMs from different models of Game Boy\0A\00"
@.str.4 = [68 x i8] c" --verbose displays more information and a progress bar\0A\00"
@.str.5 = [50 x i8] c" --page PAGE select cart page (1 or 2).\0A\00"
@.str.6 = [55 x i8] c" --save force restore/dump to/from SRAM\0A\00"
@.str.7 = [56 x i8] c" --rom force restore/dump to/from Flash\0A\00"
@.str.8 = [11 x i8] c"Commands:\0A\00"
@.str.9 = [67 x i8] c" --read BANK:FILE... read ROMs with the specified banks to files\0A\00"
@.str.10 = [49 x i8] c" --write FILE... write ROM file(s) to cart\0A\00"
@.str.11 = [70 x i8] c" --dump dump an entire page of Flash or SRAM to a file\0A\00"
@.str.12 = [73 x i8] c" --restore restore an entire page of Flash or SRAM to a file\0A\00"
@.str.13 = [60 x i8] c" --delete BANK... delete ROMs with the specified banks\0A\00"
@.str.14 = [61 x i8] c" --format delete all ROMs of the specified page\0A\00"
@.str.15 = [41 x i8] c" --title list page content\0A\00"
@.str.16 = [44 x i8] c" --version print version number\0A\00"
@.str.17 = [38 x i8] c" --help show this help\0A\00"
@.str.18 = [38 x i8] c"You MUST supply exactly one command.\0A\00"
@.str.19 = [105 x i8] c"ROMs specified in --read and --delete are designated by the bank number printed\0Aby the --title command.\0A\00"
@.str.20 = [74 x i8] c"Dumping or restoring with a file ending in .sav will read/write to SRAM.\0A\00"
@.str.21 = [72 x i8] c"To select between ROM and SRAM, use ONE of the --save / --rom options.\0A\00"
@.str.22 = [59 x i8] c"Written by Mike Ryan <mikeryan@lacklustre.net> and others\0A\00"
@.str.23 = [29 x i8] c"See web site for more info:\0A\00"
@.str.24 = [35 x i8] c" http://lacklustre.net/gb/ems/\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.9, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.10, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.11, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.12, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.13, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.14, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.15, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.16, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.17, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.18, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str.19, i64 0, i64 0))
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.20, i64 0, i64 0))
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.21, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.22, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.23, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.24, i64 0, i64 0))
%32 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [44 x i8] c"Usage: %s [ OPTION... ] COMMAND [ ARG... ]\0A\00"
@str = [9 x i8] c"Options:\00"
@str.25 = [78 x i8] c" --force force writing of ROMs from different models of Game Boy\00"
@str.26 = [67 x i8] c" --verbose displays more information and a progress bar\00"
@str.27 = [49 x i8] c" --page PAGE select cart page (1 or 2).\00"
@str.28 = [54 x i8] c" --save force restore/dump to/from SRAM\00"
@str.29 = [55 x i8] c" --rom force restore/dump to/from Flash\00"
@str.30 = [10 x i8] c"Commands:\00"
@str.31 = [66 x i8] c" --read BANK:FILE... read ROMs with the specified banks to files\00"
@str.32 = [48 x i8] c" --write FILE... write ROM file(s) to cart\00"
@str.33 = [69 x i8] c" --dump dump an entire page of Flash or SRAM to a file\00"
@str.34 = [72 x i8] c" --restore restore an entire page of Flash or SRAM to a file\00"
@str.35 = [59 x i8] c" --delete BANK... delete ROMs with the specified banks\00"
@str.36 = [60 x i8] c" --format delete all ROMs of the specified page\00"
@str.37 = [40 x i8] c" --title list page content\00"
@str.38 = [43 x i8] c" --version print version number\00"
@str.39 = [37 x i8] c" --help show this help\00"
@str.40 = [37 x i8] c"You MUST supply exactly one command.\00"
@str.41 = [104 x i8] c"ROMs specified in --read and --delete are designated by the bank number printed\0Aby the --title command.\00"
@str.42 = [73 x i8] c"Dumping or restoring with a file ending in .sav will read/write to SRAM.\00"
@str.43 = [71 x i8] c"To select between ROM and SRAM, use ONE of the --save / --rom options.\00"
@str.44 = [58 x i8] c"Written by Mike Ryan <mikeryan@lacklustre.net> and others\00"
@str.45 = [28 x i8] c"See web site for more info:\00"
@str.46 = [34 x i8] c" http://lacklustre.net/gb/ems/\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.25, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.26, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.27, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.28, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.29, i64 0, i64 0))
%10 = tail call i32 @putchar(i32 10)
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.30, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.31, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.32, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str.33, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.34, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.35, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.36, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.37, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.38, i64 0, i64 0))
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.39, i64 0, i64 0))
%21 = tail call i32 @putchar(i32 10)
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.40, i64 0, i64 0))
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([104 x i8], [104 x i8]* @str.41, i64 0, i64 0))
%24 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str.42, i64 0, i64 0))
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.43, i64 0, i64 0))
%26 = tail call i32 @putchar(i32 10)
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.44, i64 0, i64 0))
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.45, i64 0, i64 0))
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.46, i64 0, i64 0))
%30 = tail call i32 @exit(i32 1)
unreachable
}