#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 *);
void get_update_statement(char *statement, char *table_name, char *station,
                          char *new_station, char *datatype,
                          char *measurement_update_date,
                          char *measurement_update_time, char *login_name) {
  sprintf(statement,
          "update %s					 	 "
          "	set station = '%s'				 "
          "	where station = '%s' 				 "
          "	  and datatype = '%s' 				 "
          "	  and measurement_update_date = '%s'			 "
          "	  and measurement_update_time = '%s'			 "
          "	  and measurement_update_method = 'nearest_neighbor' 	 "
          "	  and login_name = '%s';			 ",
          table_name, new_station, station, datatype, measurement_update_date,
          measurement_update_time, login_name);
}


x86 assembly (clang, -O0):
<get_update_statement>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%r11
mov    0x10(%rbp),%r10
mov    0x18(%rbp),%rax
lea    0xea1(%rip),%rsi
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <sprintf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_update_statement>:
sub    $0x18,%rsp
mov    %r8,%rax
mov    %rdx,%r8
mov    %rsi,%rdx
movaps 0x20(%rsp),%xmm0
movups %xmm0,0x8(%rsp)
mov    %r9,(%rsp)
lea    0xece(%rip),%rsi
mov    %rax,%r9
call   1030 <sprintf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [264 x i8] c"update %s\09\09\09\09\09 \09 \09set station = '%s'\09\09\09\09 \09where station = '%s' \09\09\09\09 \09 and datatype = '%s' \09\09\09\09 \09 and measurement_update_date = '%s'\09\09\09 \09 and measurement_update_time = '%s'\09\09\09 \09 and measurement_update_method = 'nearest_neighbor' \09 \09 and login_name = '%s';\09\09\09 \00"
define void @get_update_statement(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7) {
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
store i8* %0, i8** %9
store i8* %1, i8** %10
store i8* %2, i8** %11
store i8* %3, i8** %12
store i8* %4, i8** %13
store i8* %5, i8** %14
store i8* %6, i8** %15
store i8* %7, i8** %16
%17 = load i8*, i8** %9
%18 = load i8*, i8** %10
%19 = load i8*, i8** %12
%20 = load i8*, i8** %11
%21 = load i8*, i8** %13
%22 = load i8*, i8** %14
%23 = load i8*, i8** %15
%24 = load i8*, i8** %16
%25 = call i32 @sprintf(i8* %17, i8* getelementptr inbounds ([264 x i8], [264 x i8]* @.str, i64 0, i64 0), i8* %18, i8* %19, i8* %20, i8* %21, i8* %22, i8* %23, i8* %24)
ret void
}

LLVM IR (-O2):
@.str = [264 x i8] c"update %s\09\09\09\09\09 \09 \09set station = '%s'\09\09\09\09 \09where station = '%s' \09\09\09\09 \09 and datatype = '%s' \09\09\09\09 \09 and measurement_update_date = '%s'\09\09\09 \09 and measurement_update_time = '%s'\09\09\09 \09 and measurement_update_method = 'nearest_neighbor' \09 \09 and login_name = '%s';\09\09\09 \00"
define void @get_update_statement(i8* nocapture writeonly %0, i8* %1, i8* %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7) {
%9 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([264 x i8], [264 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %3, i8* %2, i8* %4, i8* %5, i8* %6, i8* %7)
ret void
}