#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*/ _exit(int);
int /*<<< orphan*/ dnear(double, double);
int /*<<< orphan*/ fnear(float, float);
int /*<<< orphan*/ ldnear(long double, long double);
double s2d(int);
float s2f(int);
long double s2ld(int);
double u2d(unsigned int);
float u2f(unsigned int);
long double u2ld(unsigned int);
test_integer_to_float() {
  if (u2f(0U) != (float)0U)
    _exit(-1);
  if (!fnear(u2f(~0U), (float)~0U))
    _exit(-2);
  if (!fnear(u2f((~0U) >> 1), (float)((~0U) >> 1)))
    _exit(-3);
  if (u2f(~((~0U) >> 1)) != (float)~((~0U) >> 1))
    _exit(-4);
  if (u2d(0U) != (double)0U)
    _exit(-5);
  if (!dnear(u2d(~0U), (double)~0U))
    _exit(-6);
  if (!dnear(u2d((~0U) >> 1), (double)((~0U) >> 1)))
    _exit(-7);
  if (u2d(~((~0U) >> 1)) != (double)~((~0U) >> 1))
    _exit(-8);
  if (u2ld(0U) != (long double)0U)
    _exit(-9);
  if (!ldnear(u2ld(~0U), (long double)~0U))
    _exit(-10);
  if (!ldnear(u2ld((~0U) >> 1), (long double)((~0U) >> 1)))
    _exit(-11);
  if (u2ld(~((~0U) >> 1)) != (long double)~((~0U) >> 1))
    _exit(-12);
  if (s2f(0) != (float)0)
    _exit(-13);
  if (!fnear(s2f(~0), (float)~0))
    _exit(-14);
  if (!fnear(s2f((int)((~0U) >> 1)), (float)(int)((~0U) >> 1)))
    _exit(-15);
  if (s2f((int)(~((~0U) >> 1))) != (float)(int)~((~0U) >> 1))
    _exit(-16);
  if (s2d(0) != (double)0)
    _exit(-17);
  if (!dnear(s2d(~0), (double)~0))
    _exit(-18);
  if (!dnear(s2d((int)((~0U) >> 1)), (double)(int)((~0U) >> 1)))
    _exit(-19);
  if (s2d((int)~((~0U) >> 1)) != (double)(int)~((~0U) >> 1))
    _exit(-20);
  if (s2ld(0) != (long double)0)
    _exit(-21);
  if (!ldnear(s2ld(~0), (long double)~0))
    _exit(-22);
  if (!ldnear(s2ld((int)((~0U) >> 1)), (long double)(int)((~0U) >> 1)))
    _exit(-23);
  if (s2ld((int)~((~0U) >> 1)) != (long double)(int)~((~0U) >> 1))
    _exit(-24);
}


