#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 */
typedef int uint32_t;

/* Variables and functions */
scalar_t__ isinf(float);
scalar_t__ isnan(float);
scalar_t__ signbit(float);
uint32_t __hsail_class_f32_f16(float a, uint32_t flags) {
  return (flags & 0x0001 && isnan(a) && !(*(uint32_t *)&a & 0x40000000)) ||
         (flags & 0x0002 && isnan(a) && (*(uint32_t *)&a & 0x40000000)) ||
         (flags & 0x0004 && isinf(a) && a < 0.0f) ||
         (flags & 0x0008 && a != 0.0f && !isinf(a) && !isnan(a) &&
          a <= -(6.10e-5)) ||
         (flags & 0x0010 && a != 0.0f && !isinf(a) && !isnan(a) && a < 0.0f &&
          a > -(6.10e-5)) ||
         (flags & 0x0020 && a == 0.0f && signbit(a)) ||
         (flags & 0x0040 && a == 0.0f && !signbit(a)) ||
         (flags & 0x0080 && a != 0.0f && !isinf(a) && !isnan(a) && a > 0.0f &&
          a < (6.10e-5)) ||
         (flags & 0x0100 && a != 0.0f && !isinf(a) && !isnan(a) &&
          a >= (6.10e-5)) ||
         (flags & 0x0200 && isinf(a) && a >= 0.0f);
}


