#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*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void usage(int exitval) {
  fputs(
      "Neverwinter Nights Encapsulated Resource File (ERF) Utility (version "
      "ERF_VERSION) \n"
      "Original Copyright (C) 2003, Gareth Hughes. Copyright (C) 2014,2016 "
      "Meaglyn"
      "\n"
      "\n"
      "erf can write NWN .erf, .hak, .mod, .nwm and .sav files.  The type is \n"
      "determined from the extension of the archive name.  Exactly one of the "
      "main\n"
      "operation mode options below must be specified.\n"
      "\n"
      "Usage: erf [OPTION]... [FILE]...\n"
      "\n"
      "Examples:\n"
      "  erf -c archive.hak foo bar    # Create archive.hak from files foo and "
      "bar.\n"
      "  erf -tv archive.hak           # List all files in archive.hak "
      "verbosely.\n"
      "  erf -u archive.hak foo        # Update file foo in archive.hak.\n"
      "  erf -x archive.hak            # Extract all files from archive.hak.\n"
      "  erf -cd $'Lots of lines \\n \\n here \\n'  archive.hak foo bar  # "
      "create with description containing newlines.\n"
      "  erf -F descfile -c archive.hak foo  # create archive.hak with "
      "description text from descfile.\n"
      "  erf -E descfile -x archive.hak  # extract all files from archive.hak "
      "putting description string in descfile.\n"
      "\n"
      "Main operation mode:\n"
      "  -c, --create                  create a new archive\n"
      "  -t, --list                    list the contents of an archive\n"
      "  -u, --update                  update an archive (like import in "
      "Toolset)\n"
      "  -x, --extract                 extract files from an archive\n"
      "\n"
      "Informative output:\n"
      "  -h, --help                    print this help, then exit\n"
      "  -v, --verbose                 verbosely list files processed "
      "(includes -D)\n"
      "  -D,                           print the description to stdout\n"
      "  -E <descfile>                 write description string to descfile "
      "(use with -x)\n"
      "      --version                 print erf program version number, then "
      "exit\n"
      "\n"
      "Input options:\n"
      "  -d, --desc                    Use given string as description instead "
      "of default\n"
      "  -F <descfile>,                Use contents of descfile as description "
      "text (use with -c or -u)\n"
      "\n"
      "Report bugs to "
      "Meaglyn <meaglyn.nwn@gmail.com>"
      ".\n",
      stdout);
  exit(exitval);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%esi
lea    0xec5(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
lea    0xecd(%rip),%rdi
call   1030 <fputs@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [1907 x i8] c"Neverwinter Nights Encapsulated Resource File (ERF) Utility (version ERF_VERSION) \0AOriginal Copyright (C) 2003, Gareth Hughes. Copyright (C) 2014,2016 Meaglyn\0A\0Aerf can write NWN .erf, .hak, .mod, .nwm and .sav files. The type is \0Adetermined from the extension of the archive name. Exactly one of the main\0Aoperation mode options below must be specified.\0A\0AUsage: erf [OPTION]... [FILE]...\0A\0AExamples:\0A erf -c archive.hak foo bar # Create archive.hak from files foo and bar.\0A erf -tv archive.hak # List all files in archive.hak verbosely.\0A erf -u archive.hak foo # Update file foo in archive.hak.\0A erf -x archive.hak # Extract all files from archive.hak.\0A erf -cd $'Lots of lines \\n \\n here \\n' archive.hak foo bar # create with description containing newlines.\0A erf -F descfile -c archive.hak foo # create archive.hak with description text from descfile.\0A erf -E descfile -x archive.hak # extract all files from archive.hak putting description string in descfile.\0A\0AMain operation mode:\0A -c, --create create a new archive\0A -t, --list list the contents of an archive\0A -u, --update update an archive (like import in Toolset)\0A -x, --extract extract files from an archive\0A\0AInformative output:\0A -h, --help print this help, then exit\0A -v, --verbose verbosely list files processed (includes -D)\0A -D, print the description to stdout\0A -E <descfile> write description string to descfile (use with -x)\0A --version print erf program version number, then exit\0A\0AInput options:\0A -d, --desc Use given string as description instead of default\0A -F <descfile>, Use contents of descfile as description text (use with -c or -u)\0A\0AReport bugs to Meaglyn <meaglyn.nwn@gmail.com>.\0A\00"
@stdout = global i32 0
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = call i32 @fputs(i8* getelementptr inbounds ([1907 x i8], [1907 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [1907 x i8] c"Neverwinter Nights Encapsulated Resource File (ERF) Utility (version ERF_VERSION) \0AOriginal Copyright (C) 2003, Gareth Hughes. Copyright (C) 2014,2016 Meaglyn\0A\0Aerf can write NWN .erf, .hak, .mod, .nwm and .sav files. The type is \0Adetermined from the extension of the archive name. Exactly one of the main\0Aoperation mode options below must be specified.\0A\0AUsage: erf [OPTION]... [FILE]...\0A\0AExamples:\0A erf -c archive.hak foo bar # Create archive.hak from files foo and bar.\0A erf -tv archive.hak # List all files in archive.hak verbosely.\0A erf -u archive.hak foo # Update file foo in archive.hak.\0A erf -x archive.hak # Extract all files from archive.hak.\0A erf -cd $'Lots of lines \\n \\n here \\n' archive.hak foo bar # create with description containing newlines.\0A erf -F descfile -c archive.hak foo # create archive.hak with description text from descfile.\0A erf -E descfile -x archive.hak # extract all files from archive.hak putting description string in descfile.\0A\0AMain operation mode:\0A -c, --create create a new archive\0A -t, --list list the contents of an archive\0A -u, --update update an archive (like import in Toolset)\0A -x, --extract extract files from an archive\0A\0AInformative output:\0A -h, --help print this help, then exit\0A -v, --verbose verbosely list files processed (includes -D)\0A -D, print the description to stdout\0A -E <descfile> write description string to descfile (use with -x)\0A --version print erf program version number, then exit\0A\0AInput options:\0A -d, --desc Use given string as description instead of default\0A -F <descfile>, Use contents of descfile as description text (use with -c or -u)\0A\0AReport bugs to Meaglyn <meaglyn.nwn@gmail.com>.\0A\00"
@stdout = global i32 0
define void @usage(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([1907 x i8], [1907 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 @exit(i32 %0)
unreachable
}