#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*/ printf(char *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int, float, float, float);
int main(int argc, char const *argv[]) {
  char buff[200] = "";
  float a = 24.0, b = 100.0, c = 60.0;
  snprintf(buff, 200,
           "GET /save?id=%d&temp=%.4f&wind=%.4f&humid=%.4f HTTP/1.0\r\n\r\n", 1,
           a, b, c);
  printf("--%s--\n", buff);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xe0(%rbp),%rdi
xor    %esi,%esi
mov    $0xc8,%edx
call   1050 <memset@plt>
movss  0xea4(%rip),%xmm0
movss  %xmm0,-0xe4(%rbp)
ff
movss  0xe90(%rip),%xmm0
movss  %xmm0,-0xe8(%rbp)
ff
movss  0xe7c(%rip),%xmm0
movss  %xmm0,-0xec(%rbp)
ff
lea    -0xe0(%rbp),%rdi
movss  -0xe4(%rbp),%xmm0
ff
movss  -0xe8(%rbp),%xmm1
ff
movss  -0xec(%rbp),%xmm2
ff
mov    $0xc8,%esi
lea    0xe55(%rip),%rdx
mov    $0x1,%ecx
call   1040 <snprintf@plt>
lea    -0xe0(%rbp),%rsi
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xd0,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movq   $0x0,0xc0(%rsp)
lea    0xe87(%rip),%rdx
mov    %rsp,%rbx
movss  0xe70(%rip),%xmm0
movss  0xe6c(%rip),%xmm1
movss  0xe68(%rip),%xmm2
mov    %rbx,%rdi
mov    $0xc8,%esi
mov    $0x1,%ecx
call   1040 <snprintf@plt>
lea    0xe8f(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [60 x i8] c"GET /save?id=%d&temp=%.4f&wind=%.4f&humid=%.4f HTTP/1.0\0D\0A\0D\0A\00"
@.str.1 = [8 x i8] c"--%s--\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [200 x i8]
%7 = alloca float
%8 = alloca float
%9 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = bitcast [200 x i8]* %6 to i8*
store float 2.400000e+01, float* %7
store float 1.000000e+02, float* %8
store float 6.000000e+01, float* %9
%11 = getelementptr inbounds [200 x i8], [200 x i8]* %6, i64 0, i64 0
%12 = load float, float* %7
%13 = load float, float* %8
%14 = load float, float* %9
%15 = call i32 @snprintf(i8* %11, i32 200, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i32 1, float %12, float %13, float %14)
%16 = getelementptr inbounds [200 x i8], [200 x i8]* %6, i64 0, i64 0
%17 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [60 x i8] c"GET /save?id=%d&temp=%.4f&wind=%.4f&humid=%.4f HTTP/1.0\0D\0A\0D\0A\00"
@.str.1 = [8 x i8] c"--%s--\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [200 x i8]
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 200, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i32 1, float 2.400000e+01, float 1.000000e+02, float 6.000000e+01)
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}