#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 d2s(double);
unsigned int d2u(double);
int f2s(float);
unsigned int f2u(float);
int ld2s(long double);
unsigned int ld2u(long double);
test_float_to_integer() {
  if (f2u(0.0) != 0)
    abort();
  if (f2u(0.999) != 0)
    abort();
  if (f2u(1.0) != 1)
    abort();
  if (f2u(1.99) != 1)
    abort();
  if (f2u((float)((~0U) >> 1)) != (~0U) >> 1 &&
      f2u((float)((~0U) >> 1)) != ((~0U) >> 1) + 1)
    abort();
  if (f2u((float)~((~0U) >> 1)) != ~((~0U) >> 1))
    abort();
  if (sizeof(double) >= 8) {
    if (d2u(0.0) != 0)
      abort();
    if (d2u(0.999) != 0)
      abort();
    if (d2u(1.0) != 1)
      abort();
    if (d2u(1.99) != 1)
      abort();
    if (d2u((double)(~0U)) != ~0U)
      abort();
    if (d2u((double)((~0U) >> 1)) != (~0U) >> 1)
      abort();
    if (d2u((double)~((~0U) >> 1)) != ~((~0U) >> 1))
      abort();
  }
  if (sizeof(long double) >= 8) {
    if (ld2u(0.0) != 0)
      abort();
    if (ld2u(0.999) != 0)
      abort();
    if (ld2u(1.0) != 1)
      abort();
    if (ld2u(1.99) != 1)
      abort();
    if (ld2u((long double)(~0U)) != ~0U)
      abort();
    if (ld2u((long double)((~0U) >> 1)) != (~0U) >> 1)
      abort();
    if (ld2u((long double)~((~0U) >> 1)) != ~((~0U) >> 1))
      abort();
  }
  if (f2s(0.0) != 0)
    abort();
  if (f2s(0.999) != 0)
    abort();
  if (f2s(1.0) != 1)
    abort();
  if (f2s(1.99) != 1)
    abort();
  if (f2s(-0.999) != 0)
    abort();
  if (f2s(-1.0) != -1)
    abort();
  if (f2s(-1.99) != -1)
    abort();
  if (f2s((float)(int)~((~0U) >> 1)) != (int)~((~0U) >> 1))
    abort();
  if (sizeof(double) >= 8) {
    if (d2s(0.0) != 0)
      abort();
    if (d2s(0.999) != 0)
      abort();
    if (d2s(1.0) != 1)
      abort();
    if (d2s(1.99) != 1)
      abort();
    if (d2s(-0.999) != 0)
      abort();
    if (d2s(-1.0) != -1)
      abort();
    if (d2s(-1.99) != -1)
      abort();
    if (d2s((double)((~0U) >> 1)) != (~0U) >> 1)
      abort();
    if (d2s((double)(int)~((~0U) >> 1)) != (int)~((~0U) >> 1))
      abort();
  }
  if (sizeof(long double) >= 8) {
    if (ld2s(0.0) != 0)
      abort();
    if (ld2s(0.999) != 0)
      abort();
    if (ld2s(1.0) != 1)
      abort();
    if (ld2s(1.99) != 1)
      abort();
    if (ld2s(-0.999) != 0)
      abort();
    if (ld2s(-1.0) != -1)
      abort();
    if (ld2s(-1.99) != -1)
      abort();
    if (ld2s((long double)((~0U) >> 1)) != (~0U) >> 1)
      abort();
    if (ld2s((long double)(int)~((~0U) >> 1)) != (int)~((~0U) >> 1))
      abort();
  }
}


