int main() {
  if (test__truncsfhf2(makeQNaN32(), UINT16_C(0x7e00)))
    return 1;
  if (test__truncsfhf2(makeNaN32(UINT32_C(0x8000)), UINT16_C(0x7e00)))
    return 1;
  if (test__truncsfhf2(makeInf32(), UINT16_C(0x7c00)))
    return 1;
  if (test__truncsfhf2(-makeInf32(), UINT16_C(0xfc00)))
    return 1;
  if (test__truncsfhf2(0.0f, UINT16_C(0x0)))
    return 1;
  if (test__truncsfhf2(-0.0f, UINT16_C(0x8000)))
    return 1;
  if (test__truncsfhf2(3.1415926535f, UINT16_C(0x4248)))
    return 1;
  if (test__truncsfhf2(-3.1415926535f, UINT16_C(0xc248)))
    return 1;
  if (test__truncsfhf2(0x1.987124876876324p+100f, UINT16_C(0x7c00)))
    return 1;
  if (test__truncsfhf2(0x1.987124876876324p+12f, UINT16_C(0x6e62)))
    return 1;
  if (test__truncsfhf2(0x1.0p+0f, UINT16_C(0x3c00)))
    return 1;
  if (test__truncsfhf2(0x1.0p-14f, UINT16_C(0x0400)))
    return 1;
  if (test__truncsfhf2(0x1.0p-20f, UINT16_C(0x0010)))
    return 1;
  if (test__truncsfhf2(0x1.0p-24f, UINT16_C(0x0001)))
    return 1;
  if (test__truncsfhf2(-0x1.0p-24f, UINT16_C(0x8001)))
    return 1;
  if (test__truncsfhf2(0x1.5p-25f, UINT16_C(0x0001)))
    return 1;
  if (test__truncsfhf2(0x1.0p-25f, UINT16_C(0x0000)))
    return 1;
  if (test__truncsfhf2(-0x1.0p-25f, UINT16_C(0x8000)))
    return 1;
  if (test__truncsfhf2(65504.0f, UINT16_C(0x7bff)))
    return 1;
  if (test__truncsfhf2(65519.0f, UINT16_C(0x7bff)))
    return 1;
  if (test__truncsfhf2(65520.0f, UINT16_C(0x7c00)))
    return 1;
  if (test__truncsfhf2(65536.0f, UINT16_C(0x7c00)))
    return 1;
  if (test__truncsfhf2(-65520.0f, UINT16_C(0xfc00)))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <makeQNaN32@plt>
mov    %eax,-0x8(%rbp)
mov    $0x7e00,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
mov    $0x0,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     11a6 <main+0x46>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0x8000,%edi
mov    $0x0,%al
call   1070 <UINT32_C@plt>
mov    %eax,%edi
mov    $0x0,%al
call   1040 <makeNaN32@plt>
mov    %eax,-0xc(%rbp)
mov    $0x7e00,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
mov    $0x0,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     11eb <main+0x8b>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0x0,%al
call   1060 <makeInf32@plt>
mov    %eax,-0x10(%rbp)
mov    $0x7c00,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
mov    $0x0,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     1222 <main+0xc2>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0x0,%al
call   1060 <makeInf32@plt>
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    $0xfc00,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
mov    $0x0,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     125f <main+0xff>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
xorps  %xmm0,%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     1289 <main+0x129>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0x8000,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
movsd  0xd61(%rip),%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     12bb <main+0x15b>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0x4248,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
movsd  0xd37(%rip),%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     12ed <main+0x18d>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0xc248,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
movsd  0xd0d(%rip),%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     131f <main+0x1bf>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0x7c00,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
movsd  0xce3(%rip),%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     1351 <main+0x1f1>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0x6e62,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
movsd  0xcb9(%rip),%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     1383 <main+0x223>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0x3c00,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
movsd  0xc8f(%rip),%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     13b5 <main+0x255>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0x400,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
movsd  0xc65(%rip),%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     13e7 <main+0x287>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0x10,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
movsd  0xc3b(%rip),%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     1419 <main+0x2b9>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0x1,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
movsd  0xc11(%rip),%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     144b <main+0x2eb>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0x8001,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
movsd  0xbe7(%rip),%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     147d <main+0x31d>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0x1,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
movsd  0xbbd(%rip),%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     14af <main+0x34f>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
xor    %edi,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
movsd  0xb96(%rip),%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     14de <main+0x37e>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0x8000,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
movsd  0xb6c(%rip),%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     1510 <main+0x3b0>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0x7bff,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
movsd  0xb42(%rip),%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     1542 <main+0x3e2>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0x7bff,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
movsd  0xb18(%rip),%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     1574 <main+0x414>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0x7c00,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
movsd  0xaee(%rip),%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     15a6 <main+0x446>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0x7c00,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
movsd  0xac4(%rip),%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     15d8 <main+0x478>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
mov    $0xfc00,%edi
mov    $0x0,%al
call   1080 <UINT16_C@plt>
mov    %eax,%edi
movsd  0xa9a(%rip),%xmm0
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
cmp    $0x0,%eax
je     160a <main+0x4aa>
movl   $0x1,-0x4(%rbp)
jmp    1611 <main+0x4b1>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <makeQNaN32@plt>
mov    %eax,%ebx
mov    $0x7e00,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
mov    %ebx,%edi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <test__truncsfhf2@plt>
mov    $0x1,%ebx
test   %eax,%eax
jne    14c9 <main+0x369>
mov    $0x8000,%edi
xor    %eax,%eax
call   1070 <UINT32_C@plt>
mov    %eax,%edi
xor    %eax,%eax
call   1040 <makeNaN32@plt>
mov    %eax,%ebp
mov    $0x7e00,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
mov    %ebp,%edi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
xor    %eax,%eax
call   1060 <makeInf32@plt>
mov    %eax,%ebp
mov    $0x7c00,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
mov    %ebp,%edi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
xor    %eax,%eax
call   1060 <makeInf32@plt>
mov    %eax,%ebp
neg    %ebp
mov    $0xfc00,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
mov    %ebp,%edi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
xor    %edi,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
xorps  %xmm0,%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
mov    $0x8000,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
movsd  0xdb7(%rip),%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
mov    $0x4248,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
movsd  0xd9a(%rip),%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
mov    $0xc248,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
movsd  0xd7d(%rip),%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
mov    $0x7c00,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
movsd  0xd60(%rip),%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
mov    $0x6e62,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
movsd  0xd43(%rip),%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
mov    $0x3c00,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
movsd  0xd26(%rip),%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
mov    $0x400,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
movsd  0xd09(%rip),%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
mov    $0x10,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
movsd  0xcec(%rip),%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
mov    $0x1,%ebx
mov    $0x1,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
movsd  0xcca(%rip),%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
mov    $0x8001,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
movsd  0xcad(%rip),%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
mov    $0x1,%ebx
mov    $0x1,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
movsd  0xc8b(%rip),%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
xor    %edi,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
movsd  0xc71(%rip),%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
mov    $0x8000,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
movsd  0xc54(%rip),%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
mov    $0x7bff,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
movsd  0xc37(%rip),%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
mov    $0x7bff,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
movsd  0xc1a(%rip),%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
mov    $0x7c00,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
movsd  0xc01(%rip),%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
mov    $0x7c00,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
movsd  0xbe8(%rip),%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
test   %eax,%eax
jne    14c9 <main+0x369>
mov    $0xfc00,%edi
xor    %eax,%eax
call   1080 <UINT16_C@plt>
movsd  0xbcf(%rip),%xmm0
mov    %eax,%edi
mov    $0x1,%al
call   1050 <test__truncsfhf2@plt>
xor    %ebx,%ebx
test   %eax,%eax
setne  %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @makeQNaN32()
%3 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 32256)
%4 = call i32 (i32, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (i32, i32, ...)*)(i32 %2, i32 %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 1, i32* %1
br label %123
7: ; preds = %0
%8 = call i32 (i32, ...) bitcast (i32 (...)* @UINT32_C to i32 (i32, ...)*)(i32 32768)
%9 = call i32 (i32, ...) bitcast (i32 (...)* @makeNaN32 to i32 (i32, ...)*)(i32 %8)
%10 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 32256)
%11 = call i32 (i32, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (i32, i32, ...)*)(i32 %9, i32 %10)
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %7
store i32 1, i32* %1
br label %123
14: ; preds = %7
%15 = call i32 (...) @makeInf32()
%16 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 31744)
%17 = call i32 (i32, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (i32, i32, ...)*)(i32 %15, i32 %16)
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %14
store i32 1, i32* %1
br label %123
20: ; preds = %14
%21 = call i32 (...) @makeInf32()
%22 = sub nsw i32 0, %21
%23 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 64512)
%24 = call i32 (i32, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (i32, i32, ...)*)(i32 %22, i32 %23)
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %27
26: ; preds = %20
store i32 1, i32* %1
br label %123
27: ; preds = %20
%28 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 0)
%29 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0.000000e+00, i32 %28)
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %27
store i32 1, i32* %1
br label %123
32: ; preds = %27
%33 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 32768)
%34 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double -0.000000e+00, i32 %33)
%35 = icmp ne i32 %34, 0
br i1 %35, label %36, label %37
36: ; preds = %32
store i32 1, i32* %1
br label %123
37: ; preds = %32
%38 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 16968)
%39 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0x400921FB60000000, i32 %38)
%40 = icmp ne i32 %39, 0
br i1 %40, label %41, label %42
41: ; preds = %37
store i32 1, i32* %1
br label %123
42: ; preds = %37
%43 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 49736)
%44 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0xC00921FB60000000, i32 %43)
%45 = icmp ne i32 %44, 0
br i1 %45, label %46, label %47
46: ; preds = %42
store i32 1, i32* %1
br label %123
47: ; preds = %42
%48 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 31744)
%49 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0x4639871240000000, i32 %48)
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %52
51: ; preds = %47
store i32 1, i32* %1
br label %123
52: ; preds = %47
%53 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 28258)
%54 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0x40B9871240000000, i32 %53)
%55 = icmp ne i32 %54, 0
br i1 %55, label %56, label %57
56: ; preds = %52
store i32 1, i32* %1
br label %123
57: ; preds = %52
%58 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 15360)
%59 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 1.000000e+00, i32 %58)
%60 = icmp ne i32 %59, 0
br i1 %60, label %61, label %62
61: ; preds = %57
store i32 1, i32* %1
br label %123
62: ; preds = %57
%63 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 1024)
%64 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0x3F10000000000000, i32 %63)
%65 = icmp ne i32 %64, 0
br i1 %65, label %66, label %67
66: ; preds = %62
store i32 1, i32* %1
br label %123
67: ; preds = %62
%68 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 16)
%69 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0x3EB0000000000000, i32 %68)
%70 = icmp ne i32 %69, 0
br i1 %70, label %71, label %72
71: ; preds = %67
store i32 1, i32* %1
br label %123
72: ; preds = %67
%73 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 1)
%74 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0x3E70000000000000, i32 %73)
%75 = icmp ne i32 %74, 0
br i1 %75, label %76, label %77
76: ; preds = %72
store i32 1, i32* %1
br label %123
77: ; preds = %72
%78 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 32769)
%79 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0xBE70000000000000, i32 %78)
%80 = icmp ne i32 %79, 0
br i1 %80, label %81, label %82
81: ; preds = %77
store i32 1, i32* %1
br label %123
82: ; preds = %77
%83 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 1)
%84 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0x3E65000000000000, i32 %83)
%85 = icmp ne i32 %84, 0
br i1 %85, label %86, label %87
86: ; preds = %82
store i32 1, i32* %1
br label %123
87: ; preds = %82
%88 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 0)
%89 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0x3E60000000000000, i32 %88)
%90 = icmp ne i32 %89, 0
br i1 %90, label %91, label %92
91: ; preds = %87
store i32 1, i32* %1
br label %123
92: ; preds = %87
%93 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 32768)
%94 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0xBE60000000000000, i32 %93)
%95 = icmp ne i32 %94, 0
br i1 %95, label %96, label %97
96: ; preds = %92
store i32 1, i32* %1
br label %123
97: ; preds = %92
%98 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 31743)
%99 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 6.550400e+04, i32 %98)
%100 = icmp ne i32 %99, 0
br i1 %100, label %101, label %102
101: ; preds = %97
store i32 1, i32* %1
br label %123
102: ; preds = %97
%103 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 31743)
%104 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 6.551900e+04, i32 %103)
%105 = icmp ne i32 %104, 0
br i1 %105, label %106, label %107
106: ; preds = %102
store i32 1, i32* %1
br label %123
107: ; preds = %102
%108 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 31744)
%109 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 6.552000e+04, i32 %108)
%110 = icmp ne i32 %109, 0
br i1 %110, label %111, label %112
111: ; preds = %107
store i32 1, i32* %1
br label %123
112: ; preds = %107
%113 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 31744)
%114 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 6.553600e+04, i32 %113)
%115 = icmp ne i32 %114, 0
br i1 %115, label %116, label %117
116: ; preds = %112
store i32 1, i32* %1
br label %123
117: ; preds = %112
%118 = call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 64512)
%119 = call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double -6.552000e+04, i32 %118)
%120 = icmp ne i32 %119, 0
br i1 %120, label %121, label %122
121: ; preds = %117
store i32 1, i32* %1
br label %123
122: ; preds = %117
store i32 0, i32* %1
br label %123
123: ; preds = %122, %121, %116, %111, %106, %101, %96, %91, %86, %81, %76, %71, %66, %61, %56, %51, %46, %41, %36, %31, %26, %19, %13, %6
%124 = load i32, i32* %1
ret i32 %124
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @makeQNaN32()
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 32256)
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (i32, i32, ...)*)(i32 %1, i32 %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %99
5: ; preds = %0
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT32_C to i32 (i32, ...)*)(i32 32768)
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @makeNaN32 to i32 (i32, ...)*)(i32 %6)
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 32256)
%9 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (i32, i32, ...)*)(i32 %7, i32 %8)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %99
11: ; preds = %5
%12 = tail call i32 (...) @makeInf32()
%13 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 31744)
%14 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (i32, i32, ...)*)(i32 %12, i32 %13)
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %99
16: ; preds = %11
%17 = tail call i32 (...) @makeInf32()
%18 = sub nsw i32 0, %17
%19 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 64512)
%20 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (i32, i32, ...)*)(i32 %18, i32 %19)
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %99
22: ; preds = %16
%23 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 0)
%24 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0.000000e+00, i32 %23)
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %99
26: ; preds = %22
%27 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 32768)
%28 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double -0.000000e+00, i32 %27)
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %99
30: ; preds = %26
%31 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 16968)
%32 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0x400921FB60000000, i32 %31)
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %99
34: ; preds = %30
%35 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 49736)
%36 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0xC00921FB60000000, i32 %35)
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %99
38: ; preds = %34
%39 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 31744)
%40 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0x4639871240000000, i32 %39)
%41 = icmp eq i32 %40, 0
br i1 %41, label %42, label %99
42: ; preds = %38
%43 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 28258)
%44 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0x40B9871240000000, i32 %43)
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %99
46: ; preds = %42
%47 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 15360)
%48 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 1.000000e+00, i32 %47)
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %99
50: ; preds = %46
%51 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 1024)
%52 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0x3F10000000000000, i32 %51)
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %99
54: ; preds = %50
%55 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 16)
%56 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0x3EB0000000000000, i32 %55)
%57 = icmp eq i32 %56, 0
br i1 %57, label %58, label %99
58: ; preds = %54
%59 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 1)
%60 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0x3E70000000000000, i32 %59)
%61 = icmp eq i32 %60, 0
br i1 %61, label %62, label %99
62: ; preds = %58
%63 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 32769)
%64 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0xBE70000000000000, i32 %63)
%65 = icmp eq i32 %64, 0
br i1 %65, label %66, label %99
66: ; preds = %62
%67 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 1)
%68 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0x3E65000000000000, i32 %67)
%69 = icmp eq i32 %68, 0
br i1 %69, label %70, label %99
70: ; preds = %66
%71 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 0)
%72 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0x3E60000000000000, i32 %71)
%73 = icmp eq i32 %72, 0
br i1 %73, label %74, label %99
74: ; preds = %70
%75 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 32768)
%76 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 0xBE60000000000000, i32 %75)
%77 = icmp eq i32 %76, 0
br i1 %77, label %78, label %99
78: ; preds = %74
%79 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 31743)
%80 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 6.550400e+04, i32 %79)
%81 = icmp eq i32 %80, 0
br i1 %81, label %82, label %99
82: ; preds = %78
%83 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 31743)
%84 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 6.551900e+04, i32 %83)
%85 = icmp eq i32 %84, 0
br i1 %85, label %86, label %99
86: ; preds = %82
%87 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 31744)
%88 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 6.552000e+04, i32 %87)
%89 = icmp eq i32 %88, 0
br i1 %89, label %90, label %99
90: ; preds = %86
%91 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 31744)
%92 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double 6.553600e+04, i32 %91)
%93 = icmp eq i32 %92, 0
br i1 %93, label %94, label %99
94: ; preds = %90
%95 = tail call i32 (i32, ...) bitcast (i32 (...)* @UINT16_C to i32 (i32, ...)*)(i32 64512)
%96 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @test__truncsfhf2 to i32 (double, i32, ...)*)(double -6.552000e+04, i32 %95)
%97 = icmp ne i32 %96, 0
%98 = zext i1 %97 to i32
br label %99
99: ; preds = %94, %90, %86, %82, %78, %74, %70, %66, %62, %58, %54, %50, %46, %42, %38, %34, %30, %26, %22, %16, %11, %5, %0
%100 = phi i32 [ 1, %0 ], [ 1, %5 ], [ 1, %11 ], [ 1, %16 ], [ 1, %22 ], [ 1, %26 ], [ 1, %30 ], [ 1, %34 ], [ 1, %38 ], [ 1, %42 ], [ 1, %46 ], [ 1, %50 ], [ 1, %54 ], [ 1, %58 ], [ 1, %62 ], [ 1, %66 ], [ 1, %70 ], [ 1, %74 ], [ 1, %78 ], [ 1, %82 ], [ 1, %86 ], [ 1, %90 ], [ %98, %94 ]
ret i32 %100
}