#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 *binary) {
  printf("Usage: %s [-pqshHV] [-d 123] [-l level-file]\n", binary);
  printf("\n"
         "-h: show the help message (this message)\n\n"
         "-d: set difficulty:\n"
         "    1 easy\n"
         "    2 medium\n"
         "    3 hard\n\n"
         "-p: enable progressive difficulty\n"
         "    (increases difficulty every 25 points)\n\n"
         "-l: load level-file.  Leave blank to list levels.\n\n"
         "-q: disable 3, 2, 1 countdown\n\n"
         "-s: enable sound (terminal bell)\n\n"
         "-H: list your highscores.\n\n"
         "-V: print the version info and exit.\n\n"
         "Controls:\n"
         "    Movement: WASD, HJKL, Arrow Keys\n"
         "    Pause:    p\n"
         "    Quit:     q\n\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    0xef9(%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    0xef5(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"Usage: %s [-pqshHV] [-d 123] [-l level-file]\0A\00"
@.str.1 = [439 x i8] c"\0A-h: show the help message (this message)\0A\0A-d: set difficulty:\0A 1 easy\0A 2 medium\0A 3 hard\0A\0A-p: enable progressive difficulty\0A (increases difficulty every 25 points)\0A\0A-l: load level-file. Leave blank to list levels.\0A\0A-q: disable 3, 2, 1 countdown\0A\0A-s: enable sound (terminal bell)\0A\0A-H: list your highscores.\0A\0A-V: print the version info and exit.\0A\0AControls:\0A Movement: WASD, HJKL, Arrow Keys\0A Pause: p\0A Quit: q\0A\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 ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([439 x i8], [439 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"Usage: %s [-pqshHV] [-d 123] [-l level-file]\0A\00"
@str = [438 x i8] c"\0A-h: show the help message (this message)\0A\0A-d: set difficulty:\0A 1 easy\0A 2 medium\0A 3 hard\0A\0A-p: enable progressive difficulty\0A (increases difficulty every 25 points)\0A\0A-l: load level-file. Leave blank to list levels.\0A\0A-q: disable 3, 2, 1 countdown\0A\0A-s: enable sound (terminal bell)\0A\0A-H: list your highscores.\0A\0A-V: print the version info and exit.\0A\0AControls:\0A Movement: WASD, HJKL, Arrow Keys\0A Pause: p\0A Quit: q\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([438 x i8], [438 x i8]* @str, i64 0, i64 0))
ret void
}