#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, double,
                           double);
int /*<<< orphan*/ stderr;
void check_out_of_range(double value, double minval, double maxval,
                        const char *optionName) {
  if (value < minval || value > maxval) {
    fprintf(stderr, "Error: Option `%s' out of range [%g, %g]\n", optionName,
            minval, maxval);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<check_out_of_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
ja     115f <check_out_of_range+0x3f>
movsd  -0x8(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    118c <check_out_of_range+0x6c>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rdx
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xe83(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_out_of_range>:
mov    %rdi,%rdx
ucomisd %xmm0,%xmm1
ja     1130 <check_out_of_range+0x10>
ucomisd %xmm2,%xmm0
ja     1130 <check_out_of_range+0x10>
ret
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
lea    0xebf(%rip),%rsi
movapd %xmm1,%xmm0
movapd %xmm2,%xmm1
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"Error: Option `%s' out of range [%g, %g]\0A\00"
define void @check_out_of_range(double %0, double %1, double %2, i8* %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca i8*
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store i8* %3, i8** %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = fcmp olt double %9, %10
br i1 %11, label %16, label %12
12: ; preds = %4
%13 = load double, double* %5
%14 = load double, double* %7
%15 = fcmp ogt double %13, %14
br i1 %15, label %16, label %23
16: ; preds = %12, %4
%17 = load i32, i32* @stderr
%18 = load i8*, i8** %8
%19 = load double, double* %6
%20 = load double, double* %7
%21 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %18, double %19, double %20)
%22 = call i32 @exit(i32 1)
unreachable
23: ; preds = %12
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"Error: Option `%s' out of range [%g, %g]\0A\00"
define void @check_out_of_range(double %0, double %1, double %2, i8* %3) {
%5 = fcmp olt double %0, %1
%6 = fcmp ogt double %0, %2
%7 = or i1 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %3, double %1, double %2)
%11 = tail call i32 @exit(i32 1)
unreachable
12: ; preds = %4
ret void
}