#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*/ MYSQL_ROW;
typedef int /*<<< orphan*/ MYSQL_RES;
typedef int /*<<< orphan*/ MYSQL;

/* Variables and functions */
int /*<<< orphan*/ mysql_close(int /*<<< orphan*/ *);
int /*<<< orphan*/ *mysql_init(int /*<<< orphan*/ *);
int /*<<< orphan*/ mysql_query(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ mysql_real_connect(int /*<<< orphan*/ *, char *, char *,
                                      char *, char *, int /*<<< orphan*/,
                                      int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, char *, float, char *, float);
void modificar_bien_monto(float monto, float nvo_monto) {
  MYSQL *conexion;
  MYSQL_RES *R;
  MYSQL_ROW COL;
  char *servidor = "localhost";
  char *usuario = "root";
  char *pass = "1234";
  char *base = "casaempenio";
  conexion = mysql_init(NULL);
  mysql_real_connect(conexion, servidor, usuario, pass, base, 0, NULL, 0);
  char *sentencia = "update bienes set monto=";
  char *sentencia2 = "where monto=";
  char buffer[600];
  sprintf(buffer, "%s %f %s %f;", sentencia, nvo_monto, sentencia2, monto);
  mysql_query(conexion, buffer);
  mysql_close(conexion);
}


x86 assembly (clang, -O0):
<modificar_bien_monto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2c0,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
lea    0xe94(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xe93(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xe8d(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xe87(%rip),%rax
mov    %rax,-0x40(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <mysql_init@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x40(%rbp),%r8
xor    %r9d,%r9d
xor    %eax,%eax
movq   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1040 <mysql_real_connect@plt>
lea    0xe4d(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xe5b(%rip),%rax
mov    %rax,-0x50(%rbp)
lea    -0x2b0(%rbp),%rdi
mov    -0x48(%rbp),%rdx
movss  -0x8(%rbp),%xmm0
mov    -0x50(%rbp),%rcx
movss  -0x4(%rbp),%xmm1
lea    0xe44(%rip),%rsi
call   1070 <sprintf@plt>
mov    -0x10(%rbp),%rdi
lea    -0x2b0(%rbp),%rsi
call   1030 <mysql_query@plt>
mov    -0x10(%rbp),%rdi
call   1050 <mysql_close@plt>
add    $0x2c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modificar_bien_monto>:
push   %r14
push   %rbx
sub    $0x268,%rsp
movss  %xmm1,0x8(%rsp)
movss  %xmm0,0xc(%rsp)
xor    %edi,%edi
call   1060 <mysql_init@plt>
mov    %rax,%rbx
lea    0xe89(%rip),%rsi
lea    0xe8c(%rip),%rdx
lea    0xe8a(%rip),%rcx
lea    0xe88(%rip),%r8
mov    %rax,%rdi
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1040 <mysql_real_connect@plt>
add    $0x10,%rsp
lea    0xea0(%rip),%rsi
lea    0xe73(%rip),%rdx
lea    0xe85(%rip),%rcx
lea    0x10(%rsp),%r14
mov    %r14,%rdi
movss  0x8(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
call   1070 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <mysql_query@plt>
mov    %rbx,%rdi
call   1050 <mysql_close@plt>
add    $0x268,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [10 x i8] c"localhost\00"
@.str.1 = [5 x i8] c"root\00"
@.str.2 = [5 x i8] c"1234\00"
@.str.3 = [12 x i8] c"casaempenio\00"
@.str.4 = [25 x i8] c"update bienes set monto=\00"
@.str.5 = [13 x i8] c"where monto=\00"
@.str.6 = [13 x i8] c"%s %f %s %f;\00"
define void @modificar_bien_monto(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca [600 x i8]
store float %0, float* %3
store float %1, float* %4
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %8
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %9
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %10
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8** %11
%15 = call i32* @mysql_init(i32* null)
store i32* %15, i32** %5
%16 = load i32*, i32** %5
%17 = load i8*, i8** %8
%18 = load i8*, i8** %9
%19 = load i8*, i8** %10
%20 = load i8*, i8** %11
%21 = call i32 @mysql_real_connect(i32* %16, i8* %17, i8* %18, i8* %19, i8* %20, i32 0, i32* null, i32 0)
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i8** %12
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8** %13
%22 = getelementptr inbounds [600 x i8], [600 x i8]* %14, i64 0, i64 0
%23 = load i8*, i8** %12
%24 = load float, float* %4
%25 = load i8*, i8** %13
%26 = load float, float* %3
%27 = call i32 @sprintf(i8* %22, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* %23, float %24, i8* %25, float %26)
%28 = load i32*, i32** %5
%29 = getelementptr inbounds [600 x i8], [600 x i8]* %14, i64 0, i64 0
%30 = call i32 @mysql_query(i32* %28, i8* %29)
%31 = load i32*, i32** %5
%32 = call i32 @mysql_close(i32* %31)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"localhost\00"
@.str.1 = [5 x i8] c"root\00"
@.str.2 = [5 x i8] c"1234\00"
@.str.3 = [12 x i8] c"casaempenio\00"
@.str.4 = [25 x i8] c"update bienes set monto=\00"
@.str.5 = [13 x i8] c"where monto=\00"
@.str.6 = [13 x i8] c"%s %f %s %f;\00"
define void @modificar_bien_monto(float %0, float %1) {
%3 = alloca [600 x i8]
%4 = tail call i32* @mysql_init(i32* null)
%5 = tail call i32 @mysql_real_connect(i32* %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 0, i32* null, i32 0)
%6 = getelementptr inbounds [600 x i8], [600 x i8]* %3, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), float %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), float %0)
%8 = call i32 @mysql_query(i32* %4, i8* %6)
%9 = call i32 @mysql_close(i32* %4)
ret void
}