#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*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void usage(const char *name) {
  fprintf(stderr, "Usage: %s [-d|-p|-s|-l dir] file\n", name);
  fputs("Where: -d    Dump decoded file to STDOUT\n", stderr);
  fputs("       -p    Decode and parse file showing profile data\n", stderr);
  fputs("       -s    Decode and parse file showing dive summary data\n",
        stderr);
  fputs("       -l    Dump distinct logs + profile files into directory "
        "\"dir\"\n",
        stderr);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%esi
lea    0xecd(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%esi
lea    0xee2(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%esi
lea    0xf06(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2e55(%rip),%rax
mov    (%rax),%esi
lea    0xf2f(%rip),%rdi
call   1030 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rbx
mov    (%rbx),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%esi
lea    0xee0(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xefc(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xf27(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xf57(%rip),%rdi
pop    %rbx
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"Usage: %s [-d|-p|-s|-l dir] file\0A\00"
@.str.1 = [42 x i8] c"Where: -d Dump decoded file to STDOUT\0A\00"
@.str.2 = [57 x i8] c" -p Decode and parse file showing profile data\0A\00"
@.str.3 = [62 x i8] c" -s Decode and parse file showing dive summary data\0A\00"
@.str.4 = [70 x i8] c" -l Dump distinct logs + profile files into directory \22dir\22\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 ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 @fputs(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @stderr
%9 = call i32 @fputs(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @stderr
%11 = call i32 @fputs(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.3, i64 0, i64 0), i32 %10)
%12 = load i32, i32* @stderr
%13 = call i32 @fputs(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.4, i64 0, i64 0), i32 %12)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"Usage: %s [-d|-p|-s|-l dir] file\0A\00"
@.str.1 = [42 x i8] c"Where: -d Dump decoded file to STDOUT\0A\00"
@.str.2 = [57 x i8] c" -p Decode and parse file showing profile data\0A\00"
@.str.3 = [62 x i8] c" -s Decode and parse file showing dive summary data\0A\00"
@.str.4 = [70 x i8] c" -l Dump distinct logs + profile files into directory \22dir\22\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 @fputs(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @stderr
%7 = tail call i32 @fputs(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @stderr
%9 = tail call i32 @fputs(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @stderr
%11 = tail call i32 @fputs(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.4, i64 0, i64 0), i32 %10)
ret void
}