#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 */
float __builtin_inff();
int /*<<< orphan*/ abort();
void testf(float f, float i) {
  if (f == __builtin_inff())
    abort();
  if (f == -__builtin_inff())
    abort();
  if (i == -__builtin_inff())
    abort();
  if (i != __builtin_inff())
    abort();
  if (f >= __builtin_inff())
    abort();
  if (f > __builtin_inff())
    abort();
  if (i > __builtin_inff())
    abort();
  if (f <= -__builtin_inff())
    abort();
  if (f < -__builtin_inff())
    abort();
}


x86 assembly (clang, -O0):
<testf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xed1(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    1145 <testf+0x35>
jp     1145 <testf+0x35>
mov    $0x0,%al
call   1030 <abort@plt>
movss  -0x4(%rbp),%xmm0
movss  0xeb2(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    1168 <testf+0x58>
jp     1168 <testf+0x58>
mov    $0x0,%al
call   1030 <abort@plt>
movss  -0x8(%rbp),%xmm0
movss  0xe8f(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    118b <testf+0x7b>
jp     118b <testf+0x7b>
mov    $0x0,%al
call   1030 <abort@plt>
movss  -0x8(%rbp),%xmm0
movss  0xe68(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    11ac <testf+0x9c>
jp     11ac <testf+0x9c>
jmp    11b3 <testf+0xa3>
mov    $0x0,%al
call   1030 <abort@plt>
movss  -0x4(%rbp),%xmm0
movss  0xe40(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     11d0 <testf+0xc0>
mov    $0x0,%al
call   1030 <abort@plt>
movss  -0x4(%rbp),%xmm0
movss  0xe23(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    11ed <testf+0xdd>
mov    $0x0,%al
call   1030 <abort@plt>
movss  -0x8(%rbp),%xmm0
movss  0xe06(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    120a <testf+0xfa>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xdf2(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jb     1223 <testf+0x113>
mov    $0x0,%al
call   1030 <abort@plt>
movss  0xdd9(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    123c <testf+0x12c>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testf>:
push   %rax
ucomiss 0xee8(%rip),%xmm0
jae    1145 <testf+0x35>
movss  0xee2(%rip),%xmm2
ucomiss %xmm0,%xmm2
jae    1145 <testf+0x35>
ucomiss %xmm1,%xmm2
jae    1145 <testf+0x35>
ucomiss 0xecd(%rip),%xmm1
jb     1145 <testf+0x35>
ucomiss 0xec4(%rip),%xmm0
jae    1145 <testf+0x35>
ucomiss %xmm0,%xmm2
jae    1145 <testf+0x35>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @testf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fcmp oeq float %5, 0x7FF0000000000000
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %2
%10 = load float, float* %3
%11 = fcmp oeq float %10, 0xFFF0000000000000
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %9
%15 = load float, float* %4
%16 = fcmp oeq float %15, 0xFFF0000000000000
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 (...) @abort()
unreachable
19: ; preds = %14
%20 = load float, float* %4
%21 = fcmp une float %20, 0x7FF0000000000000
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = call i32 (...) @abort()
unreachable
24: ; preds = %19
%25 = load float, float* %3
%26 = fcmp oge float %25, 0x7FF0000000000000
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 (...) @abort()
unreachable
29: ; preds = %24
%30 = load float, float* %3
%31 = fcmp ogt float %30, 0x7FF0000000000000
br i1 %31, label %32, label %34
32: ; preds = %29
%33 = call i32 (...) @abort()
unreachable
34: ; preds = %29
%35 = load float, float* %4
%36 = fcmp ogt float %35, 0x7FF0000000000000
br i1 %36, label %37, label %39
37: ; preds = %34
%38 = call i32 (...) @abort()
unreachable
39: ; preds = %34
%40 = load float, float* %3
%41 = fcmp ole float %40, 0xFFF0000000000000
br i1 %41, label %42, label %44
42: ; preds = %39
%43 = call i32 (...) @abort()
unreachable
44: ; preds = %39
%45 = load float, float* %3
%46 = fcmp olt float %45, 0xFFF0000000000000
br i1 %46, label %47, label %49
47: ; preds = %44
%48 = call i32 (...) @abort()
unreachable
49: ; preds = %44
ret void
}

LLVM IR (-O2):
define void @testf(float %0, float %1) {
%3 = fcmp oeq float %0, 0x7FF0000000000000
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %2
%7 = fcmp oeq float %0, 0xFFF0000000000000
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %6
%11 = fcmp oeq float %1, 0xFFF0000000000000
br i1 %11, label %12, label %14
12: ; preds = %10
%13 = tail call i32 (...) @abort()
unreachable
14: ; preds = %10
%15 = fcmp une float %1, 0x7FF0000000000000
br i1 %15, label %16, label %18
16: ; preds = %14
%17 = tail call i32 (...) @abort()
unreachable
18: ; preds = %14
%19 = fcmp ult float %0, 0x7FF0000000000000
br i1 %19, label %22, label %20
20: ; preds = %18
%21 = tail call i32 (...) @abort()
unreachable
22: ; preds = %18
%23 = fcmp ugt float %0, 0xFFF0000000000000
br i1 %23, label %26, label %24
24: ; preds = %22
%25 = tail call i32 (...) @abort()
unreachable
26: ; preds = %22
ret void
}