#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*/ fprintf(int /*<<< orphan*/, char *, int, int, int, char *);
int /*<<< orphan*/ stderr;
bool test_interval_int(int val_min, int val_max, int value, char *msg) {
  if (value < val_min || val_max < value) {
    fprintf(stderr, "ERR: interval attendue [%d,%d] ; valeur calculee %d. %s\n",
            val_min, val_max, value, msg);
    return false;
  }
  return true;
}


x86 assembly (clang, -O0):
<test_interval_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     113d <test_interval_int+0x2d>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    116c <test_interval_int+0x5c>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x18(%rbp),%r9
lea    0xea5(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1173 <test_interval_int+0x63>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_interval_int>:
mov    %rcx,%r9
mov    %edx,%r8d
mov    %esi,%ecx
mov    %edi,%edx
cmp    %edi,%r8d
jl     112a <test_interval_int+0x1a>
mov    $0x1,%eax
cmp    %r8d,%ecx
jl     112a <test_interval_int+0x1a>
ret
push   %rax
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [57 x i8] c"ERR: interval attendue [%d,%d] ; valeur calculee %d. %s\0A\00"
define i32 @test_interval_int(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
%10 = load i32, i32* %8
%11 = load i32, i32* %6
%12 = icmp slt i32 %10, %11
br i1 %12, label %17, label %13
13: ; preds = %4
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %24
17: ; preds = %13, %4
%18 = load i32, i32* @stderr
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = load i32, i32* %8
%22 = load i8*, i8** %9
%23 = call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 %19, i32 %20, i32 %21, i8* %22)
store i32 0, i32* %5
br label %25
24: ; preds = %13
store i32 1, i32* %5
br label %25
25: ; preds = %24, %17
%26 = load i32, i32* %5
ret i32 %26
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [57 x i8] c"ERR: interval attendue [%d,%d] ; valeur calculee %d. %s\0A\00"
define i32 @test_interval_int(i32 %0, i32 %1, i32 %2, i8* %3) {
%5 = icmp slt i32 %2, %0
%6 = icmp slt i32 %1, %2
%7 = or i1 %5, %6
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i8* %3)
br label %11
11: ; preds = %4, %8
%12 = phi i32 [ 0, %8 ], [ 1, %4 ]
ret i32 %12
}