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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%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>
lea    -0xe0(%rbp),%rdi
mov    $0xc8,%esi
lea    0xea9(%rip),%rdx
mov    $0x1,%ecx
movsd  0xe84(%rip),%xmm0
movsd  0xe84(%rip),%xmm1
movsd  0xe84(%rip),%xmm2
call   1040 <snprintf@plt>
lea    -0xe0(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xe0,%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    0xe93(%rip),%rdx
mov    %rsp,%rbx
movsd  0xe70(%rip),%xmm0
movsd  0xe70(%rip),%xmm1
movsd  0xe70(%rip),%xmm2
mov    %rbx,%rdi
mov    $0xc8,%esi
mov    $0x1,%ecx
call   1040 <snprintf@plt>
lea    0xe9b(%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]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [200 x i8]* %6 to i8*
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %6, i64 0, i64 0
%9 = call i32 @snprintf(i8* %8, i32 200, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i32 1, double 2.000000e+01, double 1.000000e+02, double 6.000000e+01)
%10 = getelementptr inbounds [200 x i8], [200 x i8]* %6, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %10)
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, double 2.000000e+01, double 1.000000e+02, double 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
}