#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*/ printf(char *, ...);
void printHelp(char *cmd) {
  printf("Sndchan Help:\n");
  printf("Usage: %s file1 [file2 ...] [options]\n\n", cmd);
  printf("Utility:\n");
  printf("This program reads the files passed as arguments and combines the "
         "channels of\n");
  printf("them into a single sound. The resulting sound will be the "
         "\"overlay\" of the\n");
  printf("source sounds. \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 (with -o)\n");
  printf("If no source files are given, tries to read file from stdin\n\n");
  printf("Options:\n");
  printf(
      "-c [n]\t\tOnly include channel n in output (1st channel = 0, etc.)\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    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf31(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfa1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfd7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1007(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1003(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1037(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1040(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1059(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printHelp>:
push   %rbx
mov    %rdi,%rbx
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeee(%rip),%rdi
call   1030 <puts@plt>
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf6c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf71(%rip),%rdi
call   1030 <puts@plt>
lea    0xf6f(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa1(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd8(%rip),%rdi
call   1030 <puts@plt>
lea    0x1009(%rip),%rdi
call   1030 <puts@plt>
lea    0x1006(%rip),%rdi
call   1030 <puts@plt>
lea    0x103b(%rip),%rdi
call   1030 <puts@plt>
lea    0x1045(%rip),%rdi
call   1030 <puts@plt>
lea    0x105f(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Sndchan Help:\0A\00"
@.str.1 = [40 x i8] c"Usage: %s file1 [file2 ...] [options]\0A\0A\00"
@.str.2 = [10 x i8] c"Utility:\0A\00"
@.str.3 = [79 x i8] c"This program reads the files passed as arguments and combines the channels of\0A\00"
@.str.4 = [76 x i8] c"them into a single sound. The resulting sound will be the \22overlay\22 of the\0A\00"
@.str.5 = [18 x i8] c"source sounds. \0A\0A\00"
@.str.6 = [11 x i8] c"Defaults:\0A\00"
@.str.7 = [63 x i8] c"Default output is in CS229 format (see -w option to change). \0A\00"
@.str.8 = [68 x i8] c"Default output is to stdout unless another file is given (with -o)\0A\00"
@.str.9 = [62 x i8] c"If no source files are given, tries to read file from stdin\0A\0A\00"
@.str.10 = [10 x i8] c"Options:\0A\00"
@.str.11 = [66 x i8] c"-c [n]\09\09Only include channel n in output (1st channel = 0, etc.)\0A\00"
@.str.12 = [23 x i8] c"-h\09\09Print this screen\0A\00"
@.str.13 = [39 x i8] c"-o [fileName]\09Output file to fileName\0A\00"
@.str.14 = [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 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.13, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.14, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [40 x i8] c"Usage: %s file1 [file2 ...] [options]\0A\0A\00"
@str = [14 x i8] c"Sndchan Help:\00"
@str.15 = [9 x i8] c"Utility:\00"
@str.16 = [78 x i8] c"This program reads the files passed as arguments and combines the channels of\00"
@str.17 = [75 x i8] c"them into a single sound. The resulting sound will be the \22overlay\22 of the\00"
@str.18 = [17 x i8] c"source sounds. \0A\00"
@str.19 = [10 x i8] c"Defaults:\00"
@str.20 = [62 x i8] c"Default output is in CS229 format (see -w option to change). \00"
@str.21 = [67 x i8] c"Default output is to stdout unless another file is given (with -o)\00"
@str.22 = [61 x i8] c"If no source files are given, tries to read file from stdin\0A\00"
@str.23 = [9 x i8] c"Options:\00"
@str.24 = [65 x i8] c"-c [n]\09\09Only include channel n in output (1st channel = 0, etc.)\00"
@str.25 = [22 x i8] c"-h\09\09Print this screen\00"
@str.26 = [38 x i8] c"-o [fileName]\09Output file to fileName\00"
@str.27 = [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 ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.15, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.16, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @str.17, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.18, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.19, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.20, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str.21, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.22, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.23, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.24, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.25, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.26, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.27, i64 0, i64 0))
ret void
}