#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*/ printUsage(char *);
int /*<<< orphan*/ printf(char *);
void printHelp(char *cmd) {
  printf("Sndmix Help:\n");
  printUsage(cmd);
  printf("\n\n");
  printf("Utility:\n");
  printf("This program reads the files passed as arguments, scales the sample "
         "data by\n");
  printf("their \"mult\", then adds together their sample data to make a "
         "single sound.\n\n");
  printf("If the sounds have unequal channels, zeroed out channels will be "
         "added to the\n");
  printf("one with fewer channels.\n");
  printf("If the sounds have different bit depths, the smaller samples are "
         "scaled up to\n");
  printf("match the larger ones.\n\n");
  printf("Defaults:\n");
  printf("Default output is in CS229 format (see -w option to change). \n");
  printf("Default output is to stdout unless another file is given (see -o)\n");
  printf("If no source files are given, file is read from stdin\n\n");
  printf("Options:\n");
  printf("-h\t\tPrint this screen\n");
  printf("-o [fileName]\tOutput file to fileName\n");
  printf("-w\t\tOutput in WAVE format\n");
}


x86 assembly (clang, -O0):
<printHelp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <printUsage@plt>
lea    0xf67(%rip),%rdi
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
call   1030 <printf@plt>
lea    0xf3a(%rip),%rdi
call   1030 <printf@plt>
lea    0xf7d(%rip),%rdi
call   1030 <printf@plt>
lea    0xf8b(%rip),%rdi
call   1030 <printf@plt>
lea    0xfce(%rip),%rdi
call   1030 <printf@plt>
lea    0xfdb(%rip),%rdi
call   1030 <printf@plt>
lea    0xfda(%rip),%rdi
call   1030 <printf@plt>
lea    0x100d(%rip),%rdi
call   1030 <printf@plt>
lea    0x1044(%rip),%rdi
call   1030 <printf@plt>
lea    0x1070(%rip),%rdi
call   1030 <printf@plt>
lea    0x106e(%rip),%rdi
call   1030 <printf@plt>
lea    0x1079(%rip),%rdi
call   1030 <printf@plt>
lea    0x1094(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printHelp>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <printUsage@plt>
lea    0xf6d(%rip),%rdi
call   1030 <puts@plt>
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
lea    0xebf(%rip),%rdi
call   1030 <puts@plt>
lea    0xeff(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3f(%rip),%rdi
call   1030 <puts@plt>
lea    0xf81(%rip),%rdi
call   1030 <puts@plt>
lea    0xf8e(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd0(%rip),%rdi
call   1030 <puts@plt>
lea    0xfdc(%rip),%rdi
call   1030 <puts@plt>
lea    0xfda(%rip),%rdi
call   1030 <puts@plt>
lea    0x100c(%rip),%rdi
call   1030 <puts@plt>
lea    0x1042(%rip),%rdi
call   1030 <puts@plt>
lea    0x106d(%rip),%rdi
call   1030 <puts@plt>
lea    0x106a(%rip),%rdi
call   1030 <puts@plt>
lea    0x1074(%rip),%rdi
call   1030 <puts@plt>
lea    0x108e(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Sndmix Help:\0A\00"
@.str.1 = [3 x i8] c"\0A\0A\00"
@.str.2 = [10 x i8] c"Utility:\0A\00"
@.str.3 = [77 x i8] c"This program reads the files passed as arguments, scales the sample data by\0A\00"
@.str.4 = [77 x i8] c"their \22mult\22, then adds together their sample data to make a single sound.\0A\0A\00"
@.str.5 = [79 x i8] c"If the sounds have unequal channels, zeroed out channels will be added to the\0A\00"
@.str.6 = [26 x i8] c"one with fewer channels.\0A\00"
@.str.7 = [79 x i8] c"If the sounds have different bit depths, the smaller samples are scaled up to\0A\00"
@.str.8 = [25 x i8] c"match the larger ones.\0A\0A\00"
@.str.9 = [11 x i8] c"Defaults:\0A\00"
@.str.10 = [63 x i8] c"Default output is in CS229 format (see -w option to change). \0A\00"
@.str.11 = [67 x i8] c"Default output is to stdout unless another file is given (see -o)\0A\00"
@.str.12 = [56 x i8] c"If no source files are given, file is read from stdin\0A\0A\00"
@.str.13 = [10 x i8] c"Options:\0A\00"
@.str.14 = [23 x i8] c"-h\09\09Print this screen\0A\00"
@.str.15 = [39 x i8] c"-o [fileName]\09Output file to fileName\0A\00"
@.str.16 = [27 x i8] c"-w\09\09Output in WAVE format\0A\00"
define void @printHelp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @printUsage(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.5, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.7, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.10, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.11, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.12, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.15, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.16, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [13 x i8] c"Sndmix Help:\00"
@str.17 = [2 x i8] c"\0A\00"
@str.18 = [9 x i8] c"Utility:\00"
@str.19 = [76 x i8] c"This program reads the files passed as arguments, scales the sample data by\00"
@str.20 = [76 x i8] c"their \22mult\22, then adds together their sample data to make a single sound.\0A\00"
@str.21 = [78 x i8] c"If the sounds have unequal channels, zeroed out channels will be added to the\00"
@str.22 = [25 x i8] c"one with fewer channels.\00"
@str.23 = [78 x i8] c"If the sounds have different bit depths, the smaller samples are scaled up to\00"
@str.24 = [24 x i8] c"match the larger ones.\0A\00"
@str.25 = [10 x i8] c"Defaults:\00"
@str.26 = [62 x i8] c"Default output is in CS229 format (see -w option to change). \00"
@str.27 = [66 x i8] c"Default output is to stdout unless another file is given (see -o)\00"
@str.28 = [55 x i8] c"If no source files are given, file is read from stdin\0A\00"
@str.29 = [9 x i8] c"Options:\00"
@str.30 = [22 x i8] c"-h\09\09Print this screen\00"
@str.31 = [38 x i8] c"-o [fileName]\09Output file to fileName\00"
@str.32 = [26 x i8] c"-w\09\09Output in WAVE format\00"
define void @printHelp(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @printUsage(i8* %0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.17, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.18, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.19, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.20, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.21, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.22, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.23, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.24, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.25, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.26, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.27, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.28, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.29, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.30, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.31, i64 0, i64 0))
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.32, i64 0, i64 0))
ret void
}