#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 *);
void do_usage(const char *tool_name) {
  printf("usage : %s [-<mode>] [-<options>] file or directory\n\n"
         "  mode :\n"
         "    -x  eXtract firmware (default mode)\n"
         "    -c  Create firmware (only rebuild FDAT, reencrypt&rebuild fwdata "
         "to date)\n"
         "    -m  Modify firmware (not implemented yet)\n"
         "    -h  show extended Help\n"
         "    -t  show Todo list\n"
         "  options :\n"
         "    -d  Destination directory (eXtract only, optional)\n"
         "    -i  set mInor version number in create or modify mode (default "
         "increment)\n"
         "    -j  set maJor version number in create or modify mode (default "
         "leave)\n"
         "    -l  Level to extract to or create from (default 127)\n"
         "    -v  be Verbose (not implemented yet)\n",
         tool_name);
}


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

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

LLVM IR (-O0):
@.str = [594 x i8] c"usage : %s [-<mode>] [-<options>] file or directory\0A\0A mode :\0A -x eXtract firmware (default mode)\0A -c Create firmware (only rebuild FDAT, reencrypt&rebuild fwdata to date)\0A -m Modify firmware (not implemented yet)\0A -h show extended Help\0A -t show Todo list\0A options :\0A -d Destination directory (eXtract only, optional)\0A -i set mInor version number in create or modify mode (default increment)\0A -j set maJor version number in create or modify mode (default leave)\0A -l Level to extract to or create from (default 127)\0A -v be Verbose (not implemented yet)\0A\00"
define void @do_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([594 x i8], [594 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [594 x i8] c"usage : %s [-<mode>] [-<options>] file or directory\0A\0A mode :\0A -x eXtract firmware (default mode)\0A -c Create firmware (only rebuild FDAT, reencrypt&rebuild fwdata to date)\0A -m Modify firmware (not implemented yet)\0A -h show extended Help\0A -t show Todo list\0A options :\0A -d Destination directory (eXtract only, optional)\0A -i set mInor version number in create or modify mode (default increment)\0A -j set maJor version number in create or modify mode (default leave)\0A -l Level to extract to or create from (default 127)\0A -v be Verbose (not implemented yet)\0A\00"
define void @do_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([594 x i8], [594 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}