#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 *, ...);
void print_usage(char *prog_name) {
  printf("Usage: %s [OPTION] [CYOA_FILE]\n", prog_name);
  printf("Reads and generates Choose Your Own Adventure stories.\n"
         "With no OPTION, open CYOA_FILE (create if nonexistent).\n\n"
         "  -c [CYOA_FILE]    create a new CYOA_FILE\n"
         "  -h                display this help and exit\n"
         "  -r [CYOA_FILE]    read an existing CYOA_FILE\n"
         "  -v                output version information and exit\n\n"
         "Only the immediate character following '-' is considered when "
         "evaluating\n"
         "OPTION.\n\n"
         "Report cyoaGen bugs to vilhelm.gray@gmail.com\n");
}


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

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee7(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Usage: %s [OPTION] [CYOA_FILE]\0A\00"
@.str.1 = [435 x i8] c"Reads and generates Choose Your Own Adventure stories.\0AWith no OPTION, open CYOA_FILE (create if nonexistent).\0A\0A -c [CYOA_FILE] create a new CYOA_FILE\0A -h display this help and exit\0A -r [CYOA_FILE] read an existing CYOA_FILE\0A -v output version information and exit\0A\0AOnly the immediate character following '-' is considered when evaluating\0AOPTION.\0A\0AReport cyoaGen bugs to vilhelm.gray@gmail.com\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([435 x i8], [435 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"Usage: %s [OPTION] [CYOA_FILE]\0A\00"
@str = [434 x i8] c"Reads and generates Choose Your Own Adventure stories.\0AWith no OPTION, open CYOA_FILE (create if nonexistent).\0A\0A -c [CYOA_FILE] create a new CYOA_FILE\0A -h display this help and exit\0A -r [CYOA_FILE] read an existing CYOA_FILE\0A -v output version information and exit\0A\0AOnly the immediate character following '-' is considered when evaluating\0AOPTION.\0A\0AReport cyoaGen bugs to vilhelm.gray@gmail.com\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([434 x i8], [434 x i8]* @str, i64 0, i64 0))
ret void
}