x86 assembly (clang, -O0):
<test_float_to_integer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
xorps  %xmm0,%xmm0
call   1090 <f2u@plt>
cmp    $0x0,%eax
je     1190 <test_float_to_integer+0x20>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xe68(%rip),%xmm0
call   1090 <f2u@plt>
cmp    $0x0,%eax
je     11ad <test_float_to_integer+0x3d>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xe4f(%rip),%xmm0
call   1090 <f2u@plt>
cmp    $0x1,%eax
je     11ca <test_float_to_integer+0x5a>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xe36(%rip),%xmm0
call   1090 <f2u@plt>
cmp    $0x1,%eax
je     11e7 <test_float_to_integer+0x77>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xe1d(%rip),%xmm0
call   1090 <f2u@plt>
cmp    $0x7fffffff,%eax
je     121e <test_float_to_integer+0xae>
movss  0xe05(%rip),%xmm0
call   1090 <f2u@plt>
cmp    $0x80000000,%eax
je     121e <test_float_to_integer+0xae>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xde6(%rip),%xmm0
call   1090 <f2u@plt>
cmp    $0x80000000,%eax
je     123d <test_float_to_integer+0xcd>
mov    $0x0,%al
call   1030 <abort@plt>
xorps  %xmm0,%xmm0
call   1040 <d2u@plt>
cmp    $0x0,%eax
je     1255 <test_float_to_integer+0xe5>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xdc3(%rip),%xmm0
call   1040 <d2u@plt>
cmp    $0x0,%eax
je     1272 <test_float_to_integer+0x102>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xdae(%rip),%xmm0
call   1040 <d2u@plt>
cmp    $0x1,%eax
je     128f <test_float_to_integer+0x11f>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xd99(%rip),%xmm0
call   1040 <d2u@plt>
cmp    $0x1,%eax
je     12ac <test_float_to_integer+0x13c>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xd84(%rip),%xmm0
call   1040 <d2u@plt>
cmp    $0xffffffff,%eax
je     12c9 <test_float_to_integer+0x159>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xd6f(%rip),%xmm0
call   1040 <d2u@plt>
cmp    $0x7fffffff,%eax
je     12e8 <test_float_to_integer+0x178>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xd58(%rip),%xmm0
call   1040 <d2u@plt>
cmp    $0x80000000,%eax
je     1307 <test_float_to_integer+0x197>
mov    $0x0,%al
call   1030 <abort@plt>
mov    %rsp,%rax
fldz
fstpt  (%rax)
call   1060 <ld2u@plt>
cmp    $0x0,%eax
je     1323 <test_float_to_integer+0x1b3>
mov    $0x0,%al
call   1030 <abort@plt>
mov    %rsp,%rax
fldl   0xcf4(%rip)
fstpt  (%rax)
call   1060 <ld2u@plt>
cmp    $0x0,%eax
je     1343 <test_float_to_integer+0x1d3>
mov    $0x0,%al
call   1030 <abort@plt>
mov    %rsp,%rax
fld1
fstpt  (%rax)
call   1060 <ld2u@plt>
cmp    $0x1,%eax
je     135f <test_float_to_integer+0x1ef>
mov    $0x0,%al
call   1030 <abort@plt>
mov    %rsp,%rax
fldl   0xcc8(%rip)
fstpt  (%rax)
call   1060 <ld2u@plt>
cmp    $0x1,%eax
je     137f <test_float_to_integer+0x20f>
mov    $0x0,%al
call   1030 <abort@plt>
mov    %rsp,%rax
fldl   0xcb0(%rip)
fstpt  (%rax)
call   1060 <ld2u@plt>
cmp    $0xffffffff,%eax
je     139f <test_float_to_integer+0x22f>
mov    $0x0,%al
call   1030 <abort@plt>
mov    %rsp,%rax
fldl   0xc98(%rip)
fstpt  (%rax)
call   1060 <ld2u@plt>
cmp    $0x7fffffff,%eax
je     13c1 <test_float_to_integer+0x251>
mov    $0x0,%al
call   1030 <abort@plt>
mov    %rsp,%rax
flds   0xc42(%rip)
fstpt  (%rax)
call   1060 <ld2u@plt>
cmp    $0x80000000,%eax
je     13e3 <test_float_to_integer+0x273>
mov    $0x0,%al
call   1030 <abort@plt>
xorps  %xmm0,%xmm0
call   1080 <f2s@plt>
cmp    $0x0,%eax
je     13fb <test_float_to_integer+0x28b>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xbfd(%rip),%xmm0
call   1080 <f2s@plt>
cmp    $0x0,%eax
je     1418 <test_float_to_integer+0x2a8>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xbe4(%rip),%xmm0
call   1080 <f2s@plt>
cmp    $0x1,%eax
je     1435 <test_float_to_integer+0x2c5>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xbcb(%rip),%xmm0
call   1080 <f2s@plt>
cmp    $0x1,%eax
je     1452 <test_float_to_integer+0x2e2>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xbb6(%rip),%xmm0
call   1080 <f2s@plt>
cmp    $0x0,%eax
je     146f <test_float_to_integer+0x2ff>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xb9d(%rip),%xmm0
call   1080 <f2s@plt>
cmp    $0xffffffff,%eax
je     148c <test_float_to_integer+0x31c>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xb84(%rip),%xmm0
call   1080 <f2s@plt>
cmp    $0xffffffff,%eax
je     14a9 <test_float_to_integer+0x339>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xb6b(%rip),%xmm0
call   1080 <f2s@plt>
cmp    $0x80000000,%eax
je     14c8 <test_float_to_integer+0x358>
mov    $0x0,%al
call   1030 <abort@plt>
xorps  %xmm0,%xmm0
call   1050 <d2s@plt>
cmp    $0x0,%eax
je     14e0 <test_float_to_integer+0x370>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xb38(%rip),%xmm0
call   1050 <d2s@plt>
cmp    $0x0,%eax
je     14fd <test_float_to_integer+0x38d>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xb23(%rip),%xmm0
call   1050 <d2s@plt>
cmp    $0x1,%eax
je     151a <test_float_to_integer+0x3aa>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xb0e(%rip),%xmm0
call   1050 <d2s@plt>
cmp    $0x1,%eax
je     1537 <test_float_to_integer+0x3c7>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xb11(%rip),%xmm0
call   1050 <d2s@plt>
cmp    $0x0,%eax
je     1554 <test_float_to_integer+0x3e4>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xafc(%rip),%xmm0
call   1050 <d2s@plt>
cmp    $0xffffffff,%eax
je     1571 <test_float_to_integer+0x401>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xae7(%rip),%xmm0
call   1050 <d2s@plt>
cmp    $0xffffffff,%eax
je     158e <test_float_to_integer+0x41e>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xaaa(%rip),%xmm0
call   1050 <d2s@plt>
cmp    $0x7fffffff,%eax
je     15ad <test_float_to_integer+0x43d>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  0xab3(%rip),%xmm0
call   1050 <d2s@plt>
cmp    $0x80000000,%eax
je     15cc <test_float_to_integer+0x45c>
mov    $0x0,%al
call   1030 <abort@plt>
mov    %rsp,%rax
fldz
fstpt  (%rax)
call   1070 <ld2s@plt>
cmp    $0x0,%eax
je     15e8 <test_float_to_integer+0x478>
mov    $0x0,%al
call   1030 <abort@plt>
mov    %rsp,%rax
fldl   0xa2f(%rip)
fstpt  (%rax)
call   1070 <ld2s@plt>
cmp    $0x0,%eax
je     1608 <test_float_to_integer+0x498>
mov    $0x0,%al
call   1030 <abort@plt>
mov    %rsp,%rax
fld1
fstpt  (%rax)
call   1070 <ld2s@plt>
cmp    $0x1,%eax
je     1624 <test_float_to_integer+0x4b4>
mov    $0x0,%al
call   1030 <abort@plt>
mov    %rsp,%rax
fldl   0xa03(%rip)
fstpt  (%rax)
call   1070 <ld2s@plt>
cmp    $0x1,%eax
je     1644 <test_float_to_integer+0x4d4>
mov    $0x0,%al
call   1030 <abort@plt>
mov    %rsp,%rax
fldl   0xa03(%rip)
fstpt  (%rax)
call   1070 <ld2s@plt>
cmp    $0x0,%eax
je     1664 <test_float_to_integer+0x4f4>
mov    $0x0,%al
call   1030 <abort@plt>
mov    %rsp,%rax
fld1
fchs
fstpt  (%rax)
call   1070 <ld2s@plt>
cmp    $0xffffffff,%eax
je     1682 <test_float_to_integer+0x512>
mov    $0x0,%al
call   1030 <abort@plt>
mov    %rsp,%rax
fldl   0x9d5(%rip)
fstpt  (%rax)
call   1070 <ld2s@plt>
cmp    $0xffffffff,%eax
je     16a2 <test_float_to_integer+0x532>
mov    $0x0,%al
call   1030 <abort@plt>
mov    %rsp,%rax
fldl   0x995(%rip)
fstpt  (%rax)
call   1070 <ld2s@plt>
cmp    $0x7fffffff,%eax
je     16c4 <test_float_to_integer+0x554>
mov    $0x0,%al
call   1030 <abort@plt>
mov    %rsp,%rax
flds   0x94f(%rip)
fstpt  (%rax)
call   1070 <ld2s@plt>
cmp    $0x80000000,%eax
je     16e6 <test_float_to_integer+0x576>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_float_to_integer>:
sub    $0x58,%rsp
xorps  %xmm0,%xmm0
call   1090 <f2u@plt>
test   %eax,%eax
jne    1574 <test_float_to_integer+0x404>
movss  0xe74(%rip),%xmm0
call   1090 <f2u@plt>
test   %eax,%eax
jne    1574 <test_float_to_integer+0x404>
movss  0xe63(%rip),%xmm0
call   1090 <f2u@plt>
cmp    $0x1,%eax
jne    1574 <test_float_to_integer+0x404>
movss  0xe51(%rip),%xmm0
call   1090 <f2u@plt>
cmp    $0x1,%eax
jne    1574 <test_float_to_integer+0x404>
movss  0xe3f(%rip),%xmm0
call   1090 <f2u@plt>
cmp    $0x7fffffff,%eax
je     11f1 <test_float_to_integer+0x81>
movss  0xe2b(%rip),%xmm0
call   1090 <f2u@plt>
cmp    $0x80000000,%eax
jne    1574 <test_float_to_integer+0x404>
movss  0xe13(%rip),%xmm0
call   1090 <f2u@plt>
cmp    $0x80000000,%eax
jne    1574 <test_float_to_integer+0x404>
xorps  %xmm0,%xmm0
call   1040 <d2u@plt>
test   %eax,%eax
jne    1574 <test_float_to_integer+0x404>
movsd  0xdff(%rip),%xmm0
call   1040 <d2u@plt>
test   %eax,%eax
jne    1574 <test_float_to_integer+0x404>
movsd  0xdf2(%rip),%xmm0
call   1040 <d2u@plt>
cmp    $0x1,%eax
jne    1574 <test_float_to_integer+0x404>
movsd  0xde4(%rip),%xmm0
call   1040 <d2u@plt>
cmp    $0x1,%eax
jne    1574 <test_float_to_integer+0x404>
movsd  0xdd6(%rip),%xmm0
call   1040 <d2u@plt>
cmp    $0xffffffff,%eax
jne    1574 <test_float_to_integer+0x404>
movsd  0xdc8(%rip),%xmm0
call   1040 <d2u@plt>
cmp    $0x7fffffff,%eax
jne    1574 <test_float_to_integer+0x404>
movsd  0xdb8(%rip),%xmm0
call   1040 <d2u@plt>
cmp    $0x80000000,%eax
jne    1574 <test_float_to_integer+0x404>
fldz
fld    %st(0)
fstpt  0x4c(%rsp)
fstpt  (%rsp)
call   1060 <ld2u@plt>
test   %eax,%eax
jne    1574 <test_float_to_integer+0x404>
fldl   0xd62(%rip)
fld    %st(0)
fstpt  0x40(%rsp)
fstpt  (%rsp)
call   1060 <ld2u@plt>
test   %eax,%eax
jne    1574 <test_float_to_integer+0x404>
fld1
fld    %st(0)
fstpt  0x1c(%rsp)
fstpt  (%rsp)
call   1060 <ld2u@plt>
cmp    $0x1,%eax
jne    1574 <test_float_to_integer+0x404>
fldl   0xd3d(%rip)
fld    %st(0)
fstpt  0x34(%rsp)
fstpt  (%rsp)
call   1060 <ld2u@plt>
cmp    $0x1,%eax
jne    1574 <test_float_to_integer+0x404>
fldl   0xd28(%rip)
fstpt  (%rsp)
call   1060 <ld2u@plt>
cmp    $0xffffffff,%eax
jne    1574 <test_float_to_integer+0x404>
fldl   0xd19(%rip)
fld    %st(0)
fstpt  0x28(%rsp)
fstpt  (%rsp)
call   1060 <ld2u@plt>
cmp    $0x7fffffff,%eax
jne    1574 <test_float_to_integer+0x404>
flds   0xcc6(%rip)
fstpt  (%rsp)
call   1060 <ld2u@plt>
cmp    $0x80000000,%eax
jne    1574 <test_float_to_integer+0x404>
xorps  %xmm0,%xmm0
call   1080 <f2s@plt>
test   %eax,%eax
jne    1574 <test_float_to_integer+0x404>
movss  0xc8f(%rip),%xmm0
call   1080 <f2s@plt>
test   %eax,%eax
jne    1574 <test_float_to_integer+0x404>
movss  0xc7e(%rip),%xmm0
call   1080 <f2s@plt>
cmp    $0x1,%eax
jne    1574 <test_float_to_integer+0x404>
movss  0xc6c(%rip),%xmm0
call   1080 <f2s@plt>
cmp    $0x1,%eax
jne    1574 <test_float_to_integer+0x404>
movss  0xc5e(%rip),%xmm0
call   1080 <f2s@plt>
test   %eax,%eax
jne    1574 <test_float_to_integer+0x404>
movss  0xc4d(%rip),%xmm0
call   1080 <f2s@plt>
cmp    $0xffffffff,%eax
jne    1574 <test_float_to_integer+0x404>
movss  0xc3b(%rip),%xmm0
call   1080 <f2s@plt>
cmp    $0xffffffff,%eax
jne    1574 <test_float_to_integer+0x404>
movss  0xc29(%rip),%xmm0
call   1080 <f2s@plt>
cmp    $0x80000000,%eax
jne    1574 <test_float_to_integer+0x404>
xorps  %xmm0,%xmm0
call   1050 <d2s@plt>
test   %eax,%eax
jne    1574 <test_float_to_integer+0x404>
movsd  0xc05(%rip),%xmm0
call   1050 <d2s@plt>
test   %eax,%eax
jne    1574 <test_float_to_integer+0x404>
movsd  0xbf8(%rip),%xmm0
call   1050 <d2s@plt>
cmp    $0x1,%eax
jne    1574 <test_float_to_integer+0x404>
movsd  0xbea(%rip),%xmm0
call   1050 <d2s@plt>
cmp    $0x1,%eax
jne    1574 <test_float_to_integer+0x404>
movsd  0xbf4(%rip),%xmm0
call   1050 <d2s@plt>
test   %eax,%eax
jne    1574 <test_float_to_integer+0x404>
movsd  0xbe7(%rip),%xmm0
call   1050 <d2s@plt>
cmp    $0xffffffff,%eax
jne    1574 <test_float_to_integer+0x404>
movsd  0xbd9(%rip),%xmm0
call   1050 <d2s@plt>
cmp    $0xffffffff,%eax
jne    1574 <test_float_to_integer+0x404>
movsd  0xba3(%rip),%xmm0
call   1050 <d2s@plt>
cmp    $0x7fffffff,%eax
jne    1574 <test_float_to_integer+0x404>
movsd  0xbb3(%rip),%xmm0
call   1050 <d2s@plt>
cmp    $0x80000000,%eax
jne    1574 <test_float_to_integer+0x404>
fldt   0x4c(%rsp)
fstpt  (%rsp)
call   1070 <ld2s@plt>
test   %eax,%eax
jne    1574 <test_float_to_integer+0x404>
fldt   0x40(%rsp)
fstpt  (%rsp)
call   1070 <ld2s@plt>
test   %eax,%eax
jne    1574 <test_float_to_integer+0x404>
fldt   0x1c(%rsp)
fstpt  (%rsp)
call   1070 <ld2s@plt>
cmp    $0x1,%eax
jne    1574 <test_float_to_integer+0x404>
fldt   0x34(%rsp)
fstpt  (%rsp)
call   1070 <ld2s@plt>
cmp    $0x1,%eax
jne    1574 <test_float_to_integer+0x404>
fldl   0xb3b(%rip)
fstpt  (%rsp)
call   1070 <ld2s@plt>
test   %eax,%eax
jne    1574 <test_float_to_integer+0x404>
fldt   0x1c(%rsp)
fchs
fstpt  (%rsp)
call   1070 <ld2s@plt>
cmp    $0xffffffff,%eax
jne    1574 <test_float_to_integer+0x404>
fldl   0xb26(%rip)
fstpt  (%rsp)
call   1070 <ld2s@plt>
cmp    $0xffffffff,%eax
jne    1574 <test_float_to_integer+0x404>
fldt   0x28(%rsp)
fstpt  (%rsp)
call   1070 <ld2s@plt>
cmp    $0x7fffffff,%eax
jne    1574 <test_float_to_integer+0x404>
flds   0xabc(%rip)
fstpt  (%rsp)
call   1070 <ld2s@plt>
cmp    $0x80000000,%eax
jne    1574 <test_float_to_integer+0x404>
add    $0x58,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @test_float_to_integer() {
%1 = alloca i32
%2 = call i32 @f2u(float 0.000000e+00)
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @f2u(float 0x3FEFF7CEE0000000)
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %6
%12 = call i32 @f2u(float 1.000000e+00)
%13 = icmp ne i32 %12, 1
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (...) @abort()
unreachable
16: ; preds = %11
%17 = call i32 @f2u(float 0x3FFFD70A40000000)
%18 = icmp ne i32 %17, 1
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 (...) @abort()
unreachable
21: ; preds = %16
%22 = call i32 @f2u(float 0x41E0000000000000)
%23 = icmp ne i32 %22, 2147483647
br i1 %23, label %24, label %29
24: ; preds = %21
%25 = call i32 @f2u(float 0x41E0000000000000)
%26 = icmp ne i32 %25, -2147483648
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 (...) @abort()
unreachable
29: ; preds = %24, %21
%30 = call i32 @f2u(float 0x41E0000000000000)
%31 = icmp ne i32 %30, -2147483648
br i1 %31, label %32, label %34
32: ; preds = %29
%33 = call i32 (...) @abort()
unreachable
34: ; preds = %29
%35 = call i32 @d2u(double 0.000000e+00)
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %34
%38 = call i32 (...) @abort()
unreachable
39: ; preds = %34
%40 = call i32 @d2u(double 0x3FEFF7CED916872B)
%41 = icmp ne i32 %40, 0
br i1 %41, label %42, label %44
42: ; preds = %39
%43 = call i32 (...) @abort()
unreachable
44: ; preds = %39
%45 = call i32 @d2u(double 1.000000e+00)
%46 = icmp ne i32 %45, 1
br i1 %46, label %47, label %49
47: ; preds = %44
%48 = call i32 (...) @abort()
unreachable
49: ; preds = %44
%50 = call i32 @d2u(double 1.990000e+00)
%51 = icmp ne i32 %50, 1
br i1 %51, label %52, label %54
52: ; preds = %49
%53 = call i32 (...) @abort()
unreachable
54: ; preds = %49
%55 = call i32 @d2u(double 0x41EFFFFFFFE00000)
%56 = icmp ne i32 %55, -1
br i1 %56, label %57, label %59
57: ; preds = %54
%58 = call i32 (...) @abort()
unreachable
59: ; preds = %54
%60 = call i32 @d2u(double 0x41DFFFFFFFC00000)
%61 = icmp ne i32 %60, 2147483647
br i1 %61, label %62, label %64
62: ; preds = %59
%63 = call i32 (...) @abort()
unreachable
64: ; preds = %59
%65 = call i32 @d2u(double 0x41E0000000000000)
%66 = icmp ne i32 %65, -2147483648
br i1 %66, label %67, label %69
67: ; preds = %64
%68 = call i32 (...) @abort()
unreachable
69: ; preds = %64
%70 = call i32 @ld2u(x86_fp80 0xK00000000000000000000)
%71 = icmp ne i32 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %69
%73 = call i32 (...) @abort()
unreachable
74: ; preds = %69
%75 = call i32 @ld2u(x86_fp80 0xK3FFEFFBE76C8B4395800)
%76 = icmp ne i32 %75, 0
br i1 %76, label %77, label %79
77: ; preds = %74
%78 = call i32 (...) @abort()
unreachable
79: ; preds = %74
%80 = call i32 @ld2u(x86_fp80 0xK3FFF8000000000000000)
%81 = icmp ne i32 %80, 1
br i1 %81, label %82, label %84
82: ; preds = %79
%83 = call i32 (...) @abort()
unreachable
84: ; preds = %79
%85 = call i32 @ld2u(x86_fp80 0xK3FFFFEB851EB851EB800)
%86 = icmp ne i32 %85, 1
br i1 %86, label %87, label %89
87: ; preds = %84
%88 = call i32 (...) @abort()
unreachable
89: ; preds = %84
%90 = call i32 @ld2u(x86_fp80 0xK401EFFFFFFFF00000000)
%91 = icmp ne i32 %90, -1
br i1 %91, label %92, label %94
92: ; preds = %89
%93 = call i32 (...) @abort()
unreachable
94: ; preds = %89
%95 = call i32 @ld2u(x86_fp80 0xK401DFFFFFFFE00000000)
%96 = icmp ne i32 %95, 2147483647
br i1 %96, label %97, label %99
97: ; preds = %94
%98 = call i32 (...) @abort()
unreachable
99: ; preds = %94
%100 = call i32 @ld2u(x86_fp80 0xK401E8000000000000000)
%101 = icmp ne i32 %100, -2147483648
br i1 %101, label %102, label %104
102: ; preds = %99
%103 = call i32 (...) @abort()
unreachable
104: ; preds = %99
%105 = call i32 @f2s(float 0.000000e+00)
%106 = icmp ne i32 %105, 0
br i1 %106, label %107, label %109
107: ; preds = %104
%108 = call i32 (...) @abort()
unreachable
109: ; preds = %104
%110 = call i32 @f2s(float 0x3FEFF7CEE0000000)
%111 = icmp ne i32 %110, 0
br i1 %111, label %112, label %114
112: ; preds = %109
%113 = call i32 (...) @abort()
unreachable
114: ; preds = %109
%115 = call i32 @f2s(float 1.000000e+00)
%116 = icmp ne i32 %115, 1
br i1 %116, label %117, label %119
117: ; preds = %114
%118 = call i32 (...) @abort()
unreachable
119: ; preds = %114
%120 = call i32 @f2s(float 0x3FFFD70A40000000)
%121 = icmp ne i32 %120, 1
br i1 %121, label %122, label %124
122: ; preds = %119
%123 = call i32 (...) @abort()
unreachable
124: ; preds = %119
%125 = call i32 @f2s(float 0xBFEFF7CEE0000000)
%126 = icmp ne i32 %125, 0
br i1 %126, label %127, label %129
127: ; preds = %124
%128 = call i32 (...) @abort()
unreachable
129: ; preds = %124
%130 = call i32 @f2s(float -1.000000e+00)
%131 = icmp ne i32 %130, -1
br i1 %131, label %132, label %134
132: ; preds = %129
%133 = call i32 (...) @abort()
unreachable
134: ; preds = %129
%135 = call i32 @f2s(float 0xBFFFD70A40000000)
%136 = icmp ne i32 %135, -1
br i1 %136, label %137, label %139
137: ; preds = %134
%138 = call i32 (...) @abort()
unreachable
139: ; preds = %134
%140 = call i32 @f2s(float 0xC1E0000000000000)
%141 = icmp ne i32 %140, -2147483648
br i1 %141, label %142, label %144
142: ; preds = %139
%143 = call i32 (...) @abort()
unreachable
144: ; preds = %139
%145 = call i32 @d2s(double 0.000000e+00)
%146 = icmp ne i32 %145, 0
br i1 %146, label %147, label %149
147: ; preds = %144
%148 = call i32 (...) @abort()
unreachable
149: ; preds = %144
%150 = call i32 @d2s(double 0x3FEFF7CED916872B)
%151 = icmp ne i32 %150, 0
br i1 %151, label %152, label %154
152: ; preds = %149
%153 = call i32 (...) @abort()
unreachable
154: ; preds = %149
%155 = call i32 @d2s(double 1.000000e+00)
%156 = icmp ne i32 %155, 1
br i1 %156, label %157, label %159
157: ; preds = %154
%158 = call i32 (...) @abort()
unreachable
159: ; preds = %154
%160 = call i32 @d2s(double 1.990000e+00)
%161 = icmp ne i32 %160, 1
br i1 %161, label %162, label %164
162: ; preds = %159
%163 = call i32 (...) @abort()
unreachable
164: ; preds = %159
%165 = call i32 @d2s(double 0xBFEFF7CED916872B)
%166 = icmp ne i32 %165, 0
br i1 %166, label %167, label %169
167: ; preds = %164
%168 = call i32 (...) @abort()
unreachable
169: ; preds = %164
%170 = call i32 @d2s(double -1.000000e+00)
%171 = icmp ne i32 %170, -1
br i1 %171, label %172, label %174
172: ; preds = %169
%173 = call i32 (...) @abort()
unreachable
174: ; preds = %169
%175 = call i32 @d2s(double -1.990000e+00)
%176 = icmp ne i32 %175, -1
br i1 %176, label %177, label %179
177: ; preds = %174
%178 = call i32 (...) @abort()
unreachable
179: ; preds = %174
%180 = call i32 @d2s(double 0x41DFFFFFFFC00000)
%181 = icmp ne i32 %180, 2147483647
br i1 %181, label %182, label %184
182: ; preds = %179
%183 = call i32 (...) @abort()
unreachable
184: ; preds = %179
%185 = call i32 @d2s(double 0xC1E0000000000000)
%186 = icmp ne i32 %185, -2147483648
br i1 %186, label %187, label %189
187: ; preds = %184
%188 = call i32 (...) @abort()
unreachable
189: ; preds = %184
%190 = call i32 @ld2s(x86_fp80 0xK00000000000000000000)
%191 = icmp ne i32 %190, 0
br i1 %191, label %192, label %194
192: ; preds = %189
%193 = call i32 (...) @abort()
unreachable
194: ; preds = %189
%195 = call i32 @ld2s(x86_fp80 0xK3FFEFFBE76C8B4395800)
%196 = icmp ne i32 %195, 0
br i1 %196, label %197, label %199
197: ; preds = %194
%198 = call i32 (...) @abort()
unreachable
199: ; preds = %194
%200 = call i32 @ld2s(x86_fp80 0xK3FFF8000000000000000)
%201 = icmp ne i32 %200, 1
br i1 %201, label %202, label %204
202: ; preds = %199
%203 = call i32 (...) @abort()
unreachable
204: ; preds = %199
%205 = call i32 @ld2s(x86_fp80 0xK3FFFFEB851EB851EB800)
%206 = icmp ne i32 %205, 1
br i1 %206, label %207, label %209
207: ; preds = %204
%208 = call i32 (...) @abort()
unreachable
209: ; preds = %204
%210 = call i32 @ld2s(x86_fp80 0xKBFFEFFBE76C8B4395800)
%211 = icmp ne i32 %210, 0
br i1 %211, label %212, label %214
212: ; preds = %209
%213 = call i32 (...) @abort()
unreachable
214: ; preds = %209
%215 = call i32 @ld2s(x86_fp80 0xKBFFF8000000000000000)
%216 = icmp ne i32 %215, -1
br i1 %216, label %217, label %219
217: ; preds = %214
%218 = call i32 (...) @abort()
unreachable
219: ; preds = %214
%220 = call i32 @ld2s(x86_fp80 0xKBFFFFEB851EB851EB800)
%221 = icmp ne i32 %220, -1
br i1 %221, label %222, label %224
222: ; preds = %219
%223 = call i32 (...) @abort()
unreachable
224: ; preds = %219
%225 = call i32 @ld2s(x86_fp80 0xK401DFFFFFFFE00000000)
%226 = icmp ne i32 %225, 2147483647
br i1 %226, label %227, label %229
227: ; preds = %224
%228 = call i32 (...) @abort()
unreachable
229: ; preds = %224
%230 = call i32 @ld2s(x86_fp80 0xKC01E8000000000000000)
%231 = icmp ne i32 %230, -2147483648
br i1 %231, label %232, label %234
232: ; preds = %229
%233 = call i32 (...) @abort()
unreachable
234: ; preds = %229
%235 = load i32, i32* %1
ret i32 %235
}

