#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*/ f_int_1(int);
int signed_anti_range(int const, int const);
int signed_range(int const, int const);
int /*<<< orphan*/ sink(int /*<<< orphan*/);
void test_int_range(int n) {
  const int min = (-0x7fffffff - 1);
  const int max = 0x7fffffff;
  sink(f_int_1(n));
  sink(f_int_1(signed_range(min, 1234)));
  sink(f_int_1(signed_range(-2, -1)));
  sink(f_int_1(signed_range(1235, 2345)));
  sink(f_int_1(signed_range(max - 1, max)));
  sink(f_int_1(signed_anti_range(-1, 1)));
  sink(f_int_1(signed_anti_range(-2, 12)));
  sink(f_int_1(signed_anti_range(-3, 123)));
  sink(f_int_1(signed_anti_range(-4, 1234)));
  sink(f_int_1(signed_anti_range(min + 1, 1233)));
  sink(f_int_1(signed_anti_range(min + 2, 1235)));
  sink(f_int_1(signed_anti_range(0, max)));
  sink(f_int_1(signed_anti_range(1, max)));
  sink(f_int_1(signed_anti_range(2, max)));
}


x86 assembly (clang, -O0):
<test_int_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x80000000,-0x8(%rbp)
movl   $0x7fffffff,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0x80000000,%edi
mov    $0x4d2,%esi
call   1030 <signed_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0xfffffffe,%edi
mov    $0xffffffff,%esi
call   1030 <signed_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0x4d3,%edi
mov    $0x929,%esi
call   1030 <signed_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0x7ffffffe,%edi
mov    $0x7fffffff,%esi
call   1030 <signed_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0xffffffff,%edi
mov    $0x1,%esi
call   1060 <signed_anti_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0xfffffffe,%edi
mov    $0xc,%esi
call   1060 <signed_anti_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0xfffffffd,%edi
mov    $0x7b,%esi
call   1060 <signed_anti_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0xfffffffc,%edi
mov    $0x4d2,%esi
call   1060 <signed_anti_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0x80000001,%edi
mov    $0x4d1,%esi
call   1060 <signed_anti_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0x80000002,%edi
mov    $0x4d3,%esi
call   1060 <signed_anti_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
xor    %edi,%edi
mov    $0x7fffffff,%esi
call   1060 <signed_anti_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0x1,%edi
mov    $0x7fffffff,%esi
call   1060 <signed_anti_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0x2,%edi
mov    $0x7fffffff,%esi
call   1060 <signed_anti_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_int_range>:
push   %rax
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0x80000000,%edi
mov    $0x4d2,%esi
call   1030 <signed_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0xfffffffe,%edi
mov    $0xffffffff,%esi
call   1030 <signed_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0x4d3,%edi
mov    $0x929,%esi
call   1030 <signed_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0x7ffffffe,%edi
mov    $0x7fffffff,%esi
call   1030 <signed_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0xffffffff,%edi
mov    $0x1,%esi
call   1060 <signed_anti_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0xfffffffe,%edi
mov    $0xc,%esi
call   1060 <signed_anti_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0xfffffffd,%edi
mov    $0x7b,%esi
call   1060 <signed_anti_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0xfffffffc,%edi
mov    $0x4d2,%esi
call   1060 <signed_anti_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0x80000001,%edi
mov    $0x4d1,%esi
call   1060 <signed_anti_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0x80000002,%edi
mov    $0x4d3,%esi
call   1060 <signed_anti_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
xor    %edi,%edi
mov    $0x7fffffff,%esi
call   1060 <signed_anti_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0x1,%edi
mov    $0x7fffffff,%esi
call   1060 <signed_anti_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
call   1040 <sink@plt>
mov    $0x2,%edi
mov    $0x7fffffff,%esi
call   1060 <signed_anti_range@plt>
mov    %eax,%edi
call   1050 <f_int_1@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <sink@plt>

