#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 printUsage(const char *programName) {
  printf(
      "Usage: %s <bin_filename> [OPTION]...\n"
      "Options are :\n"
      "  -o, --output <g1a filename>      Name of the output file. Default is\n"
      "                                    'output.g1a'.\n"
      "  -i, --icon <icon filename>       Name of the icon file. Default is "
      "'icon.bmp'.\n"
      "  -v, --version-string <version>   String visible in 'VERSION' menu.\n"
      "                                   5 characters are displayed.\n"
      "  -d, --date-string <date>         Date of the build, not important.\n"
      "                                   Format is 'yyyy.MMdd.hhmm'\n"
      "  -n, --name <title name>          Title name, shown in 'VERSION' "
      "menu.\n"
      "                                   8 characters used.\n"
      "                                   Default is the g1a filename.\n"
      "  -N, --name <internal name>       Internal name used by the OS.\n"
      "                                   8 characters used, upper case is "
      "advisable.\n"
      "                                   Default is the title name.\n"
      "  -p, --preview-icon               Print an ASCII preview of the icon "
      "in stdout.\n"
      "  -h, --help                       Display this help.\n",
      programName);
}


x86 assembly (clang, -O0):
<printUsage>:
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):
<printUsage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [1048 x i8] c"Usage: %s <bin_filename> [OPTION]...\0AOptions are :\0A -o, --output <g1a filename> Name of the output file. Default is\0A 'output.g1a'.\0A -i, --icon <icon filename> Name of the icon file. Default is 'icon.bmp'.\0A -v, --version-string <version> String visible in 'VERSION' menu.\0A 5 characters are displayed.\0A -d, --date-string <date> Date of the build, not important.\0A Format is 'yyyy.MMdd.hhmm'\0A -n, --name <title name> Title name, shown in 'VERSION' menu.\0A 8 characters used.\0A Default is the g1a filename.\0A -N, --name <internal name> Internal name used by the OS.\0A 8 characters used, upper case is advisable.\0A Default is the title name.\0A -p, --preview-icon Print an ASCII preview of the icon in stdout.\0A -h, --help Display this help.\0A\00"
define void @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([1048 x i8], [1048 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [1048 x i8] c"Usage: %s <bin_filename> [OPTION]...\0AOptions are :\0A -o, --output <g1a filename> Name of the output file. Default is\0A 'output.g1a'.\0A -i, --icon <icon filename> Name of the icon file. Default is 'icon.bmp'.\0A -v, --version-string <version> String visible in 'VERSION' menu.\0A 5 characters are displayed.\0A -d, --date-string <date> Date of the build, not important.\0A Format is 'yyyy.MMdd.hhmm'\0A -n, --name <title name> Title name, shown in 'VERSION' menu.\0A 8 characters used.\0A Default is the g1a filename.\0A -N, --name <internal name> Internal name used by the OS.\0A 8 characters used, upper case is advisable.\0A Default is the title name.\0A -p, --preview-icon Print an ASCII preview of the icon in stdout.\0A -h, --help Display this help.\0A\00"
define void @printUsage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([1048 x i8], [1048 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}