#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("Sndcat Help:\n");
  printf("Usage: %s file1 [file2 ...] [options]\n\n", cmd);
  printf("Utility:\n");
  printf("This program reads the CS229/WAVE file(s) passed as arguments, "
         "concatenates them,\n");
  printf("and writes the result to a file (default:stdout , see -o option). "
         "Outputs in the\n");
  printf("requested format (default:CS229, see -w option)\n\n");
  printf("Defaults:\n");
  printf("Default output file type is CS229 (see -w option)\n");
  printf("Default output file is stdout unless another file is provided with "
         "-o.\n");
  printf("If no source file(s) are provided by the arguments, input is read "
         "from stdin.\n");
  printf("If only one source file is provided, the file is rewritten as-is in "
         "the desired\n");
  printf("format. (useful for converting between formats)\n\n");
  printf("Options:\n");
  printf("-h\t\tdisplays this help page\n");
  printf("-o [file]\toutput to a file rather than standard out\n");
  printf("-w\t\toutput in the WAVE format rather than CS229\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    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf34(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfbe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xff8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1039(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x107c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10a0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x109c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10ab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10d2(%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    0xeed(%rip),%rdi
call   1030 <puts@plt>
lea    0xeea(%rip),%rdi
call   1030 <puts@plt>
lea    0xf30(%rip),%rdi
call   1030 <puts@plt>
lea    0xf75(%rip),%rdi
call   1030 <puts@plt>
lea    0xf9a(%rip),%rdi
call   1030 <puts@plt>
lea    0xf98(%rip),%rdi
call   1030 <puts@plt>
lea    0xfbe(%rip),%rdi
call   1030 <puts@plt>
lea    0xff9(%rip),%rdi
call   1030 <puts@plt>
lea    0x103b(%rip),%rdi
call   1030 <puts@plt>
lea    0x107f(%rip),%rdi
call   1030 <puts@plt>
lea    0x10a4(%rip),%rdi
call   1030 <puts@plt>
lea    0x10a1(%rip),%rdi
call   1030 <puts@plt>
lea    0x10b1(%rip),%rdi
call   1030 <puts@plt>
lea    0x10d9(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Sndcat 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 = [83 x i8] c"This program reads the CS229/WAVE file(s) passed as arguments, concatenates them,\0A\00"
@.str.4 = [82 x i8] c"and writes the result to a file (default:stdout , see -o option). Outputs in the\0A\00"
@.str.5 = [50 x i8] c"requested format (default:CS229, see -w option)\0A\0A\00"
@.str.6 = [11 x i8] c"Defaults:\0A\00"
@.str.7 = [51 x i8] c"Default output file type is CS229 (see -w option)\0A\00"
@.str.8 = [72 x i8] c"Default output file is stdout unless another file is provided with -o.\0A\00"
@.str.9 = [79 x i8] c"If no source file(s) are provided by the arguments, input is read from stdin.\0A\00"
@.str.10 = [81 x i8] c"If only one source file is provided, the file is rewritten as-is in the desired\0A\00"
@.str.11 = [50 x i8] c"format. (useful for converting between formats)\0A\0A\00"
@.str.12 = [10 x i8] c"Options:\0A\00"
@.str.13 = [29 x i8] c"-h\09\09displays this help page\0A\00"
@.str.14 = [53 x i8] c"-o [file]\09output to a file rather than standard out\0A\00"
@.str.15 = [49 x i8] c"-w\09\09output in the WAVE format rather than CS229\0A\00"
define void @printHelp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 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 ([83 x i8], [83 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 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 ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.11, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.13, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.14, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.15, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [40 x i8] c"Usage: %s file1 [file2 ...] [options]\0A\0A\00"
@str = [13 x i8] c"Sndcat Help:\00"
@str.16 = [9 x i8] c"Utility:\00"
@str.17 = [82 x i8] c"This program reads the CS229/WAVE file(s) passed as arguments, concatenates them,\00"
@str.18 = [81 x i8] c"and writes the result to a file (default:stdout , see -o option). Outputs in the\00"
@str.19 = [49 x i8] c"requested format (default:CS229, see -w option)\0A\00"
@str.20 = [10 x i8] c"Defaults:\00"
@str.21 = [50 x i8] c"Default output file type is CS229 (see -w option)\00"
@str.22 = [71 x i8] c"Default output file is stdout unless another file is provided with -o.\00"
@str.23 = [78 x i8] c"If no source file(s) are provided by the arguments, input is read from stdin.\00"
@str.24 = [80 x i8] c"If only one source file is provided, the file is rewritten as-is in the desired\00"
@str.25 = [49 x i8] c"format. (useful for converting between formats)\0A\00"
@str.26 = [9 x i8] c"Options:\00"
@str.27 = [28 x i8] c"-h\09\09displays this help page\00"
@str.28 = [52 x i8] c"-o [file]\09output to a file rather than standard out\00"
@str.29 = [48 x i8] c"-w\09\09output in the WAVE format rather than CS229\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 (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.16, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str.17, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.18, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.19, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.20, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.21, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.22, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.23, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.24, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.25, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.26, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.27, i64 0, i64 0))
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.28, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.29, i64 0, i64 0))
ret void
}