#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*/ isrealf(float const);
int /*<<< orphan*/ iszerod(double);
int flt_lt(const float x, const float y) {
  double delta;
  if (!isrealf(x) || !isrealf(y)) {
    return 0;
  }
  delta = (double)x - (double)y;
  return ((delta < 0. && !iszerod(delta)));
}


x86 assembly (clang, -O0):
<flt_lt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1040 <isrealf@plt>
cmp    $0x0,%eax
je     1158 <flt_lt+0x38>
movss  -0xc(%rbp),%xmm0
call   1040 <isrealf@plt>
cmp    $0x0,%eax
jne    1164 <flt_lt+0x44>
movl   $0x0,-0x4(%rbp)
jmp    11b2 <flt_lt+0x92>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
xor    %eax,%eax
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
mov    %al,-0x19(%rbp)
jbe    11a7 <flt_lt+0x87>
movsd  -0x18(%rbp),%xmm0
call   1030 <iszerod@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flt_lt>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0x8(%rsp)
movss  %xmm0,0xc(%rsp)
call   1040 <isrealf@plt>
xor    %ebx,%ebx
test   %eax,%eax
je     1179 <flt_lt+0x59>
movss  0x8(%rsp),%xmm0
call   1040 <isrealf@plt>
test   %eax,%eax
je     1179 <flt_lt+0x59>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x8(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    1179 <flt_lt+0x59>
call   1030 <iszerod@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @flt_lt(float %0, float %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca float
%6 = alloca double
store float %0, float* %4
store float %1, float* %5
%7 = load float, float* %4
%8 = call i32 @isrealf(float %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load float, float* %5
%12 = call i32 @isrealf(float %11)
%13 = icmp ne i32 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %10, %2
store i32 0, i32* %3
br label %31
15: ; preds = %10
%16 = load float, float* %4
%17 = fpext float %16 to double
%18 = load float, float* %5
%19 = fpext float %18 to double
%20 = fsub double %17, %19
store double %20, double* %6
%21 = load double, double* %6
%22 = fcmp olt double %21, 0.000000e+00
br i1 %22, label %23, label %28
23: ; preds = %15
%24 = load double, double* %6
%25 = call i32 @iszerod(double %24)
%26 = icmp ne i32 %25, 0
%27 = xor i1 %26, true
br label %28
28: ; preds = %23, %15
%29 = phi i1 [ false, %15 ], [ %27, %23 ]
%30 = zext i1 %29 to i32
store i32 %30, i32* %3
br label %31
31: ; preds = %28, %14
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
define i32 @flt_lt(float %0, float %1) {
%3 = tail call i32 @isrealf(float %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %17, label %5
5: ; preds = %2
%6 = tail call i32 @isrealf(float %1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %17, label %8
8: ; preds = %5
%9 = fpext float %0 to double
%10 = fpext float %1 to double
%11 = fsub double %9, %10
%12 = fcmp olt double %11, 0.000000e+00
br i1 %12, label %13, label %17
13: ; preds = %8
%14 = tail call i32 @iszerod(double %11)
%15 = icmp eq i32 %14, 0
%16 = zext i1 %15 to i32
br label %17
17: ; preds = %8, %13, %2, %5
%18 = phi i32 [ 0, %5 ], [ 0, %2 ], [ 0, %8 ], [ %16, %13 ]
ret i32 %18
}