LLVM IR (-O0):
define void @test_int_range(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 -2147483648, i32* %3
store i32 2147483647, i32* %4
%5 = load i32, i32* %2
%6 = call i32 @f_int_1(i32 %5)
%7 = call i32 @sink(i32 %6)
%8 = call i32 @signed_range(i32 -2147483648, i32 1234)
%9 = call i32 @f_int_1(i32 %8)
%10 = call i32 @sink(i32 %9)
%11 = call i32 @signed_range(i32 -2, i32 -1)
%12 = call i32 @f_int_1(i32 %11)
%13 = call i32 @sink(i32 %12)
%14 = call i32 @signed_range(i32 1235, i32 2345)
%15 = call i32 @f_int_1(i32 %14)
%16 = call i32 @sink(i32 %15)
%17 = call i32 @signed_range(i32 2147483646, i32 2147483647)
%18 = call i32 @f_int_1(i32 %17)
%19 = call i32 @sink(i32 %18)
%20 = call i32 @signed_anti_range(i32 -1, i32 1)
%21 = call i32 @f_int_1(i32 %20)
%22 = call i32 @sink(i32 %21)
%23 = call i32 @signed_anti_range(i32 -2, i32 12)
%24 = call i32 @f_int_1(i32 %23)
%25 = call i32 @sink(i32 %24)
%26 = call i32 @signed_anti_range(i32 -3, i32 123)
%27 = call i32 @f_int_1(i32 %26)
%28 = call i32 @sink(i32 %27)
%29 = call i32 @signed_anti_range(i32 -4, i32 1234)
%30 = call i32 @f_int_1(i32 %29)
%31 = call i32 @sink(i32 %30)
%32 = call i32 @signed_anti_range(i32 -2147483647, i32 1233)
%33 = call i32 @f_int_1(i32 %32)
%34 = call i32 @sink(i32 %33)
%35 = call i32 @signed_anti_range(i32 -2147483646, i32 1235)
%36 = call i32 @f_int_1(i32 %35)
%37 = call i32 @sink(i32 %36)
%38 = call i32 @signed_anti_range(i32 0, i32 2147483647)
%39 = call i32 @f_int_1(i32 %38)
%40 = call i32 @sink(i32 %39)
%41 = call i32 @signed_anti_range(i32 1, i32 2147483647)
%42 = call i32 @f_int_1(i32 %41)
%43 = call i32 @sink(i32 %42)
%44 = call i32 @signed_anti_range(i32 2, i32 2147483647)
%45 = call i32 @f_int_1(i32 %44)
%46 = call i32 @sink(i32 %45)
ret void
}

LLVM IR (-O2):
define void @test_int_range(i32 %0) {
%2 = tail call i32 @f_int_1(i32 %0)
%3 = tail call i32 @sink(i32 %2)
%4 = tail call i32 @signed_range(i32 -2147483648, i32 1234)
%5 = tail call i32 @f_int_1(i32 %4)
%6 = tail call i32 @sink(i32 %5)
%7 = tail call i32 @signed_range(i32 -2, i32 -1)
%8 = tail call i32 @f_int_1(i32 %7)
%9 = tail call i32 @sink(i32 %8)
%10 = tail call i32 @signed_range(i32 1235, i32 2345)
%11 = tail call i32 @f_int_1(i32 %10)
%12 = tail call i32 @sink(i32 %11)
%13 = tail call i32 @signed_range(i32 2147483646, i32 2147483647)
%14 = tail call i32 @f_int_1(i32 %13)
%15 = tail call i32 @sink(i32 %14)
%16 = tail call i32 @signed_anti_range(i32 -1, i32 1)
%17 = tail call i32 @f_int_1(i32 %16)
%18 = tail call i32 @sink(i32 %17)
%19 = tail call i32 @signed_anti_range(i32 -2, i32 12)
%20 = tail call i32 @f_int_1(i32 %19)
%21 = tail call i32 @sink(i32 %20)
%22 = tail call i32 @signed_anti_range(i32 -3, i32 123)
%23 = tail call i32 @f_int_1(i32 %22)
%24 = tail call i32 @sink(i32 %23)
%25 = tail call i32 @signed_anti_range(i32 -4, i32 1234)
%26 = tail call i32 @f_int_1(i32 %25)
%27 = tail call i32 @sink(i32 %26)
%28 = tail call i32 @signed_anti_range(i32 -2147483647, i32 1233)
%29 = tail call i32 @f_int_1(i32 %28)
%30 = tail call i32 @sink(i32 %29)
%31 = tail call i32 @signed_anti_range(i32 -2147483646, i32 1235)
%32 = tail call i32 @f_int_1(i32 %31)
%33 = tail call i32 @sink(i32 %32)
%34 = tail call i32 @signed_anti_range(i32 0, i32 2147483647)
%35 = tail call i32 @f_int_1(i32 %34)
%36 = tail call i32 @sink(i32 %35)
%37 = tail call i32 @signed_anti_range(i32 1, i32 2147483647)
%38 = tail call i32 @f_int_1(i32 %37)
%39 = tail call i32 @sink(i32 %38)
%40 = tail call i32 @signed_anti_range(i32 2, i32 2147483647)
%41 = tail call i32 @f_int_1(i32 %40)
%42 = tail call i32 @sink(i32 %41)
ret void
}