#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 *, ...);
void format_float_types() {
  float precise = 60.0f;
  float irrat_1 = 3.14159265358979323846f;
  float irrat_2 = 0.0000119999f;
  printf("-------------------------------\n");
  printf("regular precise   %f \n", precise);
  printf("regular irrat_1   %f \n", irrat_1);
  printf("regular irrat_2   %f \n", irrat_2);
  printf("-------------------------------\n");
  printf("rounded precise   %5.3f \n", precise);
  printf("rounded irrat_1   %5.3f \n", irrat_1);
  printf("rounded irrat_2   %5.3f \n", irrat_2);
  printf("-------------------------------\n");
  printf("scienti precise   %e \n", precise);
  printf("scienti irrat_1   %e \n", irrat_1);
  printf("scienti irrat_2   %e \n", irrat_2);
  printf("-------------------------------\n");
  printf("short   precise   %g \n", precise);
  printf("short   irrat_1   %g \n", irrat_1);
  printf("short   irrat_2   %g \n", irrat_2);
  printf("-------------------------------\n");
  printf("short5  precise   %.5g \n", precise);
  printf("short5  irrat_1   %.5g \n", irrat_1);
  printf("short5  irrat_2   %.5g \n", irrat_2);
  printf("-------------------------------\n");
  void printfloat(const char *, float);
  printfloat("custom  precise   ", precise);
  printfloat("custom  irrat_1   ", irrat_1);
  printfloat("custom  irrat_2   ", irrat_2);
}


