#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 *, int, float, unsigned int);
int float_test(int n, float f1, float f2, float f3, float f4) {
  unsigned int ui;
  ui = *((unsigned int *)(&f1));
  printf("%d: %8.8e %X\n", n, f1, ui);
  ui = *((unsigned int *)(&f2));
  printf("%d: %8.8e %X\n", n, f2, ui);
  ui = *((unsigned int *)(&f3));
  printf("%d: %8.8e %X\n", n, f3, ui);
  ui = *((unsigned int *)(&f4));
  printf("%d: %8.8e %X\n", n, f4, ui);
  return -1;
}


x86 assembly (clang, -O0):
<float_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  %xmm3,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%esi
movss  -0x8(%rbp),%xmm0
mov    -0x18(%rbp),%edx
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%esi
movss  -0xc(%rbp),%xmm0
mov    -0x18(%rbp),%edx
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%esi
movss  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%edx
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%esi
movss  -0x14(%rbp),%xmm0
mov    -0x18(%rbp),%edx
lea    0xe62(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_test>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movss  %xmm3,0x14(%rsp)
movss  %xmm2,0x10(%rsp)
movss  %xmm1,0xc(%rsp)
mov    %edi,%ebx
movd   %xmm0,%edx
lea    0xeca(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
movd   0xc(%rsp),%xmm0
movd   %xmm0,%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
movd   0x10(%rsp),%xmm0
movd   %xmm0,%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
movd   0x14(%rsp),%xmm0
movd   %xmm0,%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    $0xffffffff,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%d: %8.8e %X\0A\00"
define i32 @float_test(i32 %0, float %1, float %2, float %3, float %4) {
%6 = alloca i32
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca i32
store i32 %0, i32* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%12 = bitcast float* %7 to i32*
%13 = load i32, i32* %12
store i32 %13, i32* %11
%14 = load i32, i32* %6
%15 = load float, float* %7
%16 = load i32, i32* %11
%17 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %14, float %15, i32 %16)
%18 = bitcast float* %8 to i32*
%19 = load i32, i32* %18
store i32 %19, i32* %11
%20 = load i32, i32* %6
%21 = load float, float* %8
%22 = load i32, i32* %11
%23 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %20, float %21, i32 %22)
%24 = bitcast float* %9 to i32*
%25 = load i32, i32* %24
store i32 %25, i32* %11
%26 = load i32, i32* %6
%27 = load float, float* %9
%28 = load i32, i32* %11
%29 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %26, float %27, i32 %28)
%30 = bitcast float* %10 to i32*
%31 = load i32, i32* %30
store i32 %31, i32* %11
%32 = load i32, i32* %6
%33 = load float, float* %10
%34 = load i32, i32* %11
%35 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %32, float %33, i32 %34)
ret i32 -1
}

LLVM IR (-O2):
@.str = [14 x i8] c"%d: %8.8e %X\0A\00"
define i32 @float_test(i32 %0, float %1, float %2, float %3, float %4) {
%6 = bitcast float %1 to i32
%7 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0, float %1, i32 %6)
%8 = bitcast float %2 to i32
%9 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0, float %2, i32 %8)
%10 = bitcast float %3 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0, float %3, i32 %10)
%12 = bitcast float %4 to i32
%13 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0, float %4, i32 %12)
ret i32 -1
}