#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 *, long double, long double);
int main(void) {
  float aboat = 32000.0;
  double abet = 2.14e9;
  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);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x46fa0000,-0x8(%rbp)
movabs $0x41dfe373c0000000,%rax
e3 df 41
mov    %rax,-0x10(%rbp)
fldl   0xec6(%rip)
fstpt  -0x20(%rbp)
flds   -0x8(%rbp)
mov    %rsp,%rax
fld    %st(0)
fstpt  0x10(%rax)
fstpt  (%rax)
lea    0xeb7(%rip),%rdi
mov    %rdi,-0x28(%rbp)
call   1030 <printf@plt>
mov    -0x28(%rbp),%rdi
fldl   -0x10(%rbp)
mov    %rsp,%rax
fld    %st(0)
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <printf@plt>
fldt   -0x20(%rbp)
fld    %st(0)
mov    %rsp,%rax
fxch   %st(1)
fstpt  0x10(%rax)
fstpt  (%rax)
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
flds   0xee5(%rip)
fld    %st(0)
fstpt  0x10(%rsp)
fstpt  (%rsp)
lea    0xee5(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
flds   0xecb(%rip)
fld    %st(0)
fstpt  0x10(%rsp)
fstpt  (%rsp)
mov    %rbx,%rdi
call   1030 <printf@plt>
fldl   0xeb8(%rip)
fld    %st(0)
fstpt  0x10(%rsp)
fstpt  (%rsp)
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [22 x i8] c"%f can be written %e\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), x86_fp80 0xK400DFA00000000000000, x86_fp80 0xK400DFA00000000000000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), x86_fp80 0xK401DFF1B9E0000000000, x86_fp80 0xK401DFF1B9E0000000000)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), x86_fp80 0xK3FF0DF2310A640710800, x86_fp80 0xK3FF0DF2310A640710800)
ret i32 0
}