#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*/ assert(int);
int range_equals(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ range_make(int, int);
void range_equals_test(void) {
  assert(range_equals(range_make(0, 0), range_make(0, 0)));
  assert(range_equals(range_make(42, 42), range_make(0, 0)));
  assert(range_equals(range_make(-10, 10), range_make(-10, 10)));
  assert(range_equals(range_make(-10, -1), range_make(-10, -1)));
  assert(range_equals(range_make(1, 10), range_make(1, 10)));
  assert(!range_equals(range_make(-10, 10), range_make(-10, 11)));
  assert(!range_equals(range_make(-10, -1), range_make(-11, -1)));
  assert(!range_equals(range_make(1, 10), range_make(1, 11)));
}


x86 assembly (clang, -O0):
<range_equals_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
xor    %esi,%esi
mov    %esi,%edi
call   1030 <range_make@plt>
mov    %eax,-0x20(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1030 <range_make@plt>
mov    -0x20(%rbp),%edi
mov    %eax,%esi
call   1040 <range_equals@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0x2a,%esi
mov    %esi,%edi
call   1030 <range_make@plt>
mov    %eax,-0x1c(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1030 <range_make@plt>
mov    -0x1c(%rbp),%edi
mov    %eax,%esi
call   1040 <range_equals@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0xfffffff6,%edi
mov    $0xa,%esi
call   1030 <range_make@plt>
mov    %eax,-0x18(%rbp)
mov    $0xfffffff6,%edi
mov    $0xa,%esi
call   1030 <range_make@plt>
mov    -0x18(%rbp),%edi
mov    %eax,%esi
call   1040 <range_equals@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0xfffffff6,%edi
mov    $0xffffffff,%esi
call   1030 <range_make@plt>
mov    %eax,-0x14(%rbp)
mov    $0xfffffff6,%edi
mov    $0xffffffff,%esi
call   1030 <range_make@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <range_equals@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0x1,%edi
mov    $0xa,%esi
call   1030 <range_make@plt>
mov    %eax,-0x10(%rbp)
mov    $0x1,%edi
mov    $0xa,%esi
call   1030 <range_make@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
call   1040 <range_equals@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0xfffffff6,%edi
mov    $0xa,%esi
call   1030 <range_make@plt>
mov    %eax,-0xc(%rbp)
mov    $0xfffffff6,%edi
mov    $0xb,%esi
call   1030 <range_make@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1040 <range_equals@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0xfffffff6,%edi
mov    $0xffffffff,%esi
call   1030 <range_make@plt>
mov    %eax,-0x8(%rbp)
mov    $0xfffffff5,%edi
mov    $0xffffffff,%esi
call   1030 <range_make@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1040 <range_equals@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x1,%edi
mov    $0xa,%esi
call   1030 <range_make@plt>
mov    %eax,-0x4(%rbp)
mov    $0x1,%edi
mov    $0xb,%esi
call   1030 <range_make@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
call   1040 <range_equals@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<range_equals_test>:
push   %rbx
xor    %edi,%edi
xor    %esi,%esi
call   1030 <range_make@plt>
mov    %eax,%ebx
xor    %edi,%edi
xor    %esi,%esi
call   1030 <range_make@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <range_equals@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0x2a,%edi
mov    $0x2a,%esi
call   1030 <range_make@plt>
mov    %eax,%ebx
xor    %edi,%edi
xor    %esi,%esi
call   1030 <range_make@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <range_equals@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0xfffffff6,%edi
mov    $0xa,%esi
call   1030 <range_make@plt>
mov    %eax,%ebx
mov    $0xfffffff6,%edi
mov    $0xa,%esi
call   1030 <range_make@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <range_equals@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0xfffffff6,%edi
mov    $0xffffffff,%esi
call   1030 <range_make@plt>
mov    %eax,%ebx
mov    $0xfffffff6,%edi
mov    $0xffffffff,%esi
call   1030 <range_make@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <range_equals@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0x1,%edi
mov    $0xa,%esi
call   1030 <range_make@plt>
mov    %eax,%ebx
mov    $0x1,%edi
mov    $0xa,%esi
call   1030 <range_make@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <range_equals@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    $0xfffffff6,%edi
mov    $0xa,%esi
call   1030 <range_make@plt>
mov    %eax,%ebx
mov    $0xfffffff6,%edi
mov    $0xb,%esi
call   1030 <range_make@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <range_equals@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0xfffffff6,%edi
mov    $0xffffffff,%esi
call   1030 <range_make@plt>
mov    %eax,%ebx
mov    $0xfffffff5,%edi
mov    $0xffffffff,%esi
call   1030 <range_make@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <range_equals@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x1,%edi
mov    $0xa,%esi
call   1030 <range_make@plt>
mov    %eax,%ebx
mov    $0x1,%edi
mov    $0xb,%esi
call   1030 <range_make@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <range_equals@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rbx
jmp    1050 <assert@plt>

LLVM IR (-O0):
define void @range_equals_test() {
%1 = call i32 @range_make(i32 0, i32 0)
%2 = call i32 @range_make(i32 0, i32 0)
%3 = call i32 @range_equals(i32 %1, i32 %2)
%4 = call i32 @assert(i32 %3)
%5 = call i32 @range_make(i32 42, i32 42)
%6 = call i32 @range_make(i32 0, i32 0)
%7 = call i32 @range_equals(i32 %5, i32 %6)
%8 = call i32 @assert(i32 %7)
%9 = call i32 @range_make(i32 -10, i32 10)
%10 = call i32 @range_make(i32 -10, i32 10)
%11 = call i32 @range_equals(i32 %9, i32 %10)
%12 = call i32 @assert(i32 %11)
%13 = call i32 @range_make(i32 -10, i32 -1)
%14 = call i32 @range_make(i32 -10, i32 -1)
%15 = call i32 @range_equals(i32 %13, i32 %14)
%16 = call i32 @assert(i32 %15)
%17 = call i32 @range_make(i32 1, i32 10)
%18 = call i32 @range_make(i32 1, i32 10)
%19 = call i32 @range_equals(i32 %17, i32 %18)
%20 = call i32 @assert(i32 %19)
%21 = call i32 @range_make(i32 -10, i32 10)
%22 = call i32 @range_make(i32 -10, i32 11)
%23 = call i32 @range_equals(i32 %21, i32 %22)
%24 = icmp ne i32 %23, 0
%25 = xor i1 %24, true
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26)
%28 = call i32 @range_make(i32 -10, i32 -1)
%29 = call i32 @range_make(i32 -11, i32 -1)
%30 = call i32 @range_equals(i32 %28, i32 %29)
%31 = icmp ne i32 %30, 0
%32 = xor i1 %31, true
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
%35 = call i32 @range_make(i32 1, i32 10)
%36 = call i32 @range_make(i32 1, i32 11)
%37 = call i32 @range_equals(i32 %35, i32 %36)
%38 = icmp ne i32 %37, 0
%39 = xor i1 %38, true
%40 = zext i1 %39 to i32
%41 = call i32 @assert(i32 %40)
ret void
}

LLVM IR (-O2):
define void @range_equals_test() {
%1 = tail call i32 @range_make(i32 0, i32 0)
%2 = tail call i32 @range_make(i32 0, i32 0)
%3 = tail call i32 @range_equals(i32 %1, i32 %2)
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @range_make(i32 42, i32 42)
%6 = tail call i32 @range_make(i32 0, i32 0)
%7 = tail call i32 @range_equals(i32 %5, i32 %6)
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @range_make(i32 -10, i32 10)
%10 = tail call i32 @range_make(i32 -10, i32 10)
%11 = tail call i32 @range_equals(i32 %9, i32 %10)
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 @range_make(i32 -10, i32 -1)
%14 = tail call i32 @range_make(i32 -10, i32 -1)
%15 = tail call i32 @range_equals(i32 %13, i32 %14)
%16 = tail call i32 @assert(i32 %15)
%17 = tail call i32 @range_make(i32 1, i32 10)
%18 = tail call i32 @range_make(i32 1, i32 10)
%19 = tail call i32 @range_equals(i32 %17, i32 %18)
%20 = tail call i32 @assert(i32 %19)
%21 = tail call i32 @range_make(i32 -10, i32 10)
%22 = tail call i32 @range_make(i32 -10, i32 11)
%23 = tail call i32 @range_equals(i32 %21, i32 %22)
%24 = icmp eq i32 %23, 0
%25 = zext i1 %24 to i32
%26 = tail call i32 @assert(i32 %25)
%27 = tail call i32 @range_make(i32 -10, i32 -1)
%28 = tail call i32 @range_make(i32 -11, i32 -1)
%29 = tail call i32 @range_equals(i32 %27, i32 %28)
%30 = icmp eq i32 %29, 0
%31 = zext i1 %30 to i32
%32 = tail call i32 @assert(i32 %31)
%33 = tail call i32 @range_make(i32 1, i32 10)
%34 = tail call i32 @range_make(i32 1, i32 11)
%35 = tail call i32 @range_equals(i32 %33, i32 %34)
%36 = icmp eq i32 %35, 0
%37 = zext i1 %36 to i32
%38 = tail call i32 @assert(i32 %37)
ret void
}