#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(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *argv0) {
  fprintf(
      stderr,
      "Usage: %s [OPTIONS...]\n"
      "\n"
      "Options:\n"
      "  -h              show this help\n"
      "\n"
      "Create a new image:\n"
      "  -B <board>      create image for the board specified with <board>\n"
      "  -k <file>       read kernel image from the file <file>\n"
      "  -r <file>       read rootfs image from the file <file>\n"
      "  -o <file>       write output to the file <file>\n"
      "  -V <rev>        sets the revision number to <rev>\n"
      "  -j              add jffs2 end-of-filesystem markers\n"
      "  -S              create sysupgrade instead of factory image\n"
      "Extract an old image:\n"
      "  -x <file>       extract all oem firmware partition\n"
      "  -d <dir>        destination to extract the firmware partition\n"
      "  -z <file>       convert an oem firmware into a sysupgade file. Use -o "
      "for output file\n",
      argv0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [714 x i8] c"Usage: %s [OPTIONS...]\0A\0AOptions:\0A -h show this help\0A\0ACreate a new image:\0A -B <board> create image for the board specified with <board>\0A -k <file> read kernel image from the file <file>\0A -r <file> read rootfs image from the file <file>\0A -o <file> write output to the file <file>\0A -V <rev> sets the revision number to <rev>\0A -j add jffs2 end-of-filesystem markers\0A -S create sysupgrade instead of factory image\0AExtract an old image:\0A -x <file> extract all oem firmware partition\0A -d <dir> destination to extract the firmware partition\0A -z <file> convert an oem firmware into a sysupgade file. Use -o for output file\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([714 x i8], [714 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [714 x i8] c"Usage: %s [OPTIONS...]\0A\0AOptions:\0A -h show this help\0A\0ACreate a new image:\0A -B <board> create image for the board specified with <board>\0A -k <file> read kernel image from the file <file>\0A -r <file> read rootfs image from the file <file>\0A -o <file> write output to the file <file>\0A -V <rev> sets the revision number to <rev>\0A -j add jffs2 end-of-filesystem markers\0A -S create sysupgrade instead of factory image\0AExtract an old image:\0A -x <file> extract all oem firmware partition\0A -d <dir> destination to extract the firmware partition\0A -z <file> convert an oem firmware into a sysupgade file. Use -o for output file\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([714 x i8], [714 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}