#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 */
unsigned int f2u(float);
int float_absval(unsigned int);
int /*<<< orphan*/ printf(char *, float, unsigned int, double);
double u2f(int);
int main(void) {
  float f = -0.0;
  unsigned uf = f2u(f);
  printf("%f(0x%X): %f\n", f, uf, u2f(float_absval(uf)));
  f = 0.0;
  uf = f2u(f);
  printf("%f(0x%X): %f\n", f, uf, u2f(float_absval(uf)));
  f = 1.0;
  uf = f2u(f);
  printf("%f(0x%X): %f\n", f, uf, u2f(float_absval(uf)));
  f = -1.0;
  uf = f2u(f);
  printf("%f(0x%X): %f\n", f, uf, u2f(float_absval(uf)));
  f = u2f(0x7F800000);
  uf = f2u(f);
  printf("%f(0x%X): %f\n", f, uf, u2f(float_absval(uf)));
  f = u2f(0xFF800000);
  uf = f2u(f);
  printf("%f(0x%X): %f\n", f, uf, u2f(float_absval(uf)));
  f = u2f(0x7F800001);
  uf = f2u(f);
  printf("%f(0x%X): %f\n", f, uf, u2f(float_absval(uf)));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xeb1(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1060 <f2u@plt>
mov    %eax,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x40(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <float_absval@plt>
mov    %eax,%edi
call   1040 <u2f@plt>
mov    -0x44(%rbp),%esi
movaps %xmm0,%xmm1
movss  -0x40(%rbp),%xmm0
lea    0xe72(%rip),%rdi
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1060 <f2u@plt>
mov    %eax,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <float_absval@plt>
mov    %eax,%edi
call   1040 <u2f@plt>
mov    -0x3c(%rbp),%esi
movaps %xmm0,%xmm1
movss  -0x38(%rbp),%xmm0
lea    0xe27(%rip),%rdi
call   1030 <printf@plt>
movss  0xe12(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1060 <f2u@plt>
mov    %eax,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <float_absval@plt>
mov    %eax,%edi
call   1040 <u2f@plt>
mov    -0x34(%rbp),%esi
movaps %xmm0,%xmm1
movss  -0x30(%rbp),%xmm0
lea    0xdd7(%rip),%rdi
call   1030 <printf@plt>
movss  0xdbe(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1060 <f2u@plt>
mov    %eax,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <float_absval@plt>
mov    %eax,%edi
call   1040 <u2f@plt>
mov    -0x2c(%rbp),%esi
movaps %xmm0,%xmm1
movss  -0x28(%rbp),%xmm0
lea    0xd87(%rip),%rdi
call   1030 <printf@plt>
mov    $0x7f800000,%edi
call   1040 <u2f@plt>
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1060 <f2u@plt>
mov    %eax,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <float_absval@plt>
mov    %eax,%edi
call   1040 <u2f@plt>
mov    -0x24(%rbp),%esi
movaps %xmm0,%xmm1
movss  -0x20(%rbp),%xmm0
lea    0xd31(%rip),%rdi
call   1030 <printf@plt>
mov    $0xff800000,%edi
call   1040 <u2f@plt>
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1060 <f2u@plt>
mov    %eax,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <float_absval@plt>
mov    %eax,%edi
call   1040 <u2f@plt>
mov    -0x1c(%rbp),%esi
movaps %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
lea    0xcdb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x7f800001,%edi
call   1040 <u2f@plt>
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1060 <f2u@plt>
mov    %eax,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <float_absval@plt>
mov    %eax,%edi
call   1040 <u2f@plt>
mov    -0x14(%rbp),%esi
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
lea    0xc85(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
movss  0xeb5(%rip),%xmm0
call   1060 <f2u@plt>
mov    %eax,%ebp
mov    %eax,%edi
call   1050 <float_absval@plt>
mov    %eax,%edi
call   1040 <u2f@plt>
movaps %xmm0,%xmm1
lea    0xea2(%rip),%rbx
mov    %rbx,%rdi
movss  0xe8b(%rip),%xmm0
mov    %ebp,%esi
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
call   1060 <f2u@plt>
mov    %eax,%ebp
mov    %eax,%edi
call   1050 <float_absval@plt>
mov    %eax,%edi
call   1040 <u2f@plt>
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
movss  0xe58(%rip),%xmm0
call   1060 <f2u@plt>
mov    %eax,%ebp
mov    %eax,%edi
call   1050 <float_absval@plt>
mov    %eax,%edi
call   1040 <u2f@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xe35(%rip),%xmm0
mov    %ebp,%esi
call   1030 <printf@plt>
movss  0xe2a(%rip),%xmm0
call   1060 <f2u@plt>
mov    %eax,%ebp
mov    %eax,%edi
call   1050 <float_absval@plt>
mov    %eax,%edi
call   1040 <u2f@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xe07(%rip),%xmm0
mov    %ebp,%esi
call   1030 <printf@plt>
mov    $0x7f800000,%edi
call   1040 <u2f@plt>
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
call   1060 <f2u@plt>
mov    %eax,%ebp
mov    %eax,%edi
call   1050 <float_absval@plt>
mov    %eax,%edi
call   1040 <u2f@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0x4(%rsp),%xmm0
mov    %ebp,%esi
call   1030 <printf@plt>
mov    $0xff800000,%edi
call   1040 <u2f@plt>
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
call   1060 <f2u@plt>
mov    %eax,%ebp
mov    %eax,%edi
call   1050 <float_absval@plt>
mov    %eax,%edi
call   1040 <u2f@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0x4(%rsp),%xmm0
mov    %ebp,%esi
call   1030 <printf@plt>
mov    $0x7f800001,%edi
call   1040 <u2f@plt>
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
call   1060 <f2u@plt>
mov    %eax,%ebp
mov    %eax,%edi
call   1050 <float_absval@plt>
mov    %eax,%edi
call   1040 <u2f@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0x4(%rsp),%xmm0
mov    %ebp,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%f(0x%X): %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i32
store i32 0, i32* %1
store float -0.000000e+00, float* %2
%4 = load float, float* %2
%5 = call i32 @f2u(float %4)
store i32 %5, i32* %3
%6 = load float, float* %2
%7 = load i32, i32* %3
%8 = load i32, i32* %3
%9 = call i32 @float_absval(i32 %8)
%10 = call double @u2f(i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %6, i32 %7, double %10)
store float 0.000000e+00, float* %2
%12 = load float, float* %2
%13 = call i32 @f2u(float %12)
store i32 %13, i32* %3
%14 = load float, float* %2
%15 = load i32, i32* %3
%16 = load i32, i32* %3
%17 = call i32 @float_absval(i32 %16)
%18 = call double @u2f(i32 %17)
%19 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %14, i32 %15, double %18)
store float 1.000000e+00, float* %2
%20 = load float, float* %2
%21 = call i32 @f2u(float %20)
store i32 %21, i32* %3
%22 = load float, float* %2
%23 = load i32, i32* %3
%24 = load i32, i32* %3
%25 = call i32 @float_absval(i32 %24)
%26 = call double @u2f(i32 %25)
%27 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %22, i32 %23, double %26)
store float -1.000000e+00, float* %2
%28 = load float, float* %2
%29 = call i32 @f2u(float %28)
store i32 %29, i32* %3
%30 = load float, float* %2
%31 = load i32, i32* %3
%32 = load i32, i32* %3
%33 = call i32 @float_absval(i32 %32)
%34 = call double @u2f(i32 %33)
%35 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %30, i32 %31, double %34)
%36 = call double @u2f(i32 2139095040)
%37 = fptrunc double %36 to float
store float %37, float* %2
%38 = load float, float* %2
%39 = call i32 @f2u(float %38)
store i32 %39, i32* %3
%40 = load float, float* %2
%41 = load i32, i32* %3
%42 = load i32, i32* %3
%43 = call i32 @float_absval(i32 %42)
%44 = call double @u2f(i32 %43)
%45 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %40, i32 %41, double %44)
%46 = call double @u2f(i32 -8388608)
%47 = fptrunc double %46 to float
store float %47, float* %2
%48 = load float, float* %2
%49 = call i32 @f2u(float %48)
store i32 %49, i32* %3
%50 = load float, float* %2
%51 = load i32, i32* %3
%52 = load i32, i32* %3
%53 = call i32 @float_absval(i32 %52)
%54 = call double @u2f(i32 %53)
%55 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %50, i32 %51, double %54)
%56 = call double @u2f(i32 2139095041)
%57 = fptrunc double %56 to float
store float %57, float* %2
%58 = load float, float* %2
%59 = call i32 @f2u(float %58)
store i32 %59, i32* %3
%60 = load float, float* %2
%61 = load i32, i32* %3
%62 = load i32, i32* %3
%63 = call i32 @float_absval(i32 %62)
%64 = call double @u2f(i32 %63)
%65 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %60, i32 %61, double %64)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"%f(0x%X): %f\0A\00"
define i32 @main() {
%1 = tail call i32 @f2u(float -0.000000e+00)
%2 = tail call i32 @float_absval(i32 %1)
%3 = tail call double @u2f(i32 %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float -0.000000e+00, i32 %1, double %3)
%5 = tail call i32 @f2u(float 0.000000e+00)
%6 = tail call i32 @float_absval(i32 %5)
%7 = tail call double @u2f(i32 %6)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float 0.000000e+00, i32 %5, double %7)
%9 = tail call i32 @f2u(float 1.000000e+00)
%10 = tail call i32 @float_absval(i32 %9)
%11 = tail call double @u2f(i32 %10)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float 1.000000e+00, i32 %9, double %11)
%13 = tail call i32 @f2u(float -1.000000e+00)
%14 = tail call i32 @float_absval(i32 %13)
%15 = tail call double @u2f(i32 %14)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float -1.000000e+00, i32 %13, double %15)
%17 = tail call double @u2f(i32 2139095040)
%18 = fptrunc double %17 to float
%19 = tail call i32 @f2u(float %18)
%20 = tail call i32 @float_absval(i32 %19)
%21 = tail call double @u2f(i32 %20)
%22 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %18, i32 %19, double %21)
%23 = tail call double @u2f(i32 -8388608)
%24 = fptrunc double %23 to float
%25 = tail call i32 @f2u(float %24)
%26 = tail call i32 @float_absval(i32 %25)
%27 = tail call double @u2f(i32 %26)
%28 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %24, i32 %25, double %27)
%29 = tail call double @u2f(i32 2139095041)
%30 = fptrunc double %29 to float
%31 = tail call i32 @f2u(float %30)
%32 = tail call i32 @float_absval(i32 %31)
%33 = tail call double @u2f(i32 %32)
%34 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %30, i32 %31, double %33)
ret i32 0
}