#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 *);
int /*<<< orphan*/ stderr;
void SayUsage(char *programName) {
  static char *usage[] = {
      "Display a MIDITONES bytestream",
      "Usage: miditones_scroll <basefilename>",
      "   reads <basefilename>.bin",
      " -tn displays up to n tone generators",
      " -v expects and displays volume information",
      " -vi expects and ignores volume information",
      " -c  creates an annotated C source file as <basefile>.c",
      " -x  show notes in hex instead of octave/note",
      ""};
  int i = 0;
  while (usage[i][0] != '\0')
    fprintf(stderr, "%s\n", usage[i++]);
}


x86 assembly (clang, -O0):
<SayUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movslq -0xc(%rbp),%rcx
lea    0x2f02(%rip),%rax
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1171 <SayUsage+0x61>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
movslq %eax,%rcx
lea    0x2ed4(%rip),%rax
mov    (%rax,%rcx,8),%rdx
lea    0xfdf(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1123 <SayUsage+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SayUsage>:
push   %r14
push   %rbx
push   %rax
mov    0x2ec5(%rip),%r14
mov    (%r14),%edi
lea    0x1021(%rip),%rbx
lea    0xed4(%rip),%rdx
mov    %rbx,%rsi
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xee1(%rip),%rdx
mov    %rbx,%rsi
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xef6(%rip),%rdx
mov    %rbx,%rsi
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xf00(%rip),%rdx
mov    %rbx,%rsi
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xf14(%rip),%rdx
mov    %rbx,%rsi
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xf2e(%rip),%rdx
mov    %rbx,%rsi
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xf48(%rip),%rdx
mov    %rbx,%rsi
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xf6e(%rip),%rdx
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@SayUsage.usage = internal global [9 x i8*] [i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i32 0, i32 0)]
@.str = [31 x i8] c"Display a MIDITONES bytestream\00"
@.str.1 = [39 x i8] c"Usage: miditones_scroll <basefilename>\00"
@.str.2 = [28 x i8] c" reads <basefilename>.bin\00"
@.str.3 = [38 x i8] c" -tn displays up to n tone generators\00"
@.str.4 = [44 x i8] c" -v expects and displays volume information\00"
@.str.5 = [44 x i8] c" -vi expects and ignores volume information\00"
@.str.6 = [56 x i8] c" -c creates an annotated C source file as <basefile>.c\00"
@.str.7 = [46 x i8] c" -x show notes in hex instead of octave/note\00"
@.str.8 = [1 x i8] zeroinitializer
@stderr = global i32 0
@.str.9 = [4 x i8] c"%s\0A\00"
define void @SayUsage(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [9 x i8*], [9 x i8*]* @SayUsage.usage, i64 0, i64 %6
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %21
13: ; preds = %4
%14 = load i32, i32* @stderr
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
%17 = sext i32 %15 to i64
%18 = getelementptr inbounds [9 x i8*], [9 x i8*]* @SayUsage.usage, i64 0, i64 %17
%19 = load i8*, i8** %18
%20 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* %19)
br label %4
21: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"Display a MIDITONES bytestream\00"
@.str.1 = [39 x i8] c"Usage: miditones_scroll <basefilename>\00"
@.str.2 = [28 x i8] c" reads <basefilename>.bin\00"
@.str.3 = [38 x i8] c" -tn displays up to n tone generators\00"
@.str.4 = [44 x i8] c" -v expects and displays volume information\00"
@.str.5 = [44 x i8] c" -vi expects and ignores volume information\00"
@.str.6 = [56 x i8] c" -c creates an annotated C source file as <basefile>.c\00"
@.str.7 = [46 x i8] c" -x show notes in hex instead of octave/note\00"
@stderr = global i32 0
@.str.9 = [4 x i8] c"%s\0A\00"
define void @SayUsage(i8* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.4, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = tail call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0))
%14 = load i32, i32* @stderr
%15 = tail call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.6, i64 0, i64 0))
%16 = load i32, i32* @stderr
%17 = tail call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.7, i64 0, i64 0))
ret void
}