#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 */
char *get_copyright();
char *get_name();
char *get_url();
int /*<<< orphan*/ printf(char *, ...);
void print_usage(char *name) {
  printf("%s, %s\r\n", get_name(), get_copyright());
  printf("\r\n");
  printf("Usage: %s [options]\r\n", name);
  printf("\r\n");
  printf("  /h or /?  Display usage information.\r\n");
  printf("  /v        Display version.\r\n");
  printf("  /b        Write build information for debugging.\r\n");
  printf("  /j        Play a song from the jukebox.\r\n");
  printf("\r\n");
  printf("More information: %s\r\n", get_url());
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1060 <get_name@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <get_copyright@plt>
mov    -0x10(%rbp),%rsi
mov    %rax,%rdx
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf1f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeff(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <get_url@plt>
mov    %rax,%rsi
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
xor    %eax,%eax
call   1070 <get_name@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <get_copyright@plt>
lea    0xe90(%rip),%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf2a(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xe76(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xe8a(%rip),%rdi
call   1040 <puts@plt>
lea    0xea6(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb8(%rip),%rdi
call   1040 <puts@plt>
lea    0xee0(%rip),%rdi
call   1040 <puts@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1060 <get_url@plt>
lea    0xe34(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%s, %s\0D\0A\00"
@.str.1 = [3 x i8] c"\0D\0A\00"
@.str.2 = [22 x i8] c"Usage: %s [options]\0D\0A\00"
@.str.3 = [41 x i8] c" /h or /? Display usage information.\0D\0A\00"
@.str.4 = [31 x i8] c" /v Display version.\0D\0A\00"
@.str.5 = [53 x i8] c" /b Write build information for debugging.\0D\0A\00"
@.str.6 = [44 x i8] c" /j Play a song from the jukebox.\0D\0A\00"
@.str.7 = [23 x i8] c"More information: %s\0D\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i8* (...) @get_name()
%4 = call i8* (...) @get_copyright()
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%15 = call i8* (...) @get_url()
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s, %s\0D\0A\00"
@.str.2 = [22 x i8] c"Usage: %s [options]\0D\0A\00"
@.str.7 = [23 x i8] c"More information: %s\0D\0A\00"
@str.9 = [40 x i8] c" /h or /? Display usage information.\0D\00"
@str.10 = [30 x i8] c" /v Display version.\0D\00"
@str.11 = [52 x i8] c" /b Write build information for debugging.\0D\00"
@str.12 = [43 x i8] c" /j Play a song from the jukebox.\0D\00"
@str.13 = [2 x i8] c"\0D\00"
define void @print_usage(i8* %0) {
%2 = tail call i8* (...) @get_name()
%3 = tail call i8* (...) @get_copyright()
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.13, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.13, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.9, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.10, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.11, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.12, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.13, i64 0, i64 0))
%13 = tail call i8* (...) @get_url()
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i8* %13)
ret void
}