#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 *, float, double, ...);
int main(void) {
  float n1 = 3.0;
  double n2 = 3.0;
  long n3 = 2000000000;
  long n4 = 1234567890;
  printf("%.1e %.1e %.1e %.1e\n", n1, n2, n3, n4);
  printf("%ld %ld\n", n3, n4);
  printf("%ld %ld %ld %ld\n", n1, n2, n3, n4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xee1(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movsd  0xecc(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movq   $0x77359400,-0x18(%rbp)
77
movq   $0x499602d2,-0x20(%rbp)
49
movss  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    0xeaa(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
cvtsi2ssq -0x18(%rbp),%xmm0
cvtsi2sdq -0x20(%rbp),%xmm1
lea    0xead(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    0xe85(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf00(%rip),%rdi
movss  0xee0(%rip),%xmm0
movsd  0xee0(%rip),%xmm1
mov    $0x77359400,%esi
mov    $0x499602d2,%edx
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
movss  0xebc(%rip),%xmm0
movsd  0xec0(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
mov    $0x77359400,%esi
mov    $0x499602d2,%edx
movss  0xe90(%rip),%xmm0
movsd  0xe90(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"%.1e %.1e %.1e %.1e\0A\00"
@.str.1 = [9 x i8] c"%ld %ld\0A\00"
@.str.2 = [17 x i8] c"%ld %ld %ld %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca double
%4 = alloca i64
%5 = alloca i64
store i32 0, i32* %1
store float 3.000000e+00, float* %2
store double 3.000000e+00, double* %3
store i64 2000000000, i64* %4
store i64 1234567890, i64* %5
%6 = load float, float* %2
%7 = load double, double* %3
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = call i32 (i8*, float, double, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), float %6, double %7, i64 %8, i64 %9)
%11 = load i64, i64* %4
%12 = sitofp i64 %11 to float
%13 = load i64, i64* %5
%14 = sitofp i64 %13 to double
%15 = call i32 (i8*, float, double, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), float %12, double %14)
%16 = load float, float* %2
%17 = load double, double* %3
%18 = load i64, i64* %4
%19 = load i64, i64* %5
%20 = call i32 (i8*, float, double, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), float %16, double %17, i64 %18, i64 %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"%.1e %.1e %.1e %.1e\0A\00"
@.str.1 = [9 x i8] c"%ld %ld\0A\00"
@.str.2 = [17 x i8] c"%ld %ld %ld %ld\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, float, double, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), float 3.000000e+00, double 3.000000e+00, i64 2000000000, i64 1234567890)
%2 = tail call i32 (i8*, float, double, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), float 2.000000e+09, double 0x41D26580B4800000)
%3 = tail call i32 (i8*, float, double, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), float 3.000000e+00, double 3.000000e+00, i64 2000000000, i64 1234567890)
ret i32 0
}