x86 assembly (clang, -O0):
<__hsail_class_f32_f16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     117a <__hsail_class_f32_f16+0x4a>
movss  -0x4(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
je     117a <__hsail_class_f32_f16+0x4a>
mov    -0x4(%rbp),%ecx
and    $0x40000000,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     14a5 <__hsail_class_f32_f16+0x375>
mov    -0x8(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     11b4 <__hsail_class_f32_f16+0x84>
movss  -0x4(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
je     11b4 <__hsail_class_f32_f16+0x84>
mov    -0x4(%rbp),%ecx
and    $0x40000000,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    14a5 <__hsail_class_f32_f16+0x375>
mov    -0x8(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     11e9 <__hsail_class_f32_f16+0xb9>
movss  -0x4(%rbp),%xmm0
call   1050 <isinf@plt>
cmp    $0x0,%rax
je     11e9 <__hsail_class_f32_f16+0xb9>
mov    $0x1,%al
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
mov    %al,-0x9(%rbp)
ja     14a5 <__hsail_class_f32_f16+0x375>
mov    -0x8(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     125c <__hsail_class_f32_f16+0x12c>
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1214 <__hsail_class_f32_f16+0xe4>
jp     1214 <__hsail_class_f32_f16+0xe4>
jmp    125c <__hsail_class_f32_f16+0x12c>
movss  -0x4(%rbp),%xmm0
call   1050 <isinf@plt>
cmp    $0x0,%rax
jne    125c <__hsail_class_f32_f16+0x12c>
movss  -0x4(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
jne    125c <__hsail_class_f32_f16+0x12c>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
mov    $0x1,%al
movsd  0xdb1(%rip),%xmm0
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jae    14a5 <__hsail_class_f32_f16+0x375>
mov    -0x8(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     12dc <__hsail_class_f32_f16+0x1ac>
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1287 <__hsail_class_f32_f16+0x157>
jp     1287 <__hsail_class_f32_f16+0x157>
jmp    12dc <__hsail_class_f32_f16+0x1ac>
movss  -0x4(%rbp),%xmm0
call   1050 <isinf@plt>
cmp    $0x0,%rax
jne    12dc <__hsail_class_f32_f16+0x1ac>
movss  -0x4(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
jne    12dc <__hsail_class_f32_f16+0x1ac>
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    12dc <__hsail_class_f32_f16+0x1ac>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
movsd  0xd31(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
ja     14a5 <__hsail_class_f32_f16+0x375>
mov    -0x8(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     131e <__hsail_class_f32_f16+0x1ee>
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    131e <__hsail_class_f32_f16+0x1ee>
jp     131e <__hsail_class_f32_f16+0x1ee>
movss  -0x4(%rbp),%xmm0
call   1040 <signbit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    14a5 <__hsail_class_f32_f16+0x375>
mov    -0x8(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     1360 <__hsail_class_f32_f16+0x230>
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1360 <__hsail_class_f32_f16+0x230>
jp     1360 <__hsail_class_f32_f16+0x230>
movss  -0x4(%rbp),%xmm0
call   1040 <signbit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     14a5 <__hsail_class_f32_f16+0x375>
mov    -0x8(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     13e6 <__hsail_class_f32_f16+0x2b6>
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    138d <__hsail_class_f32_f16+0x25d>
jp     138d <__hsail_class_f32_f16+0x25d>
jmp    13e6 <__hsail_class_f32_f16+0x2b6>
movss  -0x4(%rbp),%xmm0
call   1050 <isinf@plt>
cmp    $0x0,%rax
jne    13e6 <__hsail_class_f32_f16+0x2b6>
movss  -0x4(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
jne    13e6 <__hsail_class_f32_f16+0x2b6>
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    13e6 <__hsail_class_f32_f16+0x2b6>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
mov    $0x1,%al
movsd  0xc2f(%rip),%xmm0
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
ja     14a5 <__hsail_class_f32_f16+0x375>
mov    -0x8(%rbp),%eax
and    $0x100,%eax
cmp    $0x0,%eax
je     145b <__hsail_class_f32_f16+0x32b>
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1413 <__hsail_class_f32_f16+0x2e3>
jp     1413 <__hsail_class_f32_f16+0x2e3>
jmp    145b <__hsail_class_f32_f16+0x32b>
movss  -0x4(%rbp),%xmm0
call   1050 <isinf@plt>
cmp    $0x0,%rax
jne    145b <__hsail_class_f32_f16+0x32b>
movss  -0x4(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
jne    145b <__hsail_class_f32_f16+0x32b>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    $0x1,%al
movsd  0xbba(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x9(%rbp)
jae    14a5 <__hsail_class_f32_f16+0x375>
mov    -0x8(%rbp),%ecx
and    $0x200,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xa(%rbp)
je     149f <__hsail_class_f32_f16+0x36f>
movss  -0x4(%rbp),%xmm0
call   1050 <isinf@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0xa(%rbp)
je     149f <__hsail_class_f32_f16+0x36f>
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
setae  %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__hsail_class_f32_f16>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
test   $0x1,%bl
movd   %xmm0,0x4(%rsp)
je     1164 <__hsail_class_f32_f16+0x34>
call   1030 <isnan@plt>
movd   0x4(%rsp),%xmm0
test   %rax,%rax
je     1164 <__hsail_class_f32_f16+0x34>
movd   %xmm0,%eax
mov    $0x1,%ebp
test   $0x40000000,%eax
je     13b8 <__hsail_class_f32_f16+0x288>
test   $0x2,%bl
je     118d <__hsail_class_f32_f16+0x5d>
call   1030 <isnan@plt>
movd   0x4(%rsp),%xmm0
test   %rax,%rax
je     118d <__hsail_class_f32_f16+0x5d>
movd   %xmm0,%eax
mov    $0x1,%ebp
test   $0x40000000,%eax
jne    13b8 <__hsail_class_f32_f16+0x288>
test   $0x4,%bl
je     11b3 <__hsail_class_f32_f16+0x83>
call   1050 <isinf@plt>
movss  0x4(%rsp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jbe    11b3 <__hsail_class_f32_f16+0x83>
mov    $0x1,%ebp
test   %rax,%rax
jne    13b8 <__hsail_class_f32_f16+0x288>
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    11bd <__hsail_class_f32_f16+0x8d>
jnp    11db <__hsail_class_f32_f16+0xab>
mov    %ebx,%eax
and    $0x8,%eax
je     11db <__hsail_class_f32_f16+0xab>
call   1050 <isinf@plt>
xorps  %xmm1,%xmm1
movss  0x4(%rsp),%xmm0
test   %rax,%rax
je     12cd <__hsail_class_f32_f16+0x19d>
ucomiss %xmm1,%xmm0
jne    11e2 <__hsail_class_f32_f16+0xb2>
jnp    11fd <__hsail_class_f32_f16+0xcd>
mov    %ebx,%eax
and    $0x10,%eax
je     11fd <__hsail_class_f32_f16+0xcd>
call   1050 <isinf@plt>
movss  0x4(%rsp),%xmm0
test   %rax,%rax
je     1305 <__hsail_class_f32_f16+0x1d5>
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    122a <__hsail_class_f32_f16+0xfa>
jp     122a <__hsail_class_f32_f16+0xfa>
mov    %ebx,%eax
and    $0x20,%eax
je     122a <__hsail_class_f32_f16+0xfa>
call   1040 <signbit@plt>
xorps  %xmm1,%xmm1
movss  0x4(%rsp),%xmm0
mov    $0x1,%ebp
test   %rax,%rax
jne    13b8 <__hsail_class_f32_f16+0x288>
ucomiss %xmm1,%xmm0
jne    124c <__hsail_class_f32_f16+0x11c>
jp     124c <__hsail_class_f32_f16+0x11c>
mov    %ebx,%eax
and    $0x40,%eax
je     124c <__hsail_class_f32_f16+0x11c>
call   1040 <signbit@plt>
movss  0x4(%rsp),%xmm0
test   %rax,%rax
je     1340 <__hsail_class_f32_f16+0x210>
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm0
jne    1256 <__hsail_class_f32_f16+0x126>
jnp    1276 <__hsail_class_f32_f16+0x146>
mov    %ebx,%eax
and    $0x80,%eax
je     1276 <__hsail_class_f32_f16+0x146>
call   1050 <isinf@plt>
xorps  %xmm2,%xmm2
movss  0x4(%rsp),%xmm0
test   %rax,%rax
je     1347 <__hsail_class_f32_f16+0x217>
ucomiss %xmm2,%xmm0
jne    127d <__hsail_class_f32_f16+0x14d>
jnp    129a <__hsail_class_f32_f16+0x16a>
mov    %ebx,%eax
and    $0x100,%eax
je     129a <__hsail_class_f32_f16+0x16a>
call   1050 <isinf@plt>
movss  0x4(%rsp),%xmm0
test   %rax,%rax
je     138a <__hsail_class_f32_f16+0x25a>
xor    %ebp,%ebp
test   $0x200,%ebx
je     13b8 <__hsail_class_f32_f16+0x288>
call   1050 <isinf@plt>
movss  0x4(%rsp),%xmm1
test   %rax,%rax
je     13b8 <__hsail_class_f32_f16+0x288>
xorps  %xmm0,%xmm0
xor    %ebp,%ebp
ucomiss %xmm0,%xmm1
setae  %bpl
jmp    13b8 <__hsail_class_f32_f16+0x288>
call   1030 <isnan@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xd1c(%rip),%xmm1
ucomisd %xmm2,%xmm1
xorpd  %xmm1,%xmm1
jb     11db <__hsail_class_f32_f16+0xab>
mov    $0x1,%ebp
test   %rax,%rax
je     13b8 <__hsail_class_f32_f16+0x288>
jmp    11db <__hsail_class_f32_f16+0xab>
call   1030 <isnan@plt>
movss  0x4(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
ucomisd 0xce1(%rip),%xmm1
jbe    11fd <__hsail_class_f32_f16+0xcd>
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jbe    11fd <__hsail_class_f32_f16+0xcd>
mov    $0x1,%ebp
test   %rax,%rax
je     13b8 <__hsail_class_f32_f16+0x288>
jmp    11fd <__hsail_class_f32_f16+0xcd>
mov    $0x1,%ebp
jmp    13b8 <__hsail_class_f32_f16+0x288>
call   1030 <isnan@plt>
movss  0x4(%rsp),%xmm0
xorps  %xmm2,%xmm2
cvtss2sd %xmm0,%xmm2
movsd  0xca7(%rip),%xmm1
ucomisd %xmm2,%xmm1
xorps  %xmm2,%xmm2
jbe    1276 <__hsail_class_f32_f16+0x146>
xorpd  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1276 <__hsail_class_f32_f16+0x146>
mov    $0x1,%ebp
test   %rax,%rax
je     13b8 <__hsail_class_f32_f16+0x288>
jmp    1276 <__hsail_class_f32_f16+0x146>
call   1030 <isnan@plt>
movss  0x4(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
ucomisd 0xc64(%rip),%xmm1
jb     129a <__hsail_class_f32_f16+0x16a>
mov    $0x1,%ebp
test   %rax,%rax
jne    129a <__hsail_class_f32_f16+0x16a>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @__hsail_class_f32_f16(float %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
store float %0, float* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 1
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %17
8: ; preds = %2
%9 = load float, float* %3
%10 = call i64 @isnan(float %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = bitcast float* %3 to i32*
%14 = load i32, i32* %13
%15 = and i32 %14, 1073741824
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %158
17: ; preds = %12, %8, %2
%18 = load i32, i32* %4
%19 = and i32 %18, 2
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %30
21: ; preds = %17
%22 = load float, float* %3
%23 = call i64 @isnan(float %22)
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = bitcast float* %3 to i32*
%27 = load i32, i32* %26
%28 = and i32 %27, 1073741824
%29 = icmp ne i32 %28, 0
br i1 %29, label %158, label %30
30: ; preds = %25, %21, %17
%31 = load i32, i32* %4
%32 = and i32 %31, 4
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %41
34: ; preds = %30
%35 = load float, float* %3
%36 = call i64 @isinf(float %35)
%37 = icmp ne i64 %36, 0
br i1 %37, label %38, label %41
38: ; preds = %34
%39 = load float, float* %3
%40 = fcmp olt float %39, 0.000000e+00
br i1 %40, label %158, label %41
41: ; preds = %38, %34, %30
%42 = load i32, i32* %4
%43 = and i32 %42, 8
%44 = icmp ne i32 %43, 0
br i1 %44, label %45, label %60
45: ; preds = %41
%46 = load float, float* %3
%47 = fcmp une float %46, 0.000000e+00
br i1 %47, label %48, label %60
48: ; preds = %45
%49 = load float, float* %3
%50 = call i64 @isinf(float %49)
%51 = icmp ne i64 %50, 0
br i1 %51, label %60, label %52
52: ; preds = %48
%53 = load float, float* %3
%54 = call i64 @isnan(float %53)
%55 = icmp ne i64 %54, 0
br i1 %55, label %60, label %56
56: ; preds = %52
%57 = load float, float* %3
%58 = fpext float %57 to double
%59 = fcmp ole double %58, -6.100000e-05
br i1 %59, label %158, label %60
60: ; preds = %56, %52, %48, %45, %41
%61 = load i32, i32* %4
%62 = and i32 %61, 16
%63 = icmp ne i32 %62, 0
br i1 %63, label %64, label %82
64: ; preds = %60
%65 = load float, float* %3
%66 = fcmp une float %65, 0.000000e+00
br i1 %66, label %67, label %82
67: ; preds = %64
%68 = load float, float* %3
%69 = call i64 @isinf(float %68)
%70 = icmp ne i64 %69, 0
br i1 %70, label %82, label %71
71: ; preds = %67
%72 = load float, float* %3
%73 = call i64 @isnan(float %72)
%74 = icmp ne i64 %73, 0
br i1 %74, label %82, label %75
75: ; preds = %71
%76 = load float, float* %3
%77 = fcmp olt float %76, 0.000000e+00
br i1 %77, label %78, label %82
78: ; preds = %75
%79 = load float, float* %3
%80 = fpext float %79 to double
%81 = fcmp ogt double %80, -6.100000e-05
br i1 %81, label %158, label %82
82: ; preds = %78, %75, %71, %67, %64, %60
%83 = load i32, i32* %4
%84 = and i32 %83, 32
%85 = icmp ne i32 %84, 0
br i1 %85, label %86, label %93
86: ; preds = %82
%87 = load float, float* %3
%88 = fcmp oeq float %87, 0.000000e+00
br i1 %88, label %89, label %93
89: ; preds = %86
%90 = load float, float* %3
%91 = call i64 @signbit(float %90)
%92 = icmp ne i64 %91, 0
br i1 %92, label %158, label %93
93: ; preds = %89, %86, %82
%94 = load i32, i32* %4
%95 = and i32 %94, 64
%96 = icmp ne i32 %95, 0
br i1 %96, label %97, label %104
97: ; preds = %93
%98 = load float, float* %3
%99 = fcmp oeq float %98, 0.000000e+00
br i1 %99, label %100, label %104
100: ; preds = %97
%101 = load float, float* %3
%102 = call i64 @signbit(float %101)
%103 = icmp ne i64 %102, 0
br i1 %103, label %104, label %158
104: ; preds = %100, %97, %93
%105 = load i32, i32* %4
%106 = and i32 %105, 128
%107 = icmp ne i32 %106, 0
br i1 %107, label %108, label %126
108: ; preds = %104
%109 = load float, float* %3
%110 = fcmp une float %109, 0.000000e+00
br i1 %110, label %111, label %126
111: ; preds = %108
%112 = load float, float* %3
%113 = call i64 @isinf(float %112)
%114 = icmp ne i64 %113, 0
br i1 %114, label %126, label %115
115: ; preds = %111
%116 = load float, float* %3
%117 = call i64 @isnan(float %116)
%118 = icmp ne i64 %117, 0
br i1 %118, label %126, label %119
119: ; preds = %115
%120 = load float, float* %3
%121 = fcmp ogt float %120, 0.000000e+00
br i1 %121, label %122, label %126
122: ; preds = %119
%123 = load float, float* %3
%124 = fpext float %123 to double
%125 = fcmp olt double %124, 6.100000e-05
br i1 %125, label %158, label %126
126: ; preds = %122, %119, %115, %111, %108, %104
%127 = load i32, i32* %4
%128 = and i32 %127, 256
%129 = icmp ne i32 %128, 0
br i1 %129, label %130, label %145
130: ; preds = %126
%131 = load float, float* %3
%132 = fcmp une float %131, 0.000000e+00
br i1 %132, label %133, label %145
133: ; preds = %130
%134 = load float, float* %3
%135 = call i64 @isinf(float %134)
%136 = icmp ne i64 %135, 0
br i1 %136, label %145, label %137
137: ; preds = %133
%138 = load float, float* %3
%139 = call i64 @isnan(float %138)
%140 = icmp ne i64 %139, 0
br i1 %140, label %145, label %141
141: ; preds = %137
%142 = load float, float* %3
%143 = fpext float %142 to double
%144 = fcmp oge double %143, 6.100000e-05
br i1 %144, label %158, label %145
145: ; preds = %141, %137, %133, %130, %126
%146 = load i32, i32* %4
%147 = and i32 %146, 512
%148 = icmp ne i32 %147, 0
br i1 %148, label %149, label %156
149: ; preds = %145
%150 = load float, float* %3
%151 = call i64 @isinf(float %150)
%152 = icmp ne i64 %151, 0
br i1 %152, label %153, label %156
153: ; preds = %149
%154 = load float, float* %3
%155 = fcmp oge float %154, 0.000000e+00
br label %156
156: ; preds = %153, %149, %145
%157 = phi i1 [ false, %149 ], [ false, %145 ], [ %155, %153 ]
br label %158
158: ; preds = %156, %141, %122, %100, %89, %78, %56, %38, %25, %12
%159 = phi i1 [ true, %141 ], [ true, %122 ], [ true, %100 ], [ true, %89 ], [ true, %78 ], [ true, %56 ], [ true, %38 ], [ true, %25 ], [ true, %12 ], [ %157, %156 ]
%160 = zext i1 %159 to i32
ret i32 %160
}

LLVM IR (-O2):
define i32 @__hsail_class_f32_f16(float %0, i32 %1) {
%3 = and i32 %1, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = tail call i64 @isnan(float %0)
%7 = icmp eq i64 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %5
%9 = bitcast float %0 to i32
%10 = and i32 %9, 1073741824
%11 = icmp eq i32 %10, 0
br i1 %11, label %111, label %12
12: ; preds = %8, %5, %2
%13 = and i32 %1, 2
%14 = icmp eq i32 %13, 0
br i1 %14, label %22, label %15
15: ; preds = %12
%16 = tail call i64 @isnan(float %0)
%17 = icmp eq i64 %16, 0
br i1 %17, label %22, label %18
18: ; preds = %15
%19 = bitcast float %0 to i32
%20 = and i32 %19, 1073741824
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %111
22: ; preds = %18, %15, %12
%23 = and i32 %1, 4
%24 = icmp eq i32 %23, 0
br i1 %24, label %30, label %25
25: ; preds = %22
%26 = tail call i64 @isinf(float %0)
%27 = icmp ne i64 %26, 0
%28 = fcmp olt float %0, 0.000000e+00
%29 = and i1 %28, %27
br i1 %29, label %111, label %30
30: ; preds = %25, %22
%31 = and i32 %1, 8
%32 = icmp ne i32 %31, 0
%33 = fcmp une float %0, 0.000000e+00
%34 = and i1 %33, %32
br i1 %34, label %35, label %44
35: ; preds = %30
%36 = tail call i64 @isinf(float %0)
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %44
38: ; preds = %35
%39 = tail call i64 @isnan(float %0)
%40 = icmp ne i64 %39, 0
%41 = fpext float %0 to double
%42 = fcmp ugt double %41, -6.100000e-05
%43 = or i1 %42, %40
br i1 %43, label %44, label %111
44: ; preds = %38, %35, %30
%45 = and i32 %1, 16
%46 = icmp ne i32 %45, 0
%47 = and i1 %33, %46
br i1 %47, label %48, label %59
48: ; preds = %44
%49 = tail call i64 @isinf(float %0)
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %59
51: ; preds = %48
%52 = tail call i64 @isnan(float %0)
%53 = icmp eq i64 %52, 0
%54 = fcmp olt float %0, 0.000000e+00
%55 = and i1 %54, %53
%56 = fpext float %0 to double
%57 = fcmp ogt double %56, -6.100000e-05
%58 = and i1 %57, %55
br i1 %58, label %111, label %59
59: ; preds = %51, %48, %44
%60 = and i32 %1, 32
%61 = icmp ne i32 %60, 0
%62 = fcmp oeq float %0, 0.000000e+00
%63 = and i1 %62, %61
br i1 %63, label %64, label %67
64: ; preds = %59
%65 = tail call i64 @signbit(float %0)
%66 = icmp eq i64 %65, 0
br i1 %66, label %67, label %111
67: ; preds = %64, %59
%68 = and i32 %1, 64
%69 = icmp ne i32 %68, 0
%70 = and i1 %62, %69
br i1 %70, label %71, label %74
71: ; preds = %67
%72 = tail call i64 @signbit(float %0)
%73 = icmp eq i64 %72, 0
br i1 %73, label %111, label %74
74: ; preds = %71, %67
%75 = and i32 %1, 128
%76 = icmp ne i32 %75, 0
%77 = and i1 %33, %76
br i1 %77, label %78, label %89
78: ; preds = %74
%79 = tail call i64 @isinf(float %0)
%80 = icmp eq i64 %79, 0
br i1 %80, label %81, label %89
81: ; preds = %78
%82 = tail call i64 @isnan(float %0)
%83 = icmp eq i64 %82, 0
%84 = fcmp ogt float %0, 0.000000e+00
%85 = and i1 %84, %83
%86 = fpext float %0 to double
%87 = fcmp olt double %86, 6.100000e-05
%88 = and i1 %87, %85
br i1 %88, label %111, label %89
89: ; preds = %81, %78, %74
%90 = and i32 %1, 256
%91 = icmp ne i32 %90, 0
%92 = and i1 %33, %91
br i1 %92, label %93, label %102
93: ; preds = %89
%94 = tail call i64 @isinf(float %0)
%95 = icmp eq i64 %94, 0
br i1 %95, label %96, label %102
96: ; preds = %93
%97 = tail call i64 @isnan(float %0)
%98 = icmp ne i64 %97, 0
%99 = fpext float %0 to double
%100 = fcmp ult double %99, 6.100000e-05
%101 = or i1 %100, %98
br i1 %101, label %102, label %111
102: ; preds = %96, %93, %89
%103 = and i32 %1, 512
%104 = icmp eq i32 %103, 0
br i1 %104, label %111, label %105
105: ; preds = %102
%106 = tail call i64 @isinf(float %0)
%107 = icmp eq i64 %106, 0
br i1 %107, label %111, label %108
108: ; preds = %105
%109 = fcmp oge float %0, 0.000000e+00
%110 = zext i1 %109 to i32
br label %111
111: ; preds = %96, %81, %51, %38, %102, %105, %108, %25, %71, %64, %18, %8
%112 = phi i32 [ 1, %71 ], [ 1, %64 ], [ 1, %18 ], [ 1, %8 ], [ 1, %25 ], [ 0, %105 ], [ 0, %102 ], [ %110, %108 ], [ 1, %38 ], [ 1, %51 ], [ 1, %81 ], [ 1, %96 ]
ret i32 %112
}