LLVM IR (-O2):
define i32 @test_float_to_integer() {
%1 = tail call i32 @f2u(float 0.000000e+00)
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @f2u(float 0x3FEFF7CEE0000000)
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = tail call i32 @f2u(float 1.000000e+00)
%12 = icmp eq i32 %11, 1
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 (...) @abort()
unreachable
15: ; preds = %10
%16 = tail call i32 @f2u(float 0x3FFFD70A40000000)
%17 = icmp eq i32 %16, 1
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 (...) @abort()
unreachable
20: ; preds = %15
%21 = tail call i32 @f2u(float 0x41E0000000000000)
%22 = icmp eq i32 %21, 2147483647
br i1 %22, label %28, label %23
23: ; preds = %20
%24 = tail call i32 @f2u(float 0x41E0000000000000)
%25 = icmp eq i32 %24, -2147483648
br i1 %25, label %28, label %26
26: ; preds = %23
%27 = tail call i32 (...) @abort()
unreachable
28: ; preds = %23, %20
%29 = tail call i32 @f2u(float 0x41E0000000000000)
%30 = icmp eq i32 %29, -2147483648
br i1 %30, label %33, label %31
31: ; preds = %28
%32 = tail call i32 (...) @abort()
unreachable
33: ; preds = %28
%34 = tail call i32 @d2u(double 0.000000e+00)
%35 = icmp eq i32 %34, 0
br i1 %35, label %38, label %36
36: ; preds = %33
%37 = tail call i32 (...) @abort()
unreachable
38: ; preds = %33
%39 = tail call i32 @d2u(double 0x3FEFF7CED916872B)
%40 = icmp eq i32 %39, 0
br i1 %40, label %43, label %41
41: ; preds = %38
%42 = tail call i32 (...) @abort()
unreachable
43: ; preds = %38
%44 = tail call i32 @d2u(double 1.000000e+00)
%45 = icmp eq i32 %44, 1
br i1 %45, label %48, label %46
46: ; preds = %43
%47 = tail call i32 (...) @abort()
unreachable
48: ; preds = %43
%49 = tail call i32 @d2u(double 1.990000e+00)
%50 = icmp eq i32 %49, 1
br i1 %50, label %53, label %51
51: ; preds = %48
%52 = tail call i32 (...) @abort()
unreachable
53: ; preds = %48
%54 = tail call i32 @d2u(double 0x41EFFFFFFFE00000)
%55 = icmp eq i32 %54, -1
br i1 %55, label %58, label %56
56: ; preds = %53
%57 = tail call i32 (...) @abort()
unreachable
58: ; preds = %53
%59 = tail call i32 @d2u(double 0x41DFFFFFFFC00000)
%60 = icmp eq i32 %59, 2147483647
br i1 %60, label %63, label %61
61: ; preds = %58
%62 = tail call i32 (...) @abort()
unreachable
63: ; preds = %58
%64 = tail call i32 @d2u(double 0x41E0000000000000)
%65 = icmp eq i32 %64, -2147483648
br i1 %65, label %68, label %66
66: ; preds = %63
%67 = tail call i32 (...) @abort()
unreachable
68: ; preds = %63
%69 = tail call i32 @ld2u(x86_fp80 0xK00000000000000000000)
%70 = icmp eq i32 %69, 0
br i1 %70, label %73, label %71
71: ; preds = %68
%72 = tail call i32 (...) @abort()
unreachable
73: ; preds = %68
%74 = tail call i32 @ld2u(x86_fp80 0xK3FFEFFBE76C8B4395800)
%75 = icmp eq i32 %74, 0
br i1 %75, label %78, label %76
76: ; preds = %73
%77 = tail call i32 (...) @abort()
unreachable
78: ; preds = %73
%79 = tail call i32 @ld2u(x86_fp80 0xK3FFF8000000000000000)
%80 = icmp eq i32 %79, 1
br i1 %80, label %83, label %81
81: ; preds = %78
%82 = tail call i32 (...) @abort()
unreachable
83: ; preds = %78
%84 = tail call i32 @ld2u(x86_fp80 0xK3FFFFEB851EB851EB800)
%85 = icmp eq i32 %84, 1
br i1 %85, label %88, label %86
86: ; preds = %83
%87 = tail call i32 (...) @abort()
unreachable
88: ; preds = %83
%89 = tail call i32 @ld2u(x86_fp80 0xK401EFFFFFFFF00000000)
%90 = icmp eq i32 %89, -1
br i1 %90, label %93, label %91
91: ; preds = %88
%92 = tail call i32 (...) @abort()
unreachable
93: ; preds = %88
%94 = tail call i32 @ld2u(x86_fp80 0xK401DFFFFFFFE00000000)
%95 = icmp eq i32 %94, 2147483647
br i1 %95, label %98, label %96
96: ; preds = %93
%97 = tail call i32 (...) @abort()
unreachable
98: ; preds = %93
%99 = tail call i32 @ld2u(x86_fp80 0xK401E8000000000000000)
%100 = icmp eq i32 %99, -2147483648
br i1 %100, label %103, label %101
101: ; preds = %98
%102 = tail call i32 (...) @abort()
unreachable
103: ; preds = %98
%104 = tail call i32 @f2s(float 0.000000e+00)
%105 = icmp eq i32 %104, 0
br i1 %105, label %108, label %106
106: ; preds = %103
%107 = tail call i32 (...) @abort()
unreachable
108: ; preds = %103
%109 = tail call i32 @f2s(float 0x3FEFF7CEE0000000)
%110 = icmp eq i32 %109, 0
br i1 %110, label %113, label %111
111: ; preds = %108
%112 = tail call i32 (...) @abort()
unreachable
113: ; preds = %108
%114 = tail call i32 @f2s(float 1.000000e+00)
%115 = icmp eq i32 %114, 1
br i1 %115, label %118, label %116
116: ; preds = %113
%117 = tail call i32 (...) @abort()
unreachable
118: ; preds = %113
%119 = tail call i32 @f2s(float 0x3FFFD70A40000000)
%120 = icmp eq i32 %119, 1
br i1 %120, label %123, label %121
121: ; preds = %118
%122 = tail call i32 (...) @abort()
unreachable
123: ; preds = %118
%124 = tail call i32 @f2s(float 0xBFEFF7CEE0000000)
%125 = icmp eq i32 %124, 0
br i1 %125, label %128, label %126
126: ; preds = %123
%127 = tail call i32 (...) @abort()
unreachable
128: ; preds = %123
%129 = tail call i32 @f2s(float -1.000000e+00)
%130 = icmp eq i32 %129, -1
br i1 %130, label %133, label %131
131: ; preds = %128
%132 = tail call i32 (...) @abort()
unreachable
133: ; preds = %128
%134 = tail call i32 @f2s(float 0xBFFFD70A40000000)
%135 = icmp eq i32 %134, -1
br i1 %135, label %138, label %136
136: ; preds = %133
%137 = tail call i32 (...) @abort()
unreachable
138: ; preds = %133
%139 = tail call i32 @f2s(float 0xC1E0000000000000)
%140 = icmp eq i32 %139, -2147483648
br i1 %140, label %143, label %141
141: ; preds = %138
%142 = tail call i32 (...) @abort()
unreachable
143: ; preds = %138
%144 = tail call i32 @d2s(double 0.000000e+00)
%145 = icmp eq i32 %144, 0
br i1 %145, label %148, label %146
146: ; preds = %143
%147 = tail call i32 (...) @abort()
unreachable
148: ; preds = %143
%149 = tail call i32 @d2s(double 0x3FEFF7CED916872B)
%150 = icmp eq i32 %149, 0
br i1 %150, label %153, label %151
151: ; preds = %148
%152 = tail call i32 (...) @abort()
unreachable
153: ; preds = %148
%154 = tail call i32 @d2s(double 1.000000e+00)
%155 = icmp eq i32 %154, 1
br i1 %155, label %158, label %156
156: ; preds = %153
%157 = tail call i32 (...) @abort()
unreachable
158: ; preds = %153
%159 = tail call i32 @d2s(double 1.990000e+00)
%160 = icmp eq i32 %159, 1
br i1 %160, label %163, label %161
161: ; preds = %158
%162 = tail call i32 (...) @abort()
unreachable
163: ; preds = %158
%164 = tail call i32 @d2s(double 0xBFEFF7CED916872B)
%165 = icmp eq i32 %164, 0
br i1 %165, label %168, label %166
166: ; preds = %163
%167 = tail call i32 (...) @abort()
unreachable
168: ; preds = %163
%169 = tail call i32 @d2s(double -1.000000e+00)
%170 = icmp eq i32 %169, -1
br i1 %170, label %173, label %171
171: ; preds = %168
%172 = tail call i32 (...) @abort()
unreachable
173: ; preds = %168
%174 = tail call i32 @d2s(double -1.990000e+00)
%175 = icmp eq i32 %174, -1
br i1 %175, label %178, label %176
176: ; preds = %173
%177 = tail call i32 (...) @abort()
unreachable
178: ; preds = %173
%179 = tail call i32 @d2s(double 0x41DFFFFFFFC00000)
%180 = icmp eq i32 %179, 2147483647
br i1 %180, label %183, label %181
181: ; preds = %178
%182 = tail call i32 (...) @abort()
unreachable
183: ; preds = %178
%184 = tail call i32 @d2s(double 0xC1E0000000000000)
%185 = icmp eq i32 %184, -2147483648
br i1 %185, label %188, label %186
186: ; preds = %183
%187 = tail call i32 (...) @abort()
unreachable
188: ; preds = %183
%189 = tail call i32 @ld2s(x86_fp80 0xK00000000000000000000)
%190 = icmp eq i32 %189, 0
br i1 %190, label %193, label %191
191: ; preds = %188
%192 = tail call i32 (...) @abort()
unreachable
193: ; preds = %188
%194 = tail call i32 @ld2s(x86_fp80 0xK3FFEFFBE76C8B4395800)
%195 = icmp eq i32 %194, 0
br i1 %195, label %198, label %196
196: ; preds = %193
%197 = tail call i32 (...) @abort()
unreachable
198: ; preds = %193
%199 = tail call i32 @ld2s(x86_fp80 0xK3FFF8000000000000000)
%200 = icmp eq i32 %199, 1
br i1 %200, label %203, label %201
201: ; preds = %198
%202 = tail call i32 (...) @abort()
unreachable
203: ; preds = %198
%204 = tail call i32 @ld2s(x86_fp80 0xK3FFFFEB851EB851EB800)
%205 = icmp eq i32 %204, 1
br i1 %205, label %208, label %206
206: ; preds = %203
%207 = tail call i32 (...) @abort()
unreachable
208: ; preds = %203
%209 = tail call i32 @ld2s(x86_fp80 0xKBFFEFFBE76C8B4395800)
%210 = icmp eq i32 %209, 0
br i1 %210, label %213, label %211
211: ; preds = %208
%212 = tail call i32 (...) @abort()
unreachable
213: ; preds = %208
%214 = tail call i32 @ld2s(x86_fp80 0xKBFFF8000000000000000)
%215 = icmp eq i32 %214, -1
br i1 %215, label %218, label %216
216: ; preds = %213
%217 = tail call i32 (...) @abort()
unreachable
218: ; preds = %213
%219 = tail call i32 @ld2s(x86_fp80 0xKBFFFFEB851EB851EB800)
%220 = icmp eq i32 %219, -1
br i1 %220, label %223, label %221
221: ; preds = %218
%222 = tail call i32 (...) @abort()
unreachable
223: ; preds = %218
%224 = tail call i32 @ld2s(x86_fp80 0xK401DFFFFFFFE00000000)
%225 = icmp eq i32 %224, 2147483647
br i1 %225, label %228, label %226
226: ; preds = %223
%227 = tail call i32 (...) @abort()
unreachable
228: ; preds = %223
%229 = tail call i32 @ld2s(x86_fp80 0xKC01E8000000000000000)
%230 = icmp eq i32 %229, -2147483648
br i1 %230, label %233, label %231
231: ; preds = %228
%232 = tail call i32 (...) @abort()
unreachable
233: ; preds = %228
ret i32 undef
}