#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 */
char *pipe2string(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
char *station_datatype_where(char *, char *);
char *station_datatype_get_manipulate_agency(char *application_name,
                                             char *station, char *datatype) {
  char sys_string[1024];
  char *where;
  where = station_datatype_where(station, datatype);
  sprintf(sys_string,
          "get_folder_data	application=%s			"
          "			select=manipulate_agency	"
          "			folder=station_datatype		"
          "			where=\"%s\"			",
          application_name, where);
  return pipe2string(sys_string);
}


x86 assembly (clang, -O0):
<station_datatype_get_manipulate_agency>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <station_datatype_where@plt>
mov    %rax,-0x428(%rbp)
lea    -0x420(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x428(%rbp),%rcx
lea    0xe8c(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x420(%rbp),%rdi
call   1040 <pipe2string@plt>
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<station_datatype_get_manipulate_agency>:
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <station_datatype_where@plt>
lea    0xeb1(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1050 <sprintf@plt>
mov    %r14,%rdi
call   1040 <pipe2string@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [106 x i8] c"get_folder_data\09application=%s\09\09\09\09\09\09select=manipulate_agency\09\09\09\09folder=station_datatype\09\09\09\09\09where=\22%s\22\09\09\09\00"
define i8* @station_datatype_get_manipulate_agency(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [1024 x i8]
%8 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i8* @station_datatype_where(i8* %9, i8* %10)
store i8* %11, i8** %8
%12 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%13 = load i8*, i8** %4
%14 = load i8*, i8** %8
%15 = call i32 @sprintf(i8* %12, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %14)
%16 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%17 = call i8* @pipe2string(i8* %16)
ret i8* %17
}

LLVM IR (-O2):
@.str = [106 x i8] c"get_folder_data\09application=%s\09\09\09\09\09\09select=manipulate_agency\09\09\09\09folder=station_datatype\09\09\09\09\09where=\22%s\22\09\09\09\00"
define i8* @station_datatype_get_manipulate_agency(i8* %0, i8* %1, i8* %2) {
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = tail call i8* @station_datatype_where(i8* %1, i8* %2)
%7 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %6)
%8 = call i8* @pipe2string(i8* %5)
ret i8* %8
}