#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 *, double, ...);
int main(void) {
  double d = 1.2;
  printf("%f\n", 1.2);
  printf("%f\n", 1.2);
  printf("%f %f\n", 1.2, 3.4);
  printf("%f %d %f\n", 1.2, 3, 4.5);
  printf("%f %d %d %f\n", 1.2, 3, 4, 5.6);
  printf("%f %d %f %d %f %d %f\n", 1.2, 3, 4.5, 6, 7.8, 9, 10.11);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xf0d(%rip),%rdi
movsd  0xec5(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
movsd  0xeaf(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
movsd  0xe99(%rip),%xmm0
movsd  0xeb9(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
movsd  0xe7b(%rip),%xmm0
mov    $0x3,%esi
movsd  0xe76(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xe97(%rip),%rdi
movsd  0xe58(%rip),%xmm0
mov    $0x3,%esi
mov    $0x4,%edx
movsd  0xe66(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xe7c(%rip),%rdi
movsd  0xe30(%rip),%xmm0
mov    $0x3,%esi
movsd  0xe2b(%rip),%xmm1
mov    $0x6,%edx
movsd  0xe26(%rip),%xmm2
mov    $0x9,%ecx
movsd  0xe21(%rip),%xmm3
mov    $0x4,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf28(%rip),%rbx
movsd  0xee0(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    %rbx,%rdi
movsd  0xecb(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
movsd  0xebd(%rip),%xmm1
movsd  0xead(%rip),%xmm0
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
movsd  0xea7(%rip),%xmm1
movsd  0xe8f(%rip),%xmm0
mov    $0x3,%esi
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
movsd  0xe8c(%rip),%xmm1
movsd  0xe6c(%rip),%xmm0
mov    $0x3,%esi
mov    $0x4,%edx
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xe98(%rip),%rdi
movsd  0xe6c(%rip),%xmm2
movsd  0xe6c(%rip),%xmm3
movsd  0xe3c(%rip),%xmm0
mov    $0x3,%esi
movsd  0xe3f(%rip),%xmm1
mov    $0x6,%edx
mov    $0x9,%ecx
mov    $0x4,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
@.str.1 = [7 x i8] c"%f %f\0A\00"
@.str.2 = [10 x i8] c"%f %d %f\0A\00"
@.str.3 = [13 x i8] c"%f %d %d %f\0A\00"
@.str.4 = [22 x i8] c"%f %d %f %d %f %d %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
store double 1.200000e+00, double* %2
%3 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 1.200000e+00)
%4 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 1.200000e+00)
%5 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double 1.200000e+00, double 3.400000e+00)
%6 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double 1.200000e+00, i32 3, double 4.500000e+00)
%7 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 1.200000e+00, i32 3, i32 4, double 5.600000e+00)
%8 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), double 1.200000e+00, i32 3, double 4.500000e+00, i32 6, double 0x401F333333333333, i32 9, double 1.011000e+01)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
@.str.1 = [7 x i8] c"%f %f\0A\00"
@.str.2 = [10 x i8] c"%f %d %f\0A\00"
@.str.3 = [13 x i8] c"%f %d %d %f\0A\00"
@.str.4 = [22 x i8] c"%f %d %f %d %f %d %f\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 1.200000e+00)
%2 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double 1.200000e+00)
%3 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double 1.200000e+00, double 3.400000e+00)
%4 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double 1.200000e+00, i32 3, double 4.500000e+00)
%5 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double 1.200000e+00, i32 3, i32 4, double 5.600000e+00)
%6 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), double 1.200000e+00, i32 3, double 4.500000e+00, i32 6, double 0x401F333333333333, i32 9, double 1.011000e+01)
ret i32 0
}