#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 *on_the_hour_measurements_where(char *station, char *datatype,
                                     char *begin_date, char *end_date) {
  static char where[512];
  sprintf(where,
          "station = '%s'					"
          "and datatype = '%s' 				"
          "and measurement_date between '%s' and '%s' and	"
          "measurement_time like '%c00' 			",
          station, datatype, begin_date, end_date, '%');
  return where;
}


x86 assembly (clang, -O0):
<on_the_hour_measurements_where>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
lea    0x2f01(%rip),%rdi
lea    0xeba(%rip),%rsi
movl   $0x25,(%rsp)
call   1030 <sprintf@plt>
lea    0x2ee7(%rip),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<on_the_hour_measurements_where>:
push   %rbx
sub    $0x10,%rsp
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
movl   $0x25,(%rsp)
lea    0x2f11(%rip),%rbx
lea    0xeca(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@on_the_hour_measurements_where.where = internal global [512 x i8] zeroinitializer
@.str = [123 x i8] c"station = '%s'\09\09\09\09\09and datatype = '%s' \09\09\09\09and measurement_date between '%s' and '%s' and\09measurement_time like '%c00' \09\09\09\00"
define i8* @on_the_hour_measurements_where(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i32 @sprintf(i8* getelementptr inbounds ([512 x i8], [512 x i8]* @on_the_hour_measurements_where.where, i64 0, i64 0), i8* getelementptr inbounds ([123 x i8], [123 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i8* %11, i8* %12, i8 signext 37)
ret i8* getelementptr inbounds ([512 x i8], [512 x i8]* @on_the_hour_measurements_where.where, i64 0, i64 0)
}

LLVM IR (-O2):
@on_the_hour_measurements_where.where = internal global [512 x i8] zeroinitializer
@.str = [123 x i8] c"station = '%s'\09\09\09\09\09and datatype = '%s' \09\09\09\09and measurement_date between '%s' and '%s' and\09measurement_time like '%c00' \09\09\09\00"
define i8* @on_the_hour_measurements_where(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([512 x i8], [512 x i8]* @on_the_hour_measurements_where.where, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([123 x i8], [123 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2, i8* %3, i8 signext 37)
ret i8* getelementptr inbounds ([512 x i8], [512 x i8]* @on_the_hour_measurements_where.where, i64 0, i64 0)
}