#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 */
scalar_t__ Util_equal(double const, double const);
int Util_in_range(const double lower, const double upper, const double x) {
  int lowcond, upcond;
  lowcond = x > lower || Util_equal(x, lower);
  upcond = x < upper || Util_equal(x, upper);
  return lowcond && upcond;
}


x86 assembly (clang, -O0):
<Util_in_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x1,%al
ucomisd -0x8(%rbp),%xmm0
mov    %al,-0x21(%rbp)
ja     1155 <Util_in_range+0x45>
movsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
call   1030 <Util_equal@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x1c(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
ucomisd %xmm1,%xmm0
mov    %al,-0x22(%rbp)
ja     1192 <Util_in_range+0x82>
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <Util_equal@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x22(%rbp)
mov    -0x22(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x20(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x1c(%rbp)
mov    %al,-0x23(%rbp)
je     11b6 <Util_in_range+0xa6>
cmpl   $0x0,-0x20(%rbp)
setne  %al
mov    %al,-0x23(%rbp)
mov    -0x23(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Util_in_range>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
movapd %xmm2,%xmm3
movapd %xmm1,%xmm2
mov    $0x1,%bpl
ucomisd %xmm0,%xmm3
mov    $0x1,%bl
ja     1154 <Util_in_range+0x44>
movapd %xmm0,%xmm1
movapd %xmm3,%xmm0
movsd  %xmm2,0x10(%rsp)
movsd  %xmm3,0x8(%rsp)
call   1030 <Util_equal@plt>
movsd  0x8(%rsp),%xmm3
movsd  0x10(%rsp),%xmm2
test   %rax,%rax
setne  %bl
ucomisd %xmm3,%xmm2
ja     116e <Util_in_range+0x5e>
movapd %xmm3,%xmm0
movapd %xmm2,%xmm1
call   1030 <Util_equal@plt>
test   %rax,%rax
setne  %bpl
and    %bpl,%bl
movzbl %bl,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @Util_in_range(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca i32
%8 = alloca i32
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%9 = load double, double* %6
%10 = load double, double* %4
%11 = fcmp ogt double %9, %10
br i1 %11, label %17, label %12
12: ; preds = %3
%13 = load double, double* %6
%14 = load double, double* %4
%15 = call i64 @Util_equal(double %13, double %14)
%16 = icmp ne i64 %15, 0
br label %17
17: ; preds = %12, %3
%18 = phi i1 [ true, %3 ], [ %16, %12 ]
%19 = zext i1 %18 to i32
store i32 %19, i32* %7
%20 = load double, double* %6
%21 = load double, double* %5
%22 = fcmp olt double %20, %21
br i1 %22, label %28, label %23
23: ; preds = %17
%24 = load double, double* %6
%25 = load double, double* %5
%26 = call i64 @Util_equal(double %24, double %25)
%27 = icmp ne i64 %26, 0
br label %28
28: ; preds = %23, %17
%29 = phi i1 [ true, %17 ], [ %27, %23 ]
%30 = zext i1 %29 to i32
store i32 %30, i32* %8
%31 = load i32, i32* %7
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %36
33: ; preds = %28
%34 = load i32, i32* %8
%35 = icmp ne i32 %34, 0
br label %36
36: ; preds = %33, %28
%37 = phi i1 [ false, %28 ], [ %35, %33 ]
%38 = zext i1 %37 to i32
ret i32 %38
}

LLVM IR (-O2):
define i32 @Util_in_range(double %0, double %1, double %2) {
%4 = fcmp ogt double %2, %0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = tail call i64 @Util_equal(double %2, double %0)
%7 = icmp ne i64 %6, 0
br label %8
8: ; preds = %5, %3
%9 = phi i1 [ true, %3 ], [ %7, %5 ]
%10 = fcmp olt double %2, %1
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = tail call i64 @Util_equal(double %2, double %1)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ true, %8 ], [ %13, %11 ]
%16 = select i1 %9, i1 %15, i1 false
%17 = zext i1 %16 to i32
ret i32 %17
}