#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 *, ...);
void usage(int argc, char *argv[]) {
  const char *cmd = "glide64_cache_extract";
  if (argc > 1)
    cmd = argv[0];
  printf("Usage: %s [options]\n\n", cmd);
  printf("options:\n");
  printf("\t -i,--input FILE                   Use FILE as uncompressed input "
         "file (default: stdin)\n");
  printf("\t -o,--output FILE                  Use FILE as output file "
         "(default: stdout)\n");
  printf("\t -p,--prefix NAME                  Add prefix to each file\n");
  printf("\t -t,--type [hires|tex]             Type of the input\n");
  printf("\t -v,--verbose                      Print extra information on "
         "stderr (repeat for more verbosity)\n");
  printf("\t -e,--ignore-error                 Skip current file when an "
         "conversion error is detected\n");
  printf("\t -b,--bitmapv5                     Use V5 Windows Bitmap files "
         "with ImageMagick compatible alpha channels\n");
  printf("\t -h,--help                         Show this message and exit\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    113f <usage+0x2f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x100a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1058(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10b6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
cmp    $0x2,%edi
jl     112b <usage+0xb>
mov    (%rsi),%rsi
jmp    1132 <usage+0x12>
lea    0xece(%rip),%rsi
lea    0xedd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf71(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa1(%rip),%rdi
call   1030 <puts@plt>
lea    0xfcb(%rip),%rdi
call   1030 <puts@plt>
lea    0x1021(%rip),%rdi
call   1030 <puts@plt>
lea    0x1070(%rip),%rdi
call   1030 <puts@plt>
lea    0x10cf(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"glide64_cache_extract\00"
@.str.1 = [22 x i8] c"Usage: %s [options]\0A\0A\00"
@.str.2 = [10 x i8] c"options:\0A\00"
@.str.3 = [90 x i8] c"\09 -i,--input FILE Use FILE as uncompressed input file (default: stdin)\0A\00"
@.str.4 = [79 x i8] c"\09 -o,--output FILE Use FILE as output file (default: stdout)\0A\00"
@.str.5 = [61 x i8] c"\09 -p,--prefix NAME Add prefix to each file\0A\00"
@.str.6 = [55 x i8] c"\09 -t,--type [hires|tex] Type of the input\0A\00"
@.str.7 = [99 x i8] c"\09 -v,--verbose Print extra information on stderr (repeat for more verbosity)\0A\00"
@.str.8 = [92 x i8] c"\09 -e,--ignore-error Skip current file when an conversion error is detected\0A\00"
@.str.9 = [108 x i8] c"\09 -b,--bitmapv5 Use V5 Windows Bitmap files with ImageMagick compatible alpha channels\0A\00"
@.str.10 = [64 x i8] c"\09 -h,--help Show this message and exit\0A\00"
define void @usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8**, i8*** %4
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
store i8* %11, i8** %5
br label %12
12: ; preds = %8, %2
%13 = load i8*, i8** %5
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.3, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.4, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.5, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.6, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str.7, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str.8, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str.9, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.10, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"glide64_cache_extract\00"
@.str.1 = [22 x i8] c"Usage: %s [options]\0A\0A\00"
@str = [9 x i8] c"options:\00"
@str.11 = [89 x i8] c"\09 -i,--input FILE Use FILE as uncompressed input file (default: stdin)\00"
@str.12 = [78 x i8] c"\09 -o,--output FILE Use FILE as output file (default: stdout)\00"
@str.13 = [60 x i8] c"\09 -p,--prefix NAME Add prefix to each file\00"
@str.14 = [54 x i8] c"\09 -t,--type [hires|tex] Type of the input\00"
@str.15 = [98 x i8] c"\09 -v,--verbose Print extra information on stderr (repeat for more verbosity)\00"
@str.16 = [91 x i8] c"\09 -e,--ignore-error Skip current file when an conversion error is detected\00"
@str.17 = [107 x i8] c"\09 -b,--bitmapv5 Use V5 Windows Bitmap files with ImageMagick compatible alpha channels\00"
@str.18 = [63 x i8] c"\09 -h,--help Show this message and exit\00"
define void @usage(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = load i8*, i8** %1
br label %6
6: ; preds = %4, %2
%7 = phi i8* [ %5, %4 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), %2 ]
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([89 x i8], [89 x i8]* @str.11, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.12, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.13, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.14, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([98 x i8], [98 x i8]* @str.15, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([91 x i8], [91 x i8]* @str.16, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([107 x i8], [107 x i8]* @str.17, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.18, i64 0, i64 0))
ret void
}