x86 assembly (clang, -O0):
<format_float_types>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xed8(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xec7(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeb6(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xec0(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xec0(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xec0(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb2(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb5(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb8(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe10(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xead(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xead(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xead(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe9f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe9f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe9f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xd6a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe91(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe93(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe95(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xd17(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movss  -0x4(%rbp),%xmm0
lea    0xe8d(%rip),%rdi
call   1030 <printfloat@plt>
movss  -0x8(%rbp),%xmm0
lea    0xe8f(%rip),%rdi
call   1030 <printfloat@plt>
movss  -0xc(%rbp),%xmm0
lea    0xe91(%rip),%rdi
call   1030 <printfloat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<format_float_types>:
push   %rbx
lea    0x108d(%rip),%rbx
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xedd(%rip),%rdi
movsd  0xeb1(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xede(%rip),%rdi
movsd  0xea3(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xedf(%rip),%rdi
movsd  0xe95(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xed8(%rip),%rdi
movsd  0xe67(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xedc(%rip),%rdi
movsd  0xe59(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xee0(%rip),%rdi
movsd  0xe4b(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xedc(%rip),%rdi
movsd  0xe1d(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xedd(%rip),%rdi
movsd  0xe0f(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xede(%rip),%rdi
movsd  0xe01(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xed7(%rip),%rdi
movsd  0xdd3(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xed8(%rip),%rdi
movsd  0xdc5(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xed9(%rip),%rdi
movsd  0xdb7(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xed2(%rip),%rdi
movsd  0xd89(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xed5(%rip),%rdi
movsd  0xd7b(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xed8(%rip),%rdi
movsd  0xd6d(%rip),%xmm0
mov    $0x1,%al
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xed3(%rip),%rdi
movss  0xd57(%rip),%xmm0
call   1030 <printfloat@plt>
lea    0xed2(%rip),%rdi
movss  0xd47(%rip),%xmm0
call   1030 <printfloat@plt>
lea    0xed1(%rip),%rdi
movss  0xd37(%rip),%xmm0
pop    %rbx
jmp    1030 <printfloat@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"-------------------------------\0A\00"
@.str.1 = [23 x i8] c"regular precise %f \0A\00"
@.str.2 = [23 x i8] c"regular irrat_1 %f \0A\00"
@.str.3 = [23 x i8] c"regular irrat_2 %f \0A\00"
@.str.4 = [26 x i8] c"rounded precise %5.3f \0A\00"
@.str.5 = [26 x i8] c"rounded irrat_1 %5.3f \0A\00"
@.str.6 = [26 x i8] c"rounded irrat_2 %5.3f \0A\00"
@.str.7 = [23 x i8] c"scienti precise %e \0A\00"
@.str.8 = [23 x i8] c"scienti irrat_1 %e \0A\00"
@.str.9 = [23 x i8] c"scienti irrat_2 %e \0A\00"
@.str.10 = [23 x i8] c"short precise %g \0A\00"
@.str.11 = [23 x i8] c"short irrat_1 %g \0A\00"
@.str.12 = [23 x i8] c"short irrat_2 %g \0A\00"
@.str.13 = [25 x i8] c"short5 precise %.5g \0A\00"
@.str.14 = [25 x i8] c"short5 irrat_1 %.5g \0A\00"
@.str.15 = [25 x i8] c"short5 irrat_2 %.5g \0A\00"
@.str.16 = [19 x i8] c"custom precise \00"
@.str.17 = [19 x i8] c"custom irrat_1 \00"
@.str.18 = [19 x i8] c"custom irrat_2 \00"
define void @format_float_types() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
store float 6.000000e+01, float* %1
store float 0x400921FB60000000, float* %2
store float 0x3EE92A65C0000000, float* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%5 = load float, float* %1
%6 = fpext float %5 to double
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), double %6)
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %9)
%11 = load float, float* %3
%12 = fpext float %11 to double
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), double %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%15 = load float, float* %1
%16 = fpext float %15 to double
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), double %16)
%18 = load float, float* %2
%19 = fpext float %18 to double
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), double %19)
%21 = load float, float* %3
%22 = fpext float %21 to double
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), double %22)
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%25 = load float, float* %1
%26 = fpext float %25 to double
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), double %26)
%28 = load float, float* %2
%29 = fpext float %28 to double
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), double %29)
%31 = load float, float* %3
%32 = fpext float %31 to double
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), double %32)
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%35 = load float, float* %1
%36 = fpext float %35 to double
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), double %36)
%38 = load float, float* %2
%39 = fpext float %38 to double
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0), double %39)
%41 = load float, float* %3
%42 = fpext float %41 to double
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), double %42)
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%45 = load float, float* %1
%46 = fpext float %45 to double
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), double %46)
%48 = load float, float* %2
%49 = fpext float %48 to double
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0), double %49)
%51 = load float, float* %3
%52 = fpext float %51 to double
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0), double %52)
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%55 = load float, float* %1
%56 = load float, float* %2
%57 = load float, float* %3
ret void
}

LLVM IR (-O2):
@.str.1 = [23 x i8] c"regular precise %f \0A\00"
@.str.2 = [23 x i8] c"regular irrat_1 %f \0A\00"
@.str.3 = [23 x i8] c"regular irrat_2 %f \0A\00"
@.str.4 = [26 x i8] c"rounded precise %5.3f \0A\00"
@.str.5 = [26 x i8] c"rounded irrat_1 %5.3f \0A\00"
@.str.6 = [26 x i8] c"rounded irrat_2 %5.3f \0A\00"
@.str.7 = [23 x i8] c"scienti precise %e \0A\00"
@.str.8 = [23 x i8] c"scienti irrat_1 %e \0A\00"
@.str.9 = [23 x i8] c"scienti irrat_2 %e \0A\00"
@.str.10 = [23 x i8] c"short precise %g \0A\00"
@.str.11 = [23 x i8] c"short irrat_1 %g \0A\00"
@.str.12 = [23 x i8] c"short irrat_2 %g \0A\00"
@.str.13 = [25 x i8] c"short5 precise %.5g \0A\00"
@.str.14 = [25 x i8] c"short5 irrat_1 %.5g \0A\00"
@.str.15 = [25 x i8] c"short5 irrat_2 %.5g \0A\00"
@.str.16 = [19 x i8] c"custom precise \00"
@.str.17 = [19 x i8] c"custom irrat_1 \00"
@.str.18 = [19 x i8] c"custom irrat_2 \00"
@str.23 = [32 x i8] c"-------------------------------\00"
define void @format_float_types() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.23, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), double 6.000000e+01)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double 0x400921FB60000000)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), double 0x3EE92A65C0000000)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.23, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), double 6.000000e+01)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), double 0x400921FB60000000)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), double 0x3EE92A65C0000000)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.23, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), double 6.000000e+01)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), double 0x400921FB60000000)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), double 0x3EE92A65C0000000)
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.23, i64 0, i64 0))
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), double 6.000000e+01)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0), double 0x400921FB60000000)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), double 0x3EE92A65C0000000)
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.23, i64 0, i64 0))
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), double 6.000000e+01)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0), double 0x400921FB60000000)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.15, i64 0, i64 0), double 0x3EE92A65C0000000)
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.23, i64 0, i64 0))
tail call void @printfloat(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.16, i64 0, i64 0), float 6.000000e+01)
tail call void @printfloat(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0), float 0x400921FB60000000)
tail call void @printfloat(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0), float 0x3EE92A65C0000000)
ret void
}