#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 *, char const *, int, int);
void do_help(const char *tool_name) {
  printf(
      "help (extended) :"
      "usage : %s [-<mode>] [-<options>] file or directory\n\n"
      "  mode :\n"
      "    -x  eXtract firmware (default mode, may be omitted):\n"
      "        Argument: downloaded Windows Firmware Update *.exe file in "
      "current\n"
      "        path, extension '.exe' may be omitted.\n"
      "        Extraction to directory contained in zip inside *.exe to "
      "current path\n"
      "        or destination directory if -d is given.\n"
      "        Extract complete content, used as input to modify and create "
      "mode.\n"
      "    -c  Create firmware (only rebuild FDAT, reencrypt&rebuild fwdata to "
      "date):\n"
      "        Argument: <UpdaterDirectory> created with eXtract mode, this "
      "may contain\n"
      "        a relative or full path.\n"
      "        <UpdaterDirectory>/nexhack/level3/*.mod.* must exist, this "
      "files will be\n"
      "        repacked, reencrypted and repacked to a valid "
      "FirmwareUpdate*.dat,\n"
      "        further versions of fwtool will repack lower levels not "
      "implemented yet.\n"
      "        Run <UpdaterDirectory>/FirmwareUpdater.exe to update cam with "
      "modified\n"
      "        firmware <UpdaterDirectory>/Resource/FirmwareData_NexHack.dat.\n"
      "        Original firmware is saved to\n"
      "        <UpdaterDirectory>/Resource/FirmwareData_Original.dat.save.\n"
      "    -m  Modify firmware (not implemented yet)\n"
      "    -h  show extended Help (this list)\n"
      "    -t  show Todo list\n"
      "  options :\n"
      "    -d  Destination directory (eXtract only, optional):\n"
      "        Extracting complete firmware updater directory not to current "
      "path but\n"
      "        to this directory.\n"
      "        In create mode a destination makes no sense, so this option is "
      "ignored.\n"
      "    -i  set mInor version number in create or modify mode (default "
      "increment):\n"
      "        Minor version number may be in the range from 0 to %d.\n"
      "    -j  set maJor version number in create or modify mode (default "
      "leave):\n"
      "        Major version number may be in the range from 1 to %d.\n"
      "    -l  Level to extract to or create from (default 127):\n"
      "        Used for modify mode to do only needed unpacking, not "
      "implemented yet.\n"
      "    -v  be Verbose (not implemented yet)\n"
      "  fwtool appends extended log output to fwtool_log.txt in current "
      "path.\n",
      tool_name, 127, 127);
}


x86 assembly (clang, -O0):
<do_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
mov    $0x7f,%ecx
mov    %ecx,%edx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_help>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
mov    $0x7f,%edx
mov    $0x7f,%ecx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [2039 x i8] c"help (extended) :usage : %s [-<mode>] [-<options>] file or directory\0A\0A mode :\0A -x eXtract firmware (default mode, may be omitted):\0A Argument: downloaded Windows Firmware Update *.exe file in current\0A path, extension '.exe' may be omitted.\0A Extraction to directory contained in zip inside *.exe to current path\0A or destination directory if -d is given.\0A Extract complete content, used as input to modify and create mode.\0A -c Create firmware (only rebuild FDAT, reencrypt&rebuild fwdata to date):\0A Argument: <UpdaterDirectory> created with eXtract mode, this may contain\0A a relative or full path.\0A <UpdaterDirectory>/nexhack/level3/*.mod.* must exist, this files will be\0A repacked, reencrypted and repacked to a valid FirmwareUpdate*.dat,\0A further versions of fwtool will repack lower levels not implemented yet.\0A Run <UpdaterDirectory>/FirmwareUpdater.exe to update cam with modified\0A firmware <UpdaterDirectory>/Resource/FirmwareData_NexHack.dat.\0A Original firmware is saved to\0A <UpdaterDirectory>/Resource/FirmwareData_Original.dat.save.\0A -m Modify firmware (not implemented yet)\0A -h show extended Help (this list)\0A -t show Todo list\0A options :\0A -d Destination directory (eXtract only, optional):\0A Extracting complete firmware updater directory not to current path but\0A to this directory.\0A In create mode a destination makes no sense, so this option is ignored.\0A -i set mInor version number in create or modify mode (default increment):\0A Minor version number may be in the range from 0 to %d.\0A -j set maJor version number in create or modify mode (default leave):\0A Major version number may be in the range from 1 to %d.\0A -l Level to extract to or create from (default 127):\0A Used for modify mode to do only needed unpacking, not implemented yet.\0A -v be Verbose (not implemented yet)\0A fwtool appends extended log output to fwtool_log.txt in current path.\0A\00"
define void @do_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([2039 x i8], [2039 x i8]* @.str, i64 0, i64 0), i8* %3, i32 127, i32 127)
ret void
}

LLVM IR (-O2):
@.str = [2039 x i8] c"help (extended) :usage : %s [-<mode>] [-<options>] file or directory\0A\0A mode :\0A -x eXtract firmware (default mode, may be omitted):\0A Argument: downloaded Windows Firmware Update *.exe file in current\0A path, extension '.exe' may be omitted.\0A Extraction to directory contained in zip inside *.exe to current path\0A or destination directory if -d is given.\0A Extract complete content, used as input to modify and create mode.\0A -c Create firmware (only rebuild FDAT, reencrypt&rebuild fwdata to date):\0A Argument: <UpdaterDirectory> created with eXtract mode, this may contain\0A a relative or full path.\0A <UpdaterDirectory>/nexhack/level3/*.mod.* must exist, this files will be\0A repacked, reencrypted and repacked to a valid FirmwareUpdate*.dat,\0A further versions of fwtool will repack lower levels not implemented yet.\0A Run <UpdaterDirectory>/FirmwareUpdater.exe to update cam with modified\0A firmware <UpdaterDirectory>/Resource/FirmwareData_NexHack.dat.\0A Original firmware is saved to\0A <UpdaterDirectory>/Resource/FirmwareData_Original.dat.save.\0A -m Modify firmware (not implemented yet)\0A -h show extended Help (this list)\0A -t show Todo list\0A options :\0A -d Destination directory (eXtract only, optional):\0A Extracting complete firmware updater directory not to current path but\0A to this directory.\0A In create mode a destination makes no sense, so this option is ignored.\0A -i set mInor version number in create or modify mode (default increment):\0A Minor version number may be in the range from 0 to %d.\0A -j set maJor version number in create or modify mode (default leave):\0A Major version number may be in the range from 1 to %d.\0A -l Level to extract to or create from (default 127):\0A Used for modify mode to do only needed unpacking, not implemented yet.\0A -v be Verbose (not implemented yet)\0A fwtool appends extended log output to fwtool_log.txt in current path.\0A\00"
define void @do_help(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([2039 x i8], [2039 x i8]* @.str, i64 0, i64 0), i8* %0, i32 127, i32 127)
ret void
}