#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 *strdup(char *);
char *get_fetch_sys_string(void) {
  char sys_string[1024];
  sprintf(sys_string,
          "get_folder_data	application=everglades		  "
          "			folder=estimation_event_parameter "
          "			select=\"%s\"			  "
          "			where=\"%s\"			  ",
          "station,datatype,measurement_update_date,measurement_update_time,"
          "login_name,parameter_value",
          "measurement_update_method = 'nearest_neighbor' and parameter = "
          "'destination_station' and parameter_value != station");
  return strdup(sys_string);
}


x86 assembly (clang, -O0):
<get_fetch_sys_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
lea    -0x400(%rbp),%rdi
lea    0xec7(%rip),%rsi
lea    0xf35(%rip),%rdx
lea    0xf8a(%rip),%rcx
call   1030 <sprintf@plt>
lea    -0x400(%rbp),%rdi
call   1040 <strdup@plt>
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_fetch_sys_string>:
push   %rbx
sub    $0x400,%rsp
lea    0xed1(%rip),%rsi
lea    0xf3f(%rip),%rdx
lea    0xf94(%rip),%rcx
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strdup@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [117 x i8] c"get_folder_data\09application=everglades\09\09 \09\09\09folder=estimation_event_parameter \09\09\09select=\22%s\22\09\09\09 \09\09\09where=\22%s\22\09\09\09 \00"
@.str.1 = [92 x i8] c"station,datatype,measurement_update_date,measurement_update_time,login_name,parameter_value\00"
@.str.2 = [116 x i8] c"measurement_update_method = 'nearest_neighbor' and parameter = 'destination_station' and parameter_value != station\00"
define i8* @get_fetch_sys_string() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str.2, i64 0, i64 0))
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%5 = call i8* @strdup(i8* %4)
ret i8* %5
}

LLVM IR (-O2):
@.str = [117 x i8] c"get_folder_data\09application=everglades\09\09 \09\09\09folder=estimation_event_parameter \09\09\09select=\22%s\22\09\09\09 \09\09\09where=\22%s\22\09\09\09 \00"
@.str.1 = [92 x i8] c"station,datatype,measurement_update_date,measurement_update_time,login_name,parameter_value\00"
@.str.2 = [116 x i8] c"measurement_update_method = 'nearest_neighbor' and parameter = 'destination_station' and parameter_value != station\00"
define noalias i8* @get_fetch_sys_string() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([117 x i8], [117 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([92 x i8], [92 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str.2, i64 0, i64 0))
%4 = call i8* @strdup(i8* %2)
ret i8* %4
}