#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*/ sprintf(char *, char *, char *, char *, char *, char *,
                           char *, char *, char *, char *);
scalar_t__ system(char *);
void go_output2shell_script_insert_statements(char *application_name,
                                              char *shell_script_filename,
                                              char *insert_statement_filename,
                                              char *folder_name) {
  char sys_string[1024];
  sprintf(sys_string,
          "zcat %s						|"
          "sed 's/^insert into %s/insert into \\$table_name/'	|"
          "sed 's/^delete from %s/delete from \\$table_name/'	|"
          "sed 's/^insert into %s_%s/insert into \\$table_name/'	|"
          "sed 's/^delete from %s_%s/delete from \\$table_name/'	|"
          "cat >> %s						 ",
          insert_statement_filename, folder_name, folder_name, application_name,
          folder_name, application_name, folder_name, shell_script_filename);
  if (system(sys_string)) {
  };
}


x86 assembly (clang, -O0):
<go_output2shell_script_insert_statements>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x448,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
lea    -0x430(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x10(%rbp),%r9
mov    -0x28(%rbp),%rbx
mov    -0x10(%rbp),%r11
mov    -0x28(%rbp),%r10
mov    -0x18(%rbp),%rax
lea    0xe96(%rip),%rsi
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1040 <sprintf@plt>
lea    -0x430(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
je     119d <go_output2shell_script_insert_statements+0x7d>
jmp    119d <go_output2shell_script_insert_statements+0x7d>
add    $0x448,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<go_output2shell_script_insert_statements>:
push   %rbx
sub    $0x400,%rsp
mov    %rsi,%rax
mov    %rdi,%r9
lea    0xecb(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %rcx,%r8
push   %rax
push   %rcx
push   %r9
push   %rcx
call   1040 <sprintf@plt>
add    $0x20,%rsp
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [241 x i8] c"zcat %s\09\09\09\09\09\09|sed 's/^insert into %s/insert into \\$table_name/'\09|sed 's/^delete from %s/delete from \\$table_name/'\09|sed 's/^insert into %s_%s/insert into \\$table_name/'\09|sed 's/^delete from %s_%s/delete from \\$table_name/'\09|cat >> %s\09\09\09\09\09\09 \00"
define void @go_output2shell_script_insert_statements(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [1024 x i8]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = load i8*, i8** %8
%14 = load i8*, i8** %5
%15 = load i8*, i8** %8
%16 = load i8*, i8** %5
%17 = load i8*, i8** %8
%18 = load i8*, i8** %6
%19 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([241 x i8], [241 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12, i8* %13, i8* %14, i8* %15, i8* %16, i8* %17, i8* %18)
%20 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%21 = call i64 @system(i8* %20)
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %4
br label %24
24: ; preds = %23, %4
ret void
}

LLVM IR (-O2):
@.str = [241 x i8] c"zcat %s\09\09\09\09\09\09|sed 's/^insert into %s/insert into \\$table_name/'\09|sed 's/^delete from %s/delete from \\$table_name/'\09|sed 's/^insert into %s_%s/insert into \\$table_name/'\09|sed 's/^delete from %s_%s/delete from \\$table_name/'\09|cat >> %s\09\09\09\09\09\09 \00"
define void @go_output2shell_script_insert_statements(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca [1024 x i8]
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([241 x i8], [241 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3, i8* %3, i8* %0, i8* %3, i8* %0, i8* %3, i8* %1)
%8 = call i64 @system(i8* %6)
ret void
}