#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);
scalar_t__ iszerod(double);
int flt_le(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_le>:
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_le+0x38>
movss  -0xc(%rbp),%xmm0
call   1040 <isrealf@plt>
cmp    $0x0,%eax
jne    1164 <flt_le+0x44>
movl   $0x0,-0x4(%rbp)
jmp    11b1 <flt_le+0x91>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x1,%al
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
mov    %al,-0x19(%rbp)
ja     11a6 <flt_le+0x86>
movsd  -0x18(%rbp),%xmm0
call   1030 <iszerod@plt>
cmp    $0x0,%rax
setne  %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_le>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0x8(%rsp)
movss  %xmm0,0xc(%rsp)
call   1040 <isrealf@plt>
xor    %ebx,%ebx
test   %eax,%eax
je     117f <flt_le+0x5f>
movss  0x8(%rsp),%xmm0
call   1040 <isrealf@plt>
test   %eax,%eax
je     117f <flt_le+0x5f>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x8(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  %xmm1,%xmm0
mov    $0x1,%ebx
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     117f <flt_le+0x5f>
call   1030 <iszerod@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @flt_le(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 %30
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 %27, label %23
23: ; preds = %15
%24 = load double, double* %6
%25 = call i64 @iszerod(double %24)
%26 = icmp ne i64 %25, 0
br label %27
27: ; preds = %23, %15
%28 = phi i1 [ true, %15 ], [ %26, %23 ]
%29 = zext i1 %28 to i32
store i32 %29, i32* %3
br label %30
30: ; preds = %27, %14
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
define i32 @flt_le(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 %17, label %13
13: ; preds = %8
%14 = tail call i64 @iszerod(double %11)
%15 = icmp ne i64 %14, 0
%16 = zext i1 %15 to i32
br label %17
17: ; preds = %8, %13, %2, %5
%18 = phi i32 [ 0, %5 ], [ 0, %2 ], [ 1, %8 ], [ %16, %13 ]
ret i32 %18
}