#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, ...);
int main(int argc, char const *argv[]) {
  double abet = 2.14e9;
  float aboat = 32000.0;
  float toobig = 3.4E38 * 100.0f;
  long double dip = 5.32e-5;
  printf("%f can be written %e\n", aboat, aboat);
  printf("%f can be written %e\n", abet, abet);
  printf("%f can be written %e\n", dip, dip);
  printf("%e\n", toobig);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movabs $0x41dfe373c0000000,%rax
e3 df 41
mov    %rax,-0x18(%rbp)
movl   $0x46fa0000,-0x1c(%rbp)
movl   $0x7f800000,-0x20(%rbp)
fldl   0xeb8(%rip)
fstpt  -0x30(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
lea    0xead(%rip),%rdi
mov    %rdi,-0x40(%rbp)
mov    $0x2,%al
mov    %al,-0x35(%rbp)
call   1030 <printf@plt>
mov    -0x40(%rbp),%rdi
mov    -0x35(%rbp),%al
movsd  -0x18(%rbp),%xmm1
cvtsd2ss %xmm1,%xmm0
call   1030 <printf@plt>
fldt   -0x30(%rbp)
fsts   -0x34(%rbp)
movss  -0x34(%rbp),%xmm0
mov    %rsp,%rax
fstpt  (%rax)
lea    0xe73(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x20(%rbp),%xmm0
lea    0xe72(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xf0c(%rip),%rbx
movss  0xedc(%rip),%xmm0
movsd  0xee4(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movss  0xec6(%rip),%xmm0
movsd  0xed2(%rip),%xmm1
mov    %rbx,%rdi
mov    $0x2,%al
call   1030 <printf@plt>
fldl   0xeca(%rip)
fstpt  (%rsp)
movss  0xea7(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
movss  0xe92(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"%f can be written %e\0A\00"
@.str.1 = [4 x i8] c"%e\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca float
%8 = alloca float
%9 = alloca x86_fp80
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 2.140000e+09, double* %6
store float 3.200000e+04, float* %7
store float 0x7FF0000000000000, float* %8
store x86_fp80 0xK3FF0DF2310A640710800, x86_fp80* %9
%10 = load float, float* %7
%11 = load float, float* %7
%12 = fpext float %11 to double
%13 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), float %10, double %12)
%14 = load double, double* %6
%15 = fptrunc double %14 to float
%16 = load double, double* %6
%17 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), float %15, double %16)
%18 = load x86_fp80, x86_fp80* %9
%19 = fptrunc x86_fp80 %18 to float
%20 = load x86_fp80, x86_fp80* %9
%21 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), float %19, x86_fp80 %20)
%22 = load float, float* %8
%23 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"%f can be written %e\0A\00"
@.str.1 = [4 x i8] c"%e\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), float 3.200000e+04, double 3.200000e+04)
%4 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), float 2.140000e+09, double 2.140000e+09)
%5 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), float 0x3F0BE46220000000, x86_fp80 0xK3FF0DF2310A640710800)
%6 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float 0x7FF0000000000000)
ret i32 0
}