x86 assembly (clang, -O0):
<test_integer_to_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
xor    %edi,%edi
call   1070 <u2f@plt>
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    11c6 <test_integer_to_float+0x26>
jp     11c6 <test_integer_to_float+0x26>
jmp    11d0 <test_integer_to_float+0x30>
mov    $0xffffffff,%edi
call   1050 <_exit@plt>
mov    $0xffffffff,%edi
call   1070 <u2f@plt>
movss  0xe1e(%rip),%xmm1
call   1040 <fnear@plt>
cmp    $0x0,%eax
jne    11fa <test_integer_to_float+0x5a>
mov    $0xfffffffe,%edi
call   1050 <_exit@plt>
mov    $0x7fffffff,%edi
call   1070 <u2f@plt>
movss  0xdf8(%rip),%xmm1
call   1040 <fnear@plt>
cmp    $0x0,%eax
jne    1224 <test_integer_to_float+0x84>
mov    $0xfffffffd,%edi
call   1050 <_exit@plt>
mov    $0x80000000,%edi
call   1070 <u2f@plt>
movss  0xdce(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    124a <test_integer_to_float+0xaa>
jp     124a <test_integer_to_float+0xaa>
jmp    1254 <test_integer_to_float+0xb4>
mov    $0xfffffffc,%edi
call   1050 <_exit@plt>
xor    %edi,%edi
call   1060 <u2d@plt>
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1273 <test_integer_to_float+0xd3>
jp     1273 <test_integer_to_float+0xd3>
jmp    127d <test_integer_to_float+0xdd>
mov    $0xfffffffb,%edi
call   1050 <_exit@plt>
mov    $0xffffffff,%edi
call   1060 <u2d@plt>
movsd  0xd81(%rip),%xmm1
call   10a0 <dnear@plt>
cmp    $0x0,%eax
jne    12a7 <test_integer_to_float+0x107>
mov    $0xfffffffa,%edi
call   1050 <_exit@plt>
mov    $0x7fffffff,%edi
call   1060 <u2d@plt>
movsd  0xd5f(%rip),%xmm1
call   10a0 <dnear@plt>
cmp    $0x0,%eax
jne    12d1 <test_integer_to_float+0x131>
mov    $0xfffffff9,%edi
call   1050 <_exit@plt>
mov    $0x80000000,%edi
call   1060 <u2d@plt>
movsd  0xd3d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    12f8 <test_integer_to_float+0x158>
jp     12f8 <test_integer_to_float+0x158>
jmp    1302 <test_integer_to_float+0x162>
mov    $0xfffffff8,%edi
call   1050 <_exit@plt>
xor    %edi,%edi
call   1030 <u2ld@plt>
fld    %st(0)
fstp   %st(0)
fldz
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1326 <test_integer_to_float+0x186>
jp     1326 <test_integer_to_float+0x186>
jmp    1330 <test_integer_to_float+0x190>
mov    $0xfffffff7,%edi
call   1050 <_exit@plt>
mov    $0xffffffff,%edi
call   1030 <u2ld@plt>
mov    %rsp,%rax
fldl   0xccd(%rip)
fstpt  0x10(%rax)
fstpt  (%rax)
call   1080 <ldnear@plt>
cmp    $0x0,%eax
jne    1360 <test_integer_to_float+0x1c0>
mov    $0xfffffff6,%edi
call   1050 <_exit@plt>
mov    $0x7fffffff,%edi
call   1030 <u2ld@plt>
mov    %rsp,%rax
fldl   0xca5(%rip)
fstpt  0x10(%rax)
fstpt  (%rax)
call   1080 <ldnear@plt>
cmp    $0x0,%eax
jne    1390 <test_integer_to_float+0x1f0>
mov    $0xfffffff5,%edi
call   1050 <_exit@plt>
mov    $0x80000000,%edi
call   1030 <u2ld@plt>
fld    %st(0)
fstp   %st(0)
flds   0xc60(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    13bb <test_integer_to_float+0x21b>
jp     13bb <test_integer_to_float+0x21b>
jmp    13c5 <test_integer_to_float+0x225>
mov    $0xfffffff4,%edi
call   1050 <_exit@plt>
xor    %edi,%edi
call   1090 <s2f@plt>
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    13e3 <test_integer_to_float+0x243>
jp     13e3 <test_integer_to_float+0x243>
jmp    13ed <test_integer_to_float+0x24d>
mov    $0xfffffff3,%edi
call   1050 <_exit@plt>
mov    $0xffffffff,%edi
call   1090 <s2f@plt>
movss  0xc09(%rip),%xmm1
call   1040 <fnear@plt>
cmp    $0x0,%eax
jne    1417 <test_integer_to_float+0x277>
mov    $0xfffffff2,%edi
call   1050 <_exit@plt>
mov    $0x7fffffff,%edi
call   1090 <s2f@plt>
movss  0xbdb(%rip),%xmm1
call   1040 <fnear@plt>
cmp    $0x0,%eax
jne    1441 <test_integer_to_float+0x2a1>
mov    $0xfffffff1,%edi
call   1050 <_exit@plt>
mov    $0x80000000,%edi
call   1090 <s2f@plt>
movss  0xbb9(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    1467 <test_integer_to_float+0x2c7>
jp     1467 <test_integer_to_float+0x2c7>
jmp    1471 <test_integer_to_float+0x2d1>
mov    $0xfffffff0,%edi
call   1050 <_exit@plt>
xor    %edi,%edi
call   10b0 <s2d@plt>
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1490 <test_integer_to_float+0x2f0>
jp     1490 <test_integer_to_float+0x2f0>
jmp    149a <test_integer_to_float+0x2fa>
mov    $0xffffffef,%edi
call   1050 <_exit@plt>
mov    $0xffffffff,%edi
call   10b0 <s2d@plt>
movsd  0xb7c(%rip),%xmm1
call   10a0 <dnear@plt>
cmp    $0x0,%eax
jne    14c4 <test_integer_to_float+0x324>
mov    $0xffffffee,%edi
call   1050 <_exit@plt>
mov    $0x7fffffff,%edi
call   10b0 <s2d@plt>
movsd  0xb42(%rip),%xmm1
call   10a0 <dnear@plt>
cmp    $0x0,%eax
jne    14ee <test_integer_to_float+0x34e>
mov    $0xffffffed,%edi
call   1050 <_exit@plt>
mov    $0x80000000,%edi
call   10b0 <s2d@plt>
movsd  0xb30(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1515 <test_integer_to_float+0x375>
jp     1515 <test_integer_to_float+0x375>
jmp    151f <test_integer_to_float+0x37f>
mov    $0xffffffec,%edi
call   1050 <_exit@plt>
xor    %edi,%edi
call   10c0 <s2ld@plt>
fld    %st(0)
fstp   %st(0)
fldz
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1543 <test_integer_to_float+0x3a3>
jp     1543 <test_integer_to_float+0x3a3>
jmp    154d <test_integer_to_float+0x3ad>
mov    $0xffffffeb,%edi
call   1050 <_exit@plt>
mov    $0xffffffff,%edi
call   10c0 <s2ld@plt>
mov    %rsp,%rax
fld1
fchs
fstpt  0x10(%rax)
fstpt  (%rax)
call   1080 <ldnear@plt>
cmp    $0x0,%eax
jne    157b <test_integer_to_float+0x3db>
mov    $0xffffffea,%edi
call   1050 <_exit@plt>
mov    $0x7fffffff,%edi
call   10c0 <s2ld@plt>
mov    %rsp,%rax
fldl   0xa8a(%rip)
fstpt  0x10(%rax)
fstpt  (%rax)
call   1080 <ldnear@plt>
cmp    $0x0,%eax
jne    15ab <test_integer_to_float+0x40b>
mov    $0xffffffe9,%edi
call   1050 <_exit@plt>
mov    $0x80000000,%edi
call   10c0 <s2ld@plt>
fld    %st(0)
fstp   %st(0)
flds   0xa4d(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    15d6 <test_integer_to_float+0x436>
jp     15d6 <test_integer_to_float+0x436>
jmp    15e0 <test_integer_to_float+0x440>
mov    $0xffffffe8,%edi
call   1050 <_exit@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_integer_to_float>:
sub    $0x38,%rsp
xor    %edi,%edi
call   1070 <u2f@plt>
xorps  %xmm1,%xmm1
mov    $0xffffffff,%edi
ucomiss %xmm1,%xmm0
jne    1493 <test_integer_to_float+0x2f3>
jp     1493 <test_integer_to_float+0x2f3>
call   1070 <u2f@plt>
movss  0xe31(%rip),%xmm1
call   1040 <fnear@plt>
test   %eax,%eax
je     1498 <test_integer_to_float+0x2f8>
mov    $0x7fffffff,%edi
call   1070 <u2f@plt>
movss  0xe16(%rip),%xmm1
call   1040 <fnear@plt>
test   %eax,%eax
je     14a2 <test_integer_to_float+0x302>
mov    $0x80000000,%edi
call   1070 <u2f@plt>
ucomiss 0xdf8(%rip),%xmm0
jne    14ac <test_integer_to_float+0x30c>
jp     14ac <test_integer_to_float+0x30c>
xor    %edi,%edi
call   1060 <u2d@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    14b6 <test_integer_to_float+0x316>
jp     14b6 <test_integer_to_float+0x316>
mov    $0xffffffff,%edi
call   1060 <u2d@plt>
movsd  0xdcb(%rip),%xmm1
call   10a0 <dnear@plt>
test   %eax,%eax
je     14c0 <test_integer_to_float+0x320>
mov    $0x7fffffff,%edi
call   1060 <u2d@plt>
movsd  0xdb4(%rip),%xmm1
call   10a0 <dnear@plt>
test   %eax,%eax
je     14ca <test_integer_to_float+0x32a>
mov    $0x80000000,%edi
call   1060 <u2d@plt>
ucomisd 0xd9d(%rip),%xmm0
jne    14d4 <test_integer_to_float+0x334>
jp     14d4 <test_integer_to_float+0x334>
xor    %edi,%edi
call   1030 <u2ld@plt>
fldz
fld    %st(0)
fstpt  0x2c(%rsp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    14de <test_integer_to_float+0x33e>
jp     14de <test_integer_to_float+0x33e>
mov    $0xffffffff,%edi
call   1030 <u2ld@plt>
fldl   0xd50(%rip)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1080 <ldnear@plt>
test   %eax,%eax
je     14e8 <test_integer_to_float+0x348>
mov    $0x7fffffff,%edi
call   1030 <u2ld@plt>
fldl   0xd34(%rip)
fld    %st(0)
fstpt  0x20(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1080 <ldnear@plt>
test   %eax,%eax
je     14f2 <test_integer_to_float+0x352>
mov    $0x80000000,%edi
call   1030 <u2ld@plt>
flds   0xcf6(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    14fc <test_integer_to_float+0x35c>
jp     14fc <test_integer_to_float+0x35c>
xor    %edi,%edi
call   1090 <s2f@plt>
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1506 <test_integer_to_float+0x366>
jp     1506 <test_integer_to_float+0x366>
mov    $0xffffffff,%edi
call   1090 <s2f@plt>
movss  0xcbd(%rip),%xmm1
call   1040 <fnear@plt>
test   %eax,%eax
je     1510 <test_integer_to_float+0x370>
mov    $0x7fffffff,%edi
call   1090 <s2f@plt>
movss  0xc9a(%rip),%xmm1
call   1040 <fnear@plt>
test   %eax,%eax
je     151a <test_integer_to_float+0x37a>
mov    $0x80000000,%edi
call   1090 <s2f@plt>
ucomiss 0xc84(%rip),%xmm0
jne    1524 <test_integer_to_float+0x384>
jp     1524 <test_integer_to_float+0x384>
xor    %edi,%edi
call   10b0 <s2d@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    152e <test_integer_to_float+0x38e>
jp     152e <test_integer_to_float+0x38e>
mov    $0xffffffff,%edi
call   10b0 <s2d@plt>
movsd  0xc67(%rip),%xmm1
call   10a0 <dnear@plt>
test   %eax,%eax
je     1538 <test_integer_to_float+0x398>
mov    $0x7fffffff,%edi
call   10b0 <s2d@plt>
movsd  0xc38(%rip),%xmm1
call   10a0 <dnear@plt>
test   %eax,%eax
je     1542 <test_integer_to_float+0x3a2>
mov    $0x80000000,%edi
call   10b0 <s2d@plt>
ucomisd 0xc31(%rip),%xmm0
jne    154c <test_integer_to_float+0x3ac>
jp     154c <test_integer_to_float+0x3ac>
xor    %edi,%edi
call   10c0 <s2ld@plt>
fldt   0x2c(%rsp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1556 <test_integer_to_float+0x3b6>
jp     1556 <test_integer_to_float+0x3b6>
mov    $0xffffffff,%edi
call   10c0 <s2ld@plt>
fld1
fchs
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1080 <ldnear@plt>
test   %eax,%eax
je     1560 <test_integer_to_float+0x3c0>
mov    $0x7fffffff,%edi
call   10c0 <s2ld@plt>
fldt   0x20(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1080 <ldnear@plt>
test   %eax,%eax
je     156a <test_integer_to_float+0x3ca>
mov    $0x80000000,%edi
call   10c0 <s2ld@plt>
flds   0xb90(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1574 <test_integer_to_float+0x3d4>
jp     1574 <test_integer_to_float+0x3d4>
add    $0x38,%rsp
ret
call   1050 <_exit@plt>
mov    $0xfffffffe,%edi
call   1050 <_exit@plt>
mov    $0xfffffffd,%edi
call   1050 <_exit@plt>
mov    $0xfffffffc,%edi
call   1050 <_exit@plt>
mov    $0xfffffffb,%edi
call   1050 <_exit@plt>
mov    $0xfffffffa,%edi
call   1050 <_exit@plt>
mov    $0xfffffff9,%edi
call   1050 <_exit@plt>
mov    $0xfffffff8,%edi
call   1050 <_exit@plt>
mov    $0xfffffff7,%edi
call   1050 <_exit@plt>
mov    $0xfffffff6,%edi
call   1050 <_exit@plt>
mov    $0xfffffff5,%edi
call   1050 <_exit@plt>
mov    $0xfffffff4,%edi
call   1050 <_exit@plt>
mov    $0xfffffff3,%edi
call   1050 <_exit@plt>
mov    $0xfffffff2,%edi
call   1050 <_exit@plt>
mov    $0xfffffff1,%edi
call   1050 <_exit@plt>
mov    $0xfffffff0,%edi
call   1050 <_exit@plt>
mov    $0xffffffef,%edi
call   1050 <_exit@plt>
mov    $0xffffffee,%edi
call   1050 <_exit@plt>
mov    $0xffffffed,%edi
call   1050 <_exit@plt>
mov    $0xffffffec,%edi
call   1050 <_exit@plt>
mov    $0xffffffeb,%edi
call   1050 <_exit@plt>
mov    $0xffffffea,%edi
call   1050 <_exit@plt>
mov    $0xffffffe9,%edi
call   1050 <_exit@plt>
mov    $0xffffffe8,%edi
call   1050 <_exit@plt>

LLVM IR (-O0):
define i32 @test_integer_to_float() {
%1 = alloca i32
%2 = call float @u2f(i32 0)
%3 = fcmp une float %2, 0.000000e+00
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @_exit(i32 -1)
unreachable
6: ; preds = %0
%7 = call float @u2f(i32 -1)
%8 = call i32 @fnear(float %7, float 0x41F0000000000000)
%9 = icmp ne i32 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %6
%11 = call i32 @_exit(i32 -2)
unreachable
12: ; preds = %6
%13 = call float @u2f(i32 2147483647)
%14 = call i32 @fnear(float %13, float 0x41E0000000000000)
%15 = icmp ne i32 %14, 0
br i1 %15, label %18, label %16
16: ; preds = %12
%17 = call i32 @_exit(i32 -3)
unreachable
18: ; preds = %12
%19 = call float @u2f(i32 -2147483648)
%20 = fcmp une float %19, 0x41E0000000000000
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = call i32 @_exit(i32 -4)
unreachable
23: ; preds = %18
%24 = call double @u2d(i32 0)
%25 = fcmp une double %24, 0.000000e+00
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 @_exit(i32 -5)
unreachable
28: ; preds = %23
%29 = call double @u2d(i32 -1)
%30 = call i32 @dnear(double %29, double 0x41EFFFFFFFE00000)
%31 = icmp ne i32 %30, 0
br i1 %31, label %34, label %32
32: ; preds = %28
%33 = call i32 @_exit(i32 -6)
unreachable
34: ; preds = %28
%35 = call double @u2d(i32 2147483647)
%36 = call i32 @dnear(double %35, double 0x41DFFFFFFFC00000)
%37 = icmp ne i32 %36, 0
br i1 %37, label %40, label %38
38: ; preds = %34
%39 = call i32 @_exit(i32 -7)
unreachable
40: ; preds = %34
%41 = call double @u2d(i32 -2147483648)
%42 = fcmp une double %41, 0x41E0000000000000
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = call i32 @_exit(i32 -8)
unreachable
45: ; preds = %40
%46 = call x86_fp80 @u2ld(i32 0)
%47 = fcmp une x86_fp80 %46, 0xK00000000000000000000
br i1 %47, label %48, label %50
48: ; preds = %45
%49 = call i32 @_exit(i32 -9)
unreachable
50: ; preds = %45
%51 = call x86_fp80 @u2ld(i32 -1)
%52 = call i32 @ldnear(x86_fp80 %51, x86_fp80 0xK401EFFFFFFFF00000000)
%53 = icmp ne i32 %52, 0
br i1 %53, label %56, label %54
54: ; preds = %50
%55 = call i32 @_exit(i32 -10)
unreachable
56: ; preds = %50
%57 = call x86_fp80 @u2ld(i32 2147483647)
%58 = call i32 @ldnear(x86_fp80 %57, x86_fp80 0xK401DFFFFFFFE00000000)
%59 = icmp ne i32 %58, 0
br i1 %59, label %62, label %60
60: ; preds = %56
%61 = call i32 @_exit(i32 -11)
unreachable
62: ; preds = %56
%63 = call x86_fp80 @u2ld(i32 -2147483648)
%64 = fcmp une x86_fp80 %63, 0xK401E8000000000000000
br i1 %64, label %65, label %67
65: ; preds = %62
%66 = call i32 @_exit(i32 -12)
unreachable
67: ; preds = %62
%68 = call float @s2f(i32 0)
%69 = fcmp une float %68, 0.000000e+00
br i1 %69, label %70, label %72
70: ; preds = %67
%71 = call i32 @_exit(i32 -13)
unreachable
72: ; preds = %67
%73 = call float @s2f(i32 -1)
%74 = call i32 @fnear(float %73, float -1.000000e+00)
%75 = icmp ne i32 %74, 0
br i1 %75, label %78, label %76
76: ; preds = %72
%77 = call i32 @_exit(i32 -14)
unreachable
78: ; preds = %72
%79 = call float @s2f(i32 2147483647)
%80 = call i32 @fnear(float %79, float 0x41E0000000000000)
%81 = icmp ne i32 %80, 0
br i1 %81, label %84, label %82
82: ; preds = %78
%83 = call i32 @_exit(i32 -15)
unreachable
84: ; preds = %78
%85 = call float @s2f(i32 -2147483648)
%86 = fcmp une float %85, 0xC1E0000000000000
br i1 %86, label %87, label %89
87: ; preds = %84
%88 = call i32 @_exit(i32 -16)
unreachable
89: ; preds = %84
%90 = call double @s2d(i32 0)
%91 = fcmp une double %90, 0.000000e+00
br i1 %91, label %92, label %94
92: ; preds = %89
%93 = call i32 @_exit(i32 -17)
unreachable
94: ; preds = %89
%95 = call double @s2d(i32 -1)
%96 = call i32 @dnear(double %95, double -1.000000e+00)
%97 = icmp ne i32 %96, 0
br i1 %97, label %100, label %98
98: ; preds = %94
%99 = call i32 @_exit(i32 -18)
unreachable
100: ; preds = %94
%101 = call double @s2d(i32 2147483647)
%102 = call i32 @dnear(double %101, double 0x41DFFFFFFFC00000)
%103 = icmp ne i32 %102, 0
br i1 %103, label %106, label %104
104: ; preds = %100
%105 = call i32 @_exit(i32 -19)
unreachable
106: ; preds = %100
%107 = call double @s2d(i32 -2147483648)
%108 = fcmp une double %107, 0xC1E0000000000000
br i1 %108, label %109, label %111
109: ; preds = %106
%110 = call i32 @_exit(i32 -20)
unreachable
111: ; preds = %106
%112 = call x86_fp80 @s2ld(i32 0)
%113 = fcmp une x86_fp80 %112, 0xK00000000000000000000
br i1 %113, label %114, label %116
114: ; preds = %111
%115 = call i32 @_exit(i32 -21)
unreachable
116: ; preds = %111
%117 = call x86_fp80 @s2ld(i32 -1)
%118 = call i32 @ldnear(x86_fp80 %117, x86_fp80 0xKBFFF8000000000000000)
%119 = icmp ne i32 %118, 0
br i1 %119, label %122, label %120
120: ; preds = %116
%121 = call i32 @_exit(i32 -22)
unreachable
122: ; preds = %116
%123 = call x86_fp80 @s2ld(i32 2147483647)
%124 = call i32 @ldnear(x86_fp80 %123, x86_fp80 0xK401DFFFFFFFE00000000)
%125 = icmp ne i32 %124, 0
br i1 %125, label %128, label %126
126: ; preds = %122
%127 = call i32 @_exit(i32 -23)
unreachable
128: ; preds = %122
%129 = call x86_fp80 @s2ld(i32 -2147483648)
%130 = fcmp une x86_fp80 %129, 0xKC01E8000000000000000
br i1 %130, label %131, label %133
131: ; preds = %128
%132 = call i32 @_exit(i32 -24)
unreachable
133: ; preds = %128
%134 = load i32, i32* %1
ret i32 %134
}

LLVM IR (-O2):
define i32 @test_integer_to_float() {
%1 = tail call float @u2f(i32 0)
%2 = fcmp une float %1, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @_exit(i32 -1)
unreachable
5: ; preds = %0
%6 = tail call float @u2f(i32 -1)
%7 = tail call i32 @fnear(float %6, float 0x41F0000000000000)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = tail call i32 @_exit(i32 -2)
unreachable
11: ; preds = %5
%12 = tail call float @u2f(i32 2147483647)
%13 = tail call i32 @fnear(float %12, float 0x41E0000000000000)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = tail call i32 @_exit(i32 -3)
unreachable
17: ; preds = %11
%18 = tail call float @u2f(i32 -2147483648)
%19 = fcmp une float %18, 0x41E0000000000000
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = tail call i32 @_exit(i32 -4)
unreachable
22: ; preds = %17
%23 = tail call double @u2d(i32 0)
%24 = fcmp une double %23, 0.000000e+00
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = tail call i32 @_exit(i32 -5)
unreachable
27: ; preds = %22
%28 = tail call double @u2d(i32 -1)
%29 = tail call i32 @dnear(double %28, double 0x41EFFFFFFFE00000)
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %27
%32 = tail call i32 @_exit(i32 -6)
unreachable
33: ; preds = %27
%34 = tail call double @u2d(i32 2147483647)
%35 = tail call i32 @dnear(double %34, double 0x41DFFFFFFFC00000)
%36 = icmp eq i32 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %33
%38 = tail call i32 @_exit(i32 -7)
unreachable
39: ; preds = %33
%40 = tail call double @u2d(i32 -2147483648)
%41 = fcmp une double %40, 0x41E0000000000000
br i1 %41, label %42, label %44
42: ; preds = %39
%43 = tail call i32 @_exit(i32 -8)
unreachable
44: ; preds = %39
%45 = tail call x86_fp80 @u2ld(i32 0)
%46 = fcmp une x86_fp80 %45, 0xK00000000000000000000
br i1 %46, label %47, label %49
47: ; preds = %44
%48 = tail call i32 @_exit(i32 -9)
unreachable
49: ; preds = %44
%50 = tail call x86_fp80 @u2ld(i32 -1)
%51 = tail call i32 @ldnear(x86_fp80 %50, x86_fp80 0xK401EFFFFFFFF00000000)
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %55
53: ; preds = %49
%54 = tail call i32 @_exit(i32 -10)
unreachable
55: ; preds = %49
%56 = tail call x86_fp80 @u2ld(i32 2147483647)
%57 = tail call i32 @ldnear(x86_fp80 %56, x86_fp80 0xK401DFFFFFFFE00000000)
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %61
59: ; preds = %55
%60 = tail call i32 @_exit(i32 -11)
unreachable
61: ; preds = %55
%62 = tail call x86_fp80 @u2ld(i32 -2147483648)
%63 = fcmp une x86_fp80 %62, 0xK401E8000000000000000
br i1 %63, label %64, label %66
64: ; preds = %61
%65 = tail call i32 @_exit(i32 -12)
unreachable
66: ; preds = %61
%67 = tail call float @s2f(i32 0)
%68 = fcmp une float %67, 0.000000e+00
br i1 %68, label %69, label %71
69: ; preds = %66
%70 = tail call i32 @_exit(i32 -13)
unreachable
71: ; preds = %66
%72 = tail call float @s2f(i32 -1)
%73 = tail call i32 @fnear(float %72, float -1.000000e+00)
%74 = icmp eq i32 %73, 0
br i1 %74, label %75, label %77
75: ; preds = %71
%76 = tail call i32 @_exit(i32 -14)
unreachable
77: ; preds = %71
%78 = tail call float @s2f(i32 2147483647)
%79 = tail call i32 @fnear(float %78, float 0x41E0000000000000)
%80 = icmp eq i32 %79, 0
br i1 %80, label %81, label %83
81: ; preds = %77
%82 = tail call i32 @_exit(i32 -15)
unreachable
83: ; preds = %77
%84 = tail call float @s2f(i32 -2147483648)
%85 = fcmp une float %84, 0xC1E0000000000000
br i1 %85, label %86, label %88
86: ; preds = %83
%87 = tail call i32 @_exit(i32 -16)
unreachable
88: ; preds = %83
%89 = tail call double @s2d(i32 0)
%90 = fcmp une double %89, 0.000000e+00
br i1 %90, label %91, label %93
91: ; preds = %88
%92 = tail call i32 @_exit(i32 -17)
unreachable
93: ; preds = %88
%94 = tail call double @s2d(i32 -1)
%95 = tail call i32 @dnear(double %94, double -1.000000e+00)
%96 = icmp eq i32 %95, 0
br i1 %96, label %97, label %99
97: ; preds = %93
%98 = tail call i32 @_exit(i32 -18)
unreachable
99: ; preds = %93
%100 = tail call double @s2d(i32 2147483647)
%101 = tail call i32 @dnear(double %100, double 0x41DFFFFFFFC00000)
%102 = icmp eq i32 %101, 0
br i1 %102, label %103, label %105
103: ; preds = %99
%104 = tail call i32 @_exit(i32 -19)
unreachable
105: ; preds = %99
%106 = tail call double @s2d(i32 -2147483648)
%107 = fcmp une double %106, 0xC1E0000000000000
br i1 %107, label %108, label %110
108: ; preds = %105
%109 = tail call i32 @_exit(i32 -20)
unreachable
110: ; preds = %105
%111 = tail call x86_fp80 @s2ld(i32 0)
%112 = fcmp une x86_fp80 %111, 0xK00000000000000000000
br i1 %112, label %113, label %115
113: ; preds = %110
%114 = tail call i32 @_exit(i32 -21)
unreachable
115: ; preds = %110
%116 = tail call x86_fp80 @s2ld(i32 -1)
%117 = tail call i32 @ldnear(x86_fp80 %116, x86_fp80 0xKBFFF8000000000000000)
%118 = icmp eq i32 %117, 0
br i1 %118, label %119, label %121
119: ; preds = %115
%120 = tail call i32 @_exit(i32 -22)
unreachable
121: ; preds = %115
%122 = tail call x86_fp80 @s2ld(i32 2147483647)
%123 = tail call i32 @ldnear(x86_fp80 %122, x86_fp80 0xK401DFFFFFFFE00000000)
%124 = icmp eq i32 %123, 0
br i1 %124, label %125, label %127
125: ; preds = %121
%126 = tail call i32 @_exit(i32 -23)
unreachable
127: ; preds = %121
%128 = tail call x86_fp80 @s2ld(i32 -2147483648)
%129 = fcmp une x86_fp80 %128, 0xKC01E8000000000000000
br i1 %129, label %130, label %132
130: ; preds = %127
%131 = tail call i32 @_exit(i32 -24)
unreachable
132: ; preds = %127
ret i32 undef
}