#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_ne(const float x, const float y) {
  double delta;
  if (!isrealf(x) || !isrealf(y)) {
    return 0;
  }
  delta = (double)x - (double)y;
  return ((!iszerod(delta)));
}


x86 assembly (clang, -O0):
<flt_ne>:
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_ne+0x38>
movss  -0xc(%rbp),%xmm0
call   1040 <isrealf@plt>
cmp    $0x0,%eax
jne    1164 <flt_ne+0x44>
movl   $0x0,-0x4(%rbp)
jmp    1199 <flt_ne+0x79>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <iszerod@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%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_ne>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0x8(%rsp)
movss  %xmm0,0xc(%rsp)
call   1040 <isrealf@plt>
xor    %ebx,%ebx
test   %eax,%eax
je     116f <flt_ne+0x4f>
movss  0x8(%rsp),%xmm0
call   1040 <isrealf@plt>
test   %eax,%eax
je     116f <flt_ne+0x4f>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x8(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  %xmm1,%xmm0
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_ne(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 %26
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 = call i32 @iszerod(double %21)
%23 = icmp ne i32 %22, 0
%24 = xor i1 %23, true
%25 = zext i1 %24 to i32
store i32 %25, i32* %3
br label %26
26: ; preds = %15, %14
%27 = load i32, i32* %3
ret i32 %27
}

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