#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*/ abort();
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)
    abort();
  if (!fnear(u2f(~0U), (float)~0U))
    abort();
  if (!fnear(u2f((~0U) >> 1), (float)((~0U) >> 1)))
    abort();
  if (u2f(~((~0U) >> 1)) != (float)~((~0U) >> 1))
    abort();
  if (u2d(0U) != (double)0U)
    abort();
  if (!dnear(u2d(~0U), (double)~0U))
    abort();
  if (!dnear(u2d((~0U) >> 1), (double)((~0U) >> 1)))
    abort();
  if (u2d(~((~0U) >> 1)) != (double)~((~0U) >> 1))
    abort();
  if (u2ld(0U) != (long double)0U)
    abort();
  if (!ldnear(u2ld(~0U), (long double)~0U))
    abort();
  if (!ldnear(u2ld((~0U) >> 1), (long double)((~0U) >> 1)))
    abort();
  if (u2ld(~((~0U) >> 1)) != (long double)~((~0U) >> 1))
    abort();
  if (s2f(0) != (float)0)
    abort();
  if (!fnear(s2f(~0), (float)~0))
    abort();
  if (!fnear(s2f((int)((~0U) >> 1)), (float)(int)((~0U) >> 1)))
    abort();
  if (s2f((int)(~((~0U) >> 1))) != (float)(int)~((~0U) >> 1))
    abort();
  if (s2d(0) != (double)0)
    abort();
  if (!dnear(s2d(~0), (double)~0))
    abort();
  if (!dnear(s2d((int)((~0U) >> 1)), (double)(int)((~0U) >> 1)))
    abort();
  if (s2d((int)~((~0U) >> 1)) != (double)(int)~((~0U) >> 1))
    abort();
  if (s2ld(0) != (long double)0)
    abort();
  if (!ldnear(s2ld(~0), (long double)~0))
    abort();
  if (!ldnear(s2ld((int)((~0U) >> 1)), (long double)(int)((~0U) >> 1)))
    abort();
  if (s2ld((int)~((~0U) >> 1)) != (long double)(int)~((~0U) >> 1))
    abort();
}


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    11cd <test_integer_to_float+0x2d>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0xffffffff,%edi
call   1070 <u2f@plt>
movss  0xe21(%rip),%xmm1
call   1040 <fnear@plt>
cmp    $0x0,%eax
jne    11f4 <test_integer_to_float+0x54>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0x7fffffff,%edi
call   1070 <u2f@plt>
movss  0xdfe(%rip),%xmm1
call   1040 <fnear@plt>
cmp    $0x0,%eax
jne    121b <test_integer_to_float+0x7b>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0x80000000,%edi
call   1070 <u2f@plt>
movss  0xdd7(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    1241 <test_integer_to_float+0xa1>
jp     1241 <test_integer_to_float+0xa1>
jmp    1248 <test_integer_to_float+0xa8>
mov    $0x0,%al
call   1050 <abort@plt>
xor    %edi,%edi
call   1060 <u2d@plt>
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1267 <test_integer_to_float+0xc7>
jp     1267 <test_integer_to_float+0xc7>
jmp    126e <test_integer_to_float+0xce>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0xffffffff,%edi
call   1060 <u2d@plt>
movsd  0xd90(%rip),%xmm1
call   10a0 <dnear@plt>
cmp    $0x0,%eax
jne    1295 <test_integer_to_float+0xf5>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0x7fffffff,%edi
call   1060 <u2d@plt>
movsd  0xd71(%rip),%xmm1
call   10a0 <dnear@plt>
cmp    $0x0,%eax
jne    12bc <test_integer_to_float+0x11c>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0x80000000,%edi
call   1060 <u2d@plt>
movsd  0xd52(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    12e3 <test_integer_to_float+0x143>
jp     12e3 <test_integer_to_float+0x143>
jmp    12ea <test_integer_to_float+0x14a>
mov    $0x0,%al
call   1050 <abort@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    130e <test_integer_to_float+0x16e>
jp     130e <test_integer_to_float+0x16e>
jmp    1315 <test_integer_to_float+0x175>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0xffffffff,%edi
call   1030 <u2ld@plt>
mov    %rsp,%rax
fldl   0xce8(%rip)
fstpt  0x10(%rax)
fstpt  (%rax)
call   1080 <ldnear@plt>
cmp    $0x0,%eax
jne    1342 <test_integer_to_float+0x1a2>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0x7fffffff,%edi
call   1030 <u2ld@plt>
mov    %rsp,%rax
fldl   0xcc3(%rip)
fstpt  0x10(%rax)
fstpt  (%rax)
call   1080 <ldnear@plt>
cmp    $0x0,%eax
jne    136f <test_integer_to_float+0x1cf>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0x80000000,%edi
call   1030 <u2ld@plt>
fld    %st(0)
fstp   %st(0)
flds   0xc81(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    139a <test_integer_to_float+0x1fa>
jp     139a <test_integer_to_float+0x1fa>
jmp    13a1 <test_integer_to_float+0x201>
mov    $0x0,%al
call   1050 <abort@plt>
xor    %edi,%edi
call   1090 <s2f@plt>
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    13bf <test_integer_to_float+0x21f>
jp     13bf <test_integer_to_float+0x21f>
jmp    13c6 <test_integer_to_float+0x226>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0xffffffff,%edi
call   1090 <s2f@plt>
movss  0xc30(%rip),%xmm1
call   1040 <fnear@plt>
cmp    $0x0,%eax
jne    13ed <test_integer_to_float+0x24d>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0x7fffffff,%edi
call   1090 <s2f@plt>
movss  0xc05(%rip),%xmm1
call   1040 <fnear@plt>
cmp    $0x0,%eax
jne    1414 <test_integer_to_float+0x274>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0x80000000,%edi
call   1090 <s2f@plt>
movss  0xbe6(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    143a <test_integer_to_float+0x29a>
jp     143a <test_integer_to_float+0x29a>
jmp    1441 <test_integer_to_float+0x2a1>
mov    $0x0,%al
call   1050 <abort@plt>
xor    %edi,%edi
call   10b0 <s2d@plt>
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1460 <test_integer_to_float+0x2c0>
jp     1460 <test_integer_to_float+0x2c0>
jmp    1467 <test_integer_to_float+0x2c7>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0xffffffff,%edi
call   10b0 <s2d@plt>
movsd  0xbaf(%rip),%xmm1
call   10a0 <dnear@plt>
cmp    $0x0,%eax
jne    148e <test_integer_to_float+0x2ee>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0x7fffffff,%edi
call   10b0 <s2d@plt>
movsd  0xb78(%rip),%xmm1
call   10a0 <dnear@plt>
cmp    $0x0,%eax
jne    14b5 <test_integer_to_float+0x315>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0x80000000,%edi
call   10b0 <s2d@plt>
movsd  0xb69(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    14dc <test_integer_to_float+0x33c>
jp     14dc <test_integer_to_float+0x33c>
jmp    14e3 <test_integer_to_float+0x343>
mov    $0x0,%al
call   1050 <abort@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    1507 <test_integer_to_float+0x367>
jp     1507 <test_integer_to_float+0x367>
jmp    150e <test_integer_to_float+0x36e>
mov    $0x0,%al
call   1050 <abort@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    1539 <test_integer_to_float+0x399>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0x7fffffff,%edi
call   10c0 <s2ld@plt>
mov    %rsp,%rax
fldl   0xacc(%rip)
fstpt  0x10(%rax)
fstpt  (%rax)
call   1080 <ldnear@plt>
cmp    $0x0,%eax
jne    1566 <test_integer_to_float+0x3c6>
mov    $0x0,%al
call   1050 <abort@plt>
mov    $0x80000000,%edi
call   10c0 <s2ld@plt>
fld    %st(0)
fstp   %st(0)
flds   0xa92(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1591 <test_integer_to_float+0x3f1>
jp     1591 <test_integer_to_float+0x3f1>
jmp    1598 <test_integer_to_float+0x3f8>
mov    $0x0,%al
call   1050 <abort@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
ucomiss %xmm1,%xmm0
jne    1473 <test_integer_to_float+0x2d3>
jp     1473 <test_integer_to_float+0x2d3>
mov    $0xffffffff,%edi
call   1070 <u2f@plt>
movss  0xe31(%rip),%xmm1
call   1040 <fnear@plt>
test   %eax,%eax
je     1473 <test_integer_to_float+0x2d3>
mov    $0x7fffffff,%edi
call   1070 <u2f@plt>
movss  0xe16(%rip),%xmm1
call   1040 <fnear@plt>
test   %eax,%eax
je     1473 <test_integer_to_float+0x2d3>
mov    $0x80000000,%edi
call   1070 <u2f@plt>
ucomiss 0xdf8(%rip),%xmm0
jne    1473 <test_integer_to_float+0x2d3>
jp     1473 <test_integer_to_float+0x2d3>
xor    %edi,%edi
call   1060 <u2d@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1473 <test_integer_to_float+0x2d3>
jp     1473 <test_integer_to_float+0x2d3>
mov    $0xffffffff,%edi
call   1060 <u2d@plt>
movsd  0xdcb(%rip),%xmm1
call   10a0 <dnear@plt>
test   %eax,%eax
je     1473 <test_integer_to_float+0x2d3>
mov    $0x7fffffff,%edi
call   1060 <u2d@plt>
movsd  0xdb4(%rip),%xmm1
call   10a0 <dnear@plt>
test   %eax,%eax
je     1473 <test_integer_to_float+0x2d3>
mov    $0x80000000,%edi
call   1060 <u2d@plt>
ucomisd 0xd9d(%rip),%xmm0
jne    1473 <test_integer_to_float+0x2d3>
jp     1473 <test_integer_to_float+0x2d3>
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    1473 <test_integer_to_float+0x2d3>
jp     1473 <test_integer_to_float+0x2d3>
mov    $0xffffffff,%edi
call   1030 <u2ld@plt>
fldl   0xd50(%rip)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1080 <ldnear@plt>
test   %eax,%eax
je     1473 <test_integer_to_float+0x2d3>
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     1473 <test_integer_to_float+0x2d3>
mov    $0x80000000,%edi
call   1030 <u2ld@plt>
flds   0xcf6(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1473 <test_integer_to_float+0x2d3>
jp     1473 <test_integer_to_float+0x2d3>
xor    %edi,%edi
call   1090 <s2f@plt>
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1473 <test_integer_to_float+0x2d3>
jp     1473 <test_integer_to_float+0x2d3>
mov    $0xffffffff,%edi
call   1090 <s2f@plt>
movss  0xcbd(%rip),%xmm1
call   1040 <fnear@plt>
test   %eax,%eax
je     1473 <test_integer_to_float+0x2d3>
mov    $0x7fffffff,%edi
call   1090 <s2f@plt>
movss  0xc9a(%rip),%xmm1
call   1040 <fnear@plt>
test   %eax,%eax
je     1473 <test_integer_to_float+0x2d3>
mov    $0x80000000,%edi
call   1090 <s2f@plt>
ucomiss 0xc84(%rip),%xmm0
jne    1473 <test_integer_to_float+0x2d3>
jp     1473 <test_integer_to_float+0x2d3>
xor    %edi,%edi
call   10b0 <s2d@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1473 <test_integer_to_float+0x2d3>
jp     1473 <test_integer_to_float+0x2d3>
mov    $0xffffffff,%edi
call   10b0 <s2d@plt>
movsd  0xc67(%rip),%xmm1
call   10a0 <dnear@plt>
test   %eax,%eax
je     1473 <test_integer_to_float+0x2d3>
mov    $0x7fffffff,%edi
call   10b0 <s2d@plt>
movsd  0xc38(%rip),%xmm1
call   10a0 <dnear@plt>
test   %eax,%eax
je     1473 <test_integer_to_float+0x2d3>
mov    $0x80000000,%edi
call   10b0 <s2d@plt>
ucomisd 0xc31(%rip),%xmm0
jne    1473 <test_integer_to_float+0x2d3>
jp     1473 <test_integer_to_float+0x2d3>
xor    %edi,%edi
call   10c0 <s2ld@plt>
fldt   0x2c(%rsp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1473 <test_integer_to_float+0x2d3>
jp     1473 <test_integer_to_float+0x2d3>
mov    $0xffffffff,%edi
call   10c0 <s2ld@plt>
fld1
fchs
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1080 <ldnear@plt>
test   %eax,%eax
je     1473 <test_integer_to_float+0x2d3>
mov    $0x7fffffff,%edi
call   10c0 <s2ld@plt>
fldt   0x20(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1080 <ldnear@plt>
test   %eax,%eax
je     1473 <test_integer_to_float+0x2d3>
mov    $0x80000000,%edi
call   10c0 <s2ld@plt>
flds   0xba8(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    1473 <test_integer_to_float+0x2d3>
jp     1473 <test_integer_to_float+0x2d3>
add    $0x38,%rsp
ret
xor    %eax,%eax
call   1050 <abort@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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
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 (...) @abort()
unreachable
132: ; preds = %127
ret i32 undef
}