#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 */
typedef int /*<<< orphan*/ time_t;
typedef int /*<<< orphan*/ sqlite3_stmt;

/* Variables and functions */
int /*<<< orphan*/ SQLITE_TRANSIENT;
int /*<<< orphan*/ sqlite3_bind_int(int /*<<< orphan*/ *, int,
                                    int /*<<< orphan*/);
int /*<<< orphan*/ sqlite3_bind_text(int /*<<< orphan*/ *, int, char *,
                                     int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void bindQueryParamsTsHsAd(sqlite3_stmt *stmt, time_t tsFrom, time_t tsTo,
                           char *hs, char *ad) {
  sqlite3_bind_int(stmt, 1, tsFrom);
  sqlite3_bind_int(stmt, 2, tsTo);
  sqlite3_bind_text(stmt, 3, hs, strlen(hs), SQLITE_TRANSIENT);
  sqlite3_bind_text(stmt, 4, ad, strlen(ad), SQLITE_TRANSIENT);
}


x86 assembly (clang, -O0):
<bindQueryParamsTsHsAd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0x1,%esi
call   1030 <sqlite3_bind_int@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    $0x2,%esi
call   1030 <sqlite3_bind_int@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x40(%rbp),%rdi
mov    -0x38(%rbp),%rdx
mov    %eax,%ecx
mov    0x2e4a(%rip),%rax
mov    (%rax),%r8d
mov    $0x3,%esi
call   1050 <sqlite3_bind_text@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    %eax,%ecx
mov    0x2e13(%rip),%rax
mov    (%rax),%r8d
mov    $0x4,%esi
call   1050 <sqlite3_bind_text@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bindQueryParamsTsHsAd>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rcx,%r15
mov    %edx,%ebp
mov    %esi,%edx
mov    %rdi,%rbx
mov    $0x1,%esi
call   1030 <sqlite3_bind_int@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    %ebp,%edx
call   1030 <sqlite3_bind_int@plt>
mov    %r15,%rdi
call   1040 <strlen@plt>
mov    0x2e74(%rip),%rbp
mov    0x0(%rbp),%r8d
mov    %rbx,%rdi
mov    $0x3,%esi
mov    %r15,%rdx
mov    %eax,%ecx
call   1050 <sqlite3_bind_text@plt>
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    0x0(%rbp),%r8d
mov    %rbx,%rdi
mov    $0x4,%esi
mov    %r14,%rdx
mov    %eax,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <sqlite3_bind_text@plt>

LLVM IR (-O0):
@SQLITE_TRANSIENT = global i32 0
define void @bindQueryParamsTsHsAd(i32* %0, i32 %1, i32 %2, i8* %3, i8* %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i32*, i32** %6
%12 = load i32, i32* %7
%13 = call i32 @sqlite3_bind_int(i32* %11, i32 1, i32 %12)
%14 = load i32*, i32** %6
%15 = load i32, i32* %8
%16 = call i32 @sqlite3_bind_int(i32* %14, i32 2, i32 %15)
%17 = load i32*, i32** %6
%18 = load i8*, i8** %9
%19 = load i8*, i8** %9
%20 = call i32 @strlen(i8* %19)
%21 = load i32, i32* @SQLITE_TRANSIENT
%22 = call i32 @sqlite3_bind_text(i32* %17, i32 3, i8* %18, i32 %20, i32 %21)
%23 = load i32*, i32** %6
%24 = load i8*, i8** %10
%25 = load i8*, i8** %10
%26 = call i32 @strlen(i8* %25)
%27 = load i32, i32* @SQLITE_TRANSIENT
%28 = call i32 @sqlite3_bind_text(i32* %23, i32 4, i8* %24, i32 %26, i32 %27)
ret void
}

LLVM IR (-O2):
@SQLITE_TRANSIENT = global i32 0
define void @bindQueryParamsTsHsAd(i32* %0, i32 %1, i32 %2, i8* %3, i8* %4) {
%6 = tail call i32 @sqlite3_bind_int(i32* %0, i32 1, i32 %1)
%7 = tail call i32 @sqlite3_bind_int(i32* %0, i32 2, i32 %2)
%8 = tail call i32 @strlen(i8* %3)
%9 = load i32, i32* @SQLITE_TRANSIENT
%10 = tail call i32 @sqlite3_bind_text(i32* %0, i32 3, i8* %3, i32 %8, i32 %9)
%11 = tail call i32 @strlen(i8* %4)
%12 = load i32, i32* @SQLITE_TRANSIENT
%13 = tail call i32 @sqlite3_bind_text(i32* %0, i32 4, i8* %4, i32 %11, i32 %12)
ret void
}