#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 */
typedef scalar_t__ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ print_error(char *, scalar_t__ const, scalar_t__ const,
                               scalar_t__ const);
int integer_in_range_display_error(const uint64_t value,
                                   const uint64_t range_min,
                                   const uint64_t range_max) {
  if (value >= range_min && value <= range_max) {
    return 1;
  }
  print_error("%d is not within the range %d-%d\n", value, range_min,
              range_max);
  return 0;
}


x86 assembly (clang, -O0):
<integer_in_range_display_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jl     114c <integer_in_range_display_error+0x3c>
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jg     114c <integer_in_range_display_error+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    116b <integer_in_range_display_error+0x5b>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xea1(%rip),%rdi
call   1030 <print_error@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<integer_in_range_display_error>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
cmp    %rdx,%rdi
jl     1129 <integer_in_range_display_error+0x19>
mov    $0x1,%eax
cmp    %rcx,%rsi
jg     1129 <integer_in_range_display_error+0x19>
ret
push   %rax
lea    0xecf(%rip),%rdi
call   1030 <print_error@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [34 x i8] c"%d is not within the range %d-%d\0A\00"
define i32 @integer_in_range_display_error(i64 %0, i64 %1, i64 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%8 = load i64, i64* %5
%9 = load i64, i64* %6
%10 = icmp sge i64 %8, %9
br i1 %10, label %11, label %16
11: ; preds = %3
%12 = load i64, i64* %5
%13 = load i64, i64* %7
%14 = icmp sle i64 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %11
store i32 1, i32* %4
br label %21
16: ; preds = %11, %3
%17 = load i64, i64* %5
%18 = load i64, i64* %6
%19 = load i64, i64* %7
%20 = call i32 @print_error(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i64 %17, i64 %18, i64 %19)
store i32 0, i32* %4
br label %21
21: ; preds = %16, %15
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
@.str = [34 x i8] c"%d is not within the range %d-%d\0A\00"
define i32 @integer_in_range_display_error(i64 %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %0, %1
%5 = icmp sgt i64 %0, %2
%6 = or i1 %4, %5
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @print_error(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1, i64 %2)
br label %9
9: ; preds = %3, %7
%10 = phi i32 [ 0, %7 ], [ 1, %3 ]
ret i32 %10
}