#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, 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 can be written %a\n", aboat, aboat, aboat);
  printf("%f can be written %e can be written %a\n", abet, abet, abet);
  printf("%Lf can be written %Le can be written %La\n", dip, dip, dip);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%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  0x20(%rax)
fld    %st(0)
fstpt  0x10(%rax)
fstpt  (%rax)
lea    0xeb2(%rip),%rdi
mov    %rdi,-0x28(%rbp)
call   1030 <printf@plt>
mov    -0x28(%rbp),%rdi
fldl   -0x10(%rbp)
mov    %rsp,%rax
fld    %st(0)
fstpt  0x20(%rax)
fld    %st(0)
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <printf@plt>
fldt   -0x20(%rbp)
fld    %st(0)
fld    %st(1)
mov    %rsp,%rax
fxch   %st(2)
fstpt  0x20(%rax)
fxch   %st(1)
fstpt  0x10(%rax)
fstpt  (%rax)
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [40 x i8] c"%f can be written %e can be written %a\0A\00"
@.str.1 = [43 x i8] c"%Lf can be written %Le can be written %La\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 = load float, float* %2
%10 = fpext float %9 to x86_fp80
%11 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), x86_fp80 %6, x86_fp80 %8, x86_fp80 %10)
%12 = load double, double* %3
%13 = fpext double %12 to x86_fp80
%14 = load double, double* %3
%15 = fpext double %14 to x86_fp80
%16 = load double, double* %3
%17 = fpext double %16 to x86_fp80
%18 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), x86_fp80 %13, x86_fp80 %15, x86_fp80 %17)
%19 = load x86_fp80, x86_fp80* %4
%20 = load x86_fp80, x86_fp80* %4
%21 = load x86_fp80, x86_fp80* %4
%22 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), x86_fp80 %19, x86_fp80 %20, x86_fp80 %21)
ret i32 0
}

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