#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*/ exit(int);
int /*<<< orphan*/ printf(char *);
void help() {
  printf("\n*****************************\n");
  printf("Help Screen:\n");
  printf("\tSndgen\n");
  printf("*****************************\n");
  printf("\tSupported Switches:");
  printf("-h (help), -w (output wav file instead of cs229), \n\t-o filename "
         "(output to specified filename, otherwise stdout)");
  printf("\n\tMore Switches: \n\t--bits n : use a bit depth of n\n\t--sr n : "
         "use a sample rate of n\n\t-f r : use a frequency of r Hz\n\t-t r : "
         "total duration of r seconds\n\t-v p : Peak volume. 0 <= p <= 1\n\t-a "
         "r : attack time of r seconds\n\t-d r : decay time of r seconds\n\t-s "
         "p : sustain volume. 0 <= p <= 1\n\t-r r : release time of r "
         "seconds\n\t--sine : generate a sine wave\n\t--triangle : generate a "
         "triangle wave\n\t--sawtooth : generate a sawtooth wave\n\t--pulse : "
         "generate a pulse wave\n\t--pf p : Fraction of the time the pulse "
         "wave is up\n\t");
  printf("\tMult must be a value specified between -10 and 10, and Inputfile "
         "must be a valid file path.\n");
  printf("\tOnce all desired switches are set, sndgen constructs your sound "
         "file.\n\n");
  printf("\tIMPORTANT NOTE: PLEASE ENSURE YOU SPECIFY ALL SWITCHES FOR ADSR. "
         "\n\tPLEASE MAKE SURE TO SET ALL DESIRED SWITCHES! There are quite a "
         "few :D.\n\n");
  printf("\tEnsure all files are in the same directory if using relative path, "
         "otherwise use absolute.\n");
  printf("\tThis program will exit after writing the new sound file containing "
         "the desired audio file that conforms to the user specified ADSR "
         "envelope.\n");
  printf("\nPlease view the README file for more detailed "
         "information.\nWritten by Michael Johnson.\n\n");
  printf("\n*****************************\n\n");
  exit(1);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf4a(%rip),%rdi
call   1030 <printf@plt>
lea    0x1142(%rip),%rdi
call   1030 <printf@plt>
lea    0x1194(%rip),%rdi
call   1030 <printf@plt>
lea    0x11d1(%rip),%rdi
call   1030 <printf@plt>
lea    0x1253(%rip),%rdi
call   1030 <printf@plt>
lea    0x12a4(%rip),%rdi
call   1030 <printf@plt>
lea    0x1327(%rip),%rdi
call   1030 <printf@plt>
lea    0x1375(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0x1152(%rip),%rdi
call   1030 <puts@plt>
lea    0x1165(%rip),%rdi
call   1030 <puts@plt>
lea    0x1166(%rip),%rdi
call   1030 <puts@plt>
lea    0x112f(%rip),%rdi
call   1030 <puts@plt>
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
lea    0xf06(%rip),%rdi
call   1040 <printf@plt>
lea    0x1132(%rip),%rdi
call   1030 <puts@plt>
lea    0x1183(%rip),%rdi
call   1030 <puts@plt>
lea    0x11bf(%rip),%rdi
call   1030 <puts@plt>
lea    0x1240(%rip),%rdi
call   1030 <puts@plt>
lea    0x1290(%rip),%rdi
call   1030 <puts@plt>
lea    0x1312(%rip),%rdi
call   1030 <puts@plt>
lea    0x135f(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"\0A*****************************\0A\00"
@.str.1 = [14 x i8] c"Help Screen:\0A\00"
@.str.2 = [9 x i8] c"\09Sndgen\0A\00"
@.str.3 = [31 x i8] c"*****************************\0A\00"
@.str.4 = [21 x i8] c"\09Supported Switches:\00"
@.str.5 = [113 x i8] c"-h (help), -w (output wav file instead of cs229), \0A\09-o filename (output to specified filename, otherwise stdout)\00"
@.str.6 = [516 x i8] c"\0A\09More Switches: \0A\09--bits n : use a bit depth of n\0A\09--sr n : use a sample rate of n\0A\09-f r : use a frequency of r Hz\0A\09-t r : total duration of r seconds\0A\09-v p : Peak volume. 0 <= p <= 1\0A\09-a r : attack time of r seconds\0A\09-d r : decay time of r seconds\0A\09-s p : sustain volume. 0 <= p <= 1\0A\09-r r : release time of r seconds\0A\09--sine : generate a sine wave\0A\09--triangle : generate a triangle wave\0A\09--sawtooth : generate a sawtooth wave\0A\09--pulse : generate a pulse wave\0A\09--pf p : Fraction of the time the pulse wave is up\0A\09\00"
@.str.7 = [94 x i8] c"\09Mult must be a value specified between -10 and 10, and Inputfile must be a valid file path.\0A\00"
@.str.8 = [73 x i8] c"\09Once all desired switches are set, sndgen constructs your sound file.\0A\0A\00"
@.str.9 = [142 x i8] c"\09IMPORTANT NOTE: PLEASE ENSURE YOU SPECIFY ALL SWITCHES FOR ADSR. \0A\09PLEASE MAKE SURE TO SET ALL DESIRED SWITCHES! There are quite a few :D.\0A\0A\00"
@.str.10 = [93 x i8] c"\09Ensure all files are in the same directory if using relative path, otherwise use absolute.\0A\00"
@.str.11 = [143 x i8] c"\09This program will exit after writing the new sound file containing the desired audio file that conforms to the user specified ADSR envelope.\0A\00"
@.str.12 = [90 x i8] c"\0APlease view the README file for more detailed information.\0AWritten by Michael Johnson.\0A\0A\00"
@.str.13 = [33 x i8] c"\0A*****************************\0A\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([113 x i8], [113 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([516 x i8], [516 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([142 x i8], [142 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str.4 = [21 x i8] c"\09Supported Switches:\00"
@.str.5 = [113 x i8] c"-h (help), -w (output wav file instead of cs229), \0A\09-o filename (output to specified filename, otherwise stdout)\00"
@.str.6 = [516 x i8] c"\0A\09More Switches: \0A\09--bits n : use a bit depth of n\0A\09--sr n : use a sample rate of n\0A\09-f r : use a frequency of r Hz\0A\09-t r : total duration of r seconds\0A\09-v p : Peak volume. 0 <= p <= 1\0A\09-a r : attack time of r seconds\0A\09-d r : decay time of r seconds\0A\09-s p : sustain volume. 0 <= p <= 1\0A\09-r r : release time of r seconds\0A\09--sine : generate a sine wave\0A\09--triangle : generate a triangle wave\0A\09--sawtooth : generate a sawtooth wave\0A\09--pulse : generate a pulse wave\0A\09--pf p : Fraction of the time the pulse wave is up\0A\09\00"
@str = [31 x i8] c"\0A*****************************\00"
@str.14 = [13 x i8] c"Help Screen:\00"
@str.15 = [8 x i8] c"\09Sndgen\00"
@str.16 = [30 x i8] c"*****************************\00"
@str.17 = [93 x i8] c"\09Mult must be a value specified between -10 and 10, and Inputfile must be a valid file path.\00"
@str.18 = [72 x i8] c"\09Once all desired switches are set, sndgen constructs your sound file.\0A\00"
@str.19 = [141 x i8] c"\09IMPORTANT NOTE: PLEASE ENSURE YOU SPECIFY ALL SWITCHES FOR ADSR. \0A\09PLEASE MAKE SURE TO SET ALL DESIRED SWITCHES! There are quite a few :D.\0A\00"
@str.20 = [92 x i8] c"\09Ensure all files are in the same directory if using relative path, otherwise use absolute.\00"
@str.21 = [142 x i8] c"\09This program will exit after writing the new sound file containing the desired audio file that conforms to the user specified ADSR envelope.\00"
@str.22 = [89 x i8] c"\0APlease view the README file for more detailed information.\0AWritten by Michael Johnson.\0A\00"
@str.23 = [32 x i8] c"\0A*****************************\0A\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.14, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.15, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.16, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([113 x i8], [113 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([516 x i8], [516 x i8]* @.str.6, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([93 x i8], [93 x i8]* @str.17, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.18, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([141 x i8], [141 x i8]* @str.19, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([92 x i8], [92 x i8]* @str.20, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([142 x i8], [142 x i8]* @str.21, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([89 x i8], [89 x i8]* @str.22, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.23, i64 0, i64 0))
%15 = tail call i32 @exit(i32 1)
unreachable
}