#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(scalar_t__, char *, ...);
scalar_t__ stdout;
int display_help(const char *pn) {
  fprintf(stdout, "%s v%s (%s): Quake Pak ARchiving utility\n", pn,
          "v0.06.00 *forked*", "2006-11-09");
  fprintf(stdout, "Written by Steffen Solyga <solyga@absinth.net>\n");
  fprintf(stdout, "Maintained by %s\n",
          "David Costanzo <david_costanzo@yahoo.com>");
  fprintf(stdout, "\n");
  fprintf(stdout, "Usage: %s options archive [files]\n", pn);
  fprintf(stdout, "switches:\n");
  fprintf(stdout, "  -c\t create new pak archive\n");
  fprintf(stdout, "  -f\t force actions\n");
  fprintf(stdout, "  -h\t write this info to %s and exit sucessfully\n",
          stdout == stdout ? "stdout" : "stderr");
  fprintf(stdout, "  -l\t list contents of pak archive\n");
  fprintf(stdout,
          "  -t\t files !!contain!! the names of the files to process\n");
  fprintf(stdout, "  -v\t be verbose\n");
  fprintf(stdout, "  -x\t extract files from archive\n");
  fprintf(
      stdout,
      "  -V\t print version and compilation info to %s and exit sucessfully\n",
      stdout == stdout ? "stdout" : "stderr");
  fprintf(stdout, "Hint: %s doesn't work with stdin/stdout.\n", pn);
  return 0;
}


