#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 *, char *);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ system(char *);
void play(char *file) {
  char str[100];
  strcpy(str, "echo \"");
  strcat(str, file);
  strcat(str, "\" | festival --tts");
  system(str);
  printf("TEXT = %s", str);
}


x86 assembly (clang, -O0):
<play>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x70(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1060 <strcat@plt>
lea    -0x70(%rbp),%rdi
lea    0xe93(%rip),%rsi
call   1060 <strcat@plt>
lea    -0x70(%rbp),%rdi
call   1040 <system@plt>
lea    -0x70(%rbp),%rsi
lea    0xe8d(%rip),%rdi
call   1050 <printf@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<play>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %rdi,%r14
lea    0xeaf(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <strcat@plt>
lea    0xe99(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcat@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xe95(%rip),%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"echo \22\00"
@.str.1 = [19 x i8] c"\22 | festival --tts\00"
@.str.2 = [10 x i8] c"TEXT = %s\00"
define void @play(i8* %0) {
%2 = alloca i8*
%3 = alloca [100 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%7 = load i8*, i8** %2
%8 = call i32 @strcat(i8* %6, i8* %7)
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%10 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%12 = call i32 @system(i8* %11)
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%14 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"echo \22\00"
@.str.1 = [19 x i8] c"\22 | festival --tts\00"
@.str.2 = [10 x i8] c"TEXT = %s\00"
define void @play(i8* %0) {
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @strcat(i8* %3, i8* %0)
%6 = call i32 @strcat(i8* %3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @system(i8* %3)
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %3)
ret void
}