x86 assembly (clang, -O0):
<display_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rdx
lea    0xecf(%rip),%rsi
lea    0xef2(%rip),%rcx
lea    0xefd(%rip),%r8
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%rdi
lea    0xef0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%rdi
lea    0xf08(%rip),%rsi
lea    0xf13(%rip),%rdx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%rdi
lea    0x10c6(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e44(%rip),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rdx
lea    0xf09(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e28(%rip),%rax
mov    (%rax),%rdi
lea    0xf14(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e10(%rip),%rax
mov    (%rax),%rdi
lea    0xf07(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2df8(%rip),%rax
mov    (%rax),%rdi
lea    0xf0d(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2de0(%rip),%rax
mov    (%rax),%rdi
mov    0x2dd6(%rip),%rax
mov    (%rax),%rcx
mov    0x2dcc(%rip),%rax
mov    (%rax),%rsi
lea    0xf2f(%rip),%rdx
lea    0xf21(%rip),%rax
cmp    %rsi,%rcx
cmove  %rax,%rdx
lea    0xee1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d9f(%rip),%rax
mov    (%rax),%rdi
lea    0xf09(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d87(%rip),%rax
mov    (%rax),%rdi
lea    0xf15(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d6f(%rip),%rax
mov    (%rax),%rdi
lea    0xf38(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d57(%rip),%rax
mov    (%rax),%rdi
lea    0xf32(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2d3f(%rip),%rax
mov    (%rax),%rdi
mov    0x2d35(%rip),%rax
mov    (%rax),%rcx
mov    0x2d2b(%rip),%rax
mov    (%rax),%rsi
lea    0xe8e(%rip),%rdx
lea    0xe80(%rip),%rax
cmp    %rsi,%rcx
cmove  %rax,%rdx
lea    0xf13(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2cfe(%rip),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rdx
lea    0xf3c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_help>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
mov    0x2ec1(%rip),%rbx
mov    (%rbx),%rdi
lea    0xed7(%rip),%rsi
lea    0xefa(%rip),%rcx
lea    0xf05(%rip),%r8
mov    %r15,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%rdi
lea    0xefc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%rdi
lea    0xf1b(%rip),%rsi
lea    0xf26(%rip),%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%rdi
lea    0x10d9(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%rdi
lea    0xf2e(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%rdi
lea    0xf3d(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%rdi
lea    0xf37(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%rdi
lea    0xf44(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%rdi
lea    0xf48(%rip),%rsi
lea    0xf73(%rip),%r14
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%rdi
lea    0xf66(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%rdi
lea    0xf79(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%rdi
lea    0xfa3(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%rdi
lea    0xfa4(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%rdi
lea    0xfb5(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%rdi
lea    0xfe6(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdout = global i64 0
@.str = [42 x i8] c"%s v%s (%s): Quake Pak ARchiving utility\0A\00"
@.str.1 = [18 x i8] c"v0.06.00 *forked*\00"
@.str.2 = [11 x i8] c"2006-11-09\00"
@.str.3 = [48 x i8] c"Written by Steffen Solyga <solyga@absinth.net>\0A\00"
@.str.4 = [18 x i8] c"Maintained by %s\0A\00"
@.str.5 = [42 x i8] c"David Costanzo <david_costanzo@yahoo.com>\00"
@.str.6 = [2 x i8] c"\0A\00"
@.str.7 = [35 x i8] c"Usage: %s options archive [files]\0A\00"
@.str.8 = [11 x i8] c"switches:\0A\00"
@.str.9 = [30 x i8] c" -c\09 create new pak archive\0A\00"
@.str.10 = [21 x i8] c" -f\09 force actions\0A\00"
@.str.11 = [50 x i8] c" -h\09 write this info to %s and exit sucessfully\0A\00"
@.str.12 = [7 x i8] c"stdout\00"
@.str.13 = [7 x i8] c"stderr\00"
@.str.14 = [36 x i8] c" -l\09 list contents of pak archive\0A\00"
@.str.15 = [59 x i8] c" -t\09 files !!contain!! the names of the files to process\0A\00"
@.str.16 = [18 x i8] c" -v\09 be verbose\0A\00"
@.str.17 = [34 x i8] c" -x\09 extract files from archive\0A\00"
@.str.18 = [69 x i8] c" -V\09 print version and compilation info to %s and exit sucessfully\0A\00"
@.str.19 = [42 x i8] c"Hint: %s doesn't work with stdin/stdout.\0A\00"
define i32 @display_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i64, i64* @stdout
%4 = load i8*, i8** %2
%5 = call i32 (i64, i8*, ...) @fprintf(i64 %3, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %4, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%6 = load i64, i64* @stdout
%7 = call i32 (i64, i8*, ...) @fprintf(i64 %6, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.3, i64 0, i64 0))
%8 = load i64, i64* @stdout
%9 = call i32 (i64, i8*, ...) @fprintf(i64 %8, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0))
%10 = load i64, i64* @stdout
%11 = call i32 (i64, i8*, ...) @fprintf(i64 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%12 = load i64, i64* @stdout
%13 = load i8*, i8** %2
%14 = call i32 (i64, i8*, ...) @fprintf(i64 %12, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), i8* %13)
%15 = load i64, i64* @stdout
%16 = call i32 (i64, i8*, ...) @fprintf(i64 %15, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
%17 = load i64, i64* @stdout
%18 = call i32 (i64, i8*, ...) @fprintf(i64 %17, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0))
%19 = load i64, i64* @stdout
%20 = call i32 (i64, i8*, ...) @fprintf(i64 %19, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
%21 = load i64, i64* @stdout
%22 = load i64, i64* @stdout
%23 = load i64, i64* @stdout
%24 = icmp eq i64 %22, %23
%25 = zext i1 %24 to i64
%26 = select i1 %24, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0)
%27 = call i32 (i64, i8*, ...) @fprintf(i64 %21, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0), i8* %26)
%28 = load i64, i64* @stdout
%29 = call i32 (i64, i8*, ...) @fprintf(i64 %28, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.14, i64 0, i64 0))
%30 = load i64, i64* @stdout
%31 = call i32 (i64, i8*, ...) @fprintf(i64 %30, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.15, i64 0, i64 0))
%32 = load i64, i64* @stdout
%33 = call i32 (i64, i8*, ...) @fprintf(i64 %32, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.16, i64 0, i64 0))
%34 = load i64, i64* @stdout
%35 = call i32 (i64, i8*, ...) @fprintf(i64 %34, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.17, i64 0, i64 0))
%36 = load i64, i64* @stdout
%37 = load i64, i64* @stdout
%38 = load i64, i64* @stdout
%39 = icmp eq i64 %37, %38
%40 = zext i1 %39 to i64
%41 = select i1 %39, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0)
%42 = call i32 (i64, i8*, ...) @fprintf(i64 %36, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.18, i64 0, i64 0), i8* %41)
%43 = load i64, i64* @stdout
%44 = load i8*, i8** %2
%45 = call i32 (i64, i8*, ...) @fprintf(i64 %43, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.19, i64 0, i64 0), i8* %44)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i64 0
@.str = [42 x i8] c"%s v%s (%s): Quake Pak ARchiving utility\0A\00"
@.str.1 = [18 x i8] c"v0.06.00 *forked*\00"
@.str.2 = [11 x i8] c"2006-11-09\00"
@.str.3 = [48 x i8] c"Written by Steffen Solyga <solyga@absinth.net>\0A\00"
@.str.4 = [18 x i8] c"Maintained by %s\0A\00"
@.str.5 = [42 x i8] c"David Costanzo <david_costanzo@yahoo.com>\00"
@.str.6 = [2 x i8] c"\0A\00"
@.str.7 = [35 x i8] c"Usage: %s options archive [files]\0A\00"
@.str.8 = [11 x i8] c"switches:\0A\00"
@.str.9 = [30 x i8] c" -c\09 create new pak archive\0A\00"
@.str.10 = [21 x i8] c" -f\09 force actions\0A\00"
@.str.11 = [50 x i8] c" -h\09 write this info to %s and exit sucessfully\0A\00"
@.str.12 = [7 x i8] c"stdout\00"
@.str.14 = [36 x i8] c" -l\09 list contents of pak archive\0A\00"
@.str.15 = [59 x i8] c" -t\09 files !!contain!! the names of the files to process\0A\00"
@.str.16 = [18 x i8] c" -v\09 be verbose\0A\00"
@.str.17 = [34 x i8] c" -x\09 extract files from archive\0A\00"
@.str.18 = [69 x i8] c" -V\09 print version and compilation info to %s and exit sucessfully\0A\00"
@.str.19 = [42 x i8] c"Hint: %s doesn't work with stdin/stdout.\0A\00"
define i32 @display_help(i8* %0) {
%2 = load i64, i64* @stdout
%3 = tail call i32 (i64, i8*, ...) @fprintf(i64 %2, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%4 = load i64, i64* @stdout
%5 = tail call i32 (i64, i8*, ...) @fprintf(i64 %4, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.3, i64 0, i64 0))
%6 = load i64, i64* @stdout
%7 = tail call i32 (i64, i8*, ...) @fprintf(i64 %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0))
%8 = load i64, i64* @stdout
%9 = tail call i32 (i64, i8*, ...) @fprintf(i64 %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%10 = load i64, i64* @stdout
%11 = tail call i32 (i64, i8*, ...) @fprintf(i64 %10, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), i8* %0)
%12 = load i64, i64* @stdout
%13 = tail call i32 (i64, i8*, ...) @fprintf(i64 %12, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
%14 = load i64, i64* @stdout
%15 = tail call i32 (i64, i8*, ...) @fprintf(i64 %14, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0))
%16 = load i64, i64* @stdout
%17 = tail call i32 (i64, i8*, ...) @fprintf(i64 %16, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
%18 = load i64, i64* @stdout
%19 = tail call i32 (i64, i8*, ...) @fprintf(i64 %18, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%20 = load i64, i64* @stdout
%21 = tail call i32 (i64, i8*, ...) @fprintf(i64 %20, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.14, i64 0, i64 0))
%22 = load i64, i64* @stdout
%23 = tail call i32 (i64, i8*, ...) @fprintf(i64 %22, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.15, i64 0, i64 0))
%24 = load i64, i64* @stdout
%25 = tail call i32 (i64, i8*, ...) @fprintf(i64 %24, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.16, i64 0, i64 0))
%26 = load i64, i64* @stdout
%27 = tail call i32 (i64, i8*, ...) @fprintf(i64 %26, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.17, i64 0, i64 0))
%28 = load i64, i64* @stdout
%29 = tail call i32 (i64, i8*, ...) @fprintf(i64 %28, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
%30 = load i64, i64* @stdout
%31 = tail call i32 (i64, i8*, ...) @fprintf(i64 %30, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.19, i64 0, i64 0), i8* %0)
ret i32 0
}