#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_uint_1(unsigned int);
int /*<<< orphan*/ sink(int /*<<< orphan*/);
unsigned int unsigned_range(int, unsigned int const);
void test_uint_range(unsigned n) {
  const unsigned max = (0x7fffffff * 2U + 1);
  sink(f_uint_1(n));
  sink(f_uint_1(unsigned_range(0, 1)));
  sink(f_uint_1(unsigned_range(0, 1233)));
  sink(f_uint_1(unsigned_range(0, 1234)));
  sink(f_uint_1(unsigned_range(0, 1235)));
  sink(f_uint_1(unsigned_range(1, 1235)));
  sink(f_uint_1(unsigned_range(1234, 1235)));
  sink(f_uint_1(unsigned_range(1235, 1236)));
  sink(f_uint_1(unsigned_range(1, max - 1)));
  sink(f_uint_1(unsigned_range(1, max)));
}


x86 assembly (clang, -O0):
<test_uint_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <unsigned_range@plt>
mov    %eax,%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
xor    %edi,%edi
mov    $0x4d1,%esi
call   1040 <unsigned_range@plt>
mov    %eax,%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
xor    %edi,%edi
mov    $0x4d2,%esi
call   1040 <unsigned_range@plt>
mov    %eax,%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
xor    %edi,%edi
mov    $0x4d3,%esi
call   1040 <unsigned_range@plt>
mov    %eax,%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
mov    $0x1,%edi
mov    $0x4d3,%esi
call   1040 <unsigned_range@plt>
mov    %eax,%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
mov    $0x4d2,%edi
mov    $0x4d3,%esi
call   1040 <unsigned_range@plt>
mov    %eax,%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
mov    $0x4d3,%edi
mov    $0x4d4,%esi
call   1040 <unsigned_range@plt>
mov    %eax,%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
mov    $0x1,%edi
mov    $0xfffffffe,%esi
call   1040 <unsigned_range@plt>
mov    %eax,%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
mov    $0x1,%edi
mov    $0xffffffff,%esi
call   1040 <unsigned_range@plt>
mov    %eax,%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_uint_range>:
push   %rax
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1040 <unsigned_range@plt>
mov    %eax,%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
xor    %edi,%edi
mov    $0x4d1,%esi
call   1040 <unsigned_range@plt>
mov    %eax,%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
xor    %edi,%edi
mov    $0x4d2,%esi
call   1040 <unsigned_range@plt>
mov    %eax,%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
xor    %edi,%edi
mov    $0x4d3,%esi
call   1040 <unsigned_range@plt>
mov    %eax,%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
mov    $0x1,%edi
mov    $0x4d3,%esi
call   1040 <unsigned_range@plt>
mov    %eax,%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
mov    $0x4d2,%edi
mov    $0x4d3,%esi
call   1040 <unsigned_range@plt>
mov    %eax,%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
mov    $0x4d3,%edi
mov    $0x4d4,%esi
call   1040 <unsigned_range@plt>
mov    %eax,%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
mov    $0x1,%edi
mov    $0xfffffffe,%esi
call   1040 <unsigned_range@plt>
mov    %eax,%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
call   1030 <sink@plt>
mov    $0x1,%edi
mov    $0xffffffff,%esi
call   1040 <unsigned_range@plt>
mov    %eax,%edi
call   1050 <f_uint_1@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <sink@plt>

LLVM IR (-O0):
define void @test_uint_range(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -1, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @f_uint_1(i32 %4)
%6 = call i32 @sink(i32 %5)
%7 = call i32 @unsigned_range(i32 0, i32 1)
%8 = call i32 @f_uint_1(i32 %7)
%9 = call i32 @sink(i32 %8)
%10 = call i32 @unsigned_range(i32 0, i32 1233)
%11 = call i32 @f_uint_1(i32 %10)
%12 = call i32 @sink(i32 %11)
%13 = call i32 @unsigned_range(i32 0, i32 1234)
%14 = call i32 @f_uint_1(i32 %13)
%15 = call i32 @sink(i32 %14)
%16 = call i32 @unsigned_range(i32 0, i32 1235)
%17 = call i32 @f_uint_1(i32 %16)
%18 = call i32 @sink(i32 %17)
%19 = call i32 @unsigned_range(i32 1, i32 1235)
%20 = call i32 @f_uint_1(i32 %19)
%21 = call i32 @sink(i32 %20)
%22 = call i32 @unsigned_range(i32 1234, i32 1235)
%23 = call i32 @f_uint_1(i32 %22)
%24 = call i32 @sink(i32 %23)
%25 = call i32 @unsigned_range(i32 1235, i32 1236)
%26 = call i32 @f_uint_1(i32 %25)
%27 = call i32 @sink(i32 %26)
%28 = call i32 @unsigned_range(i32 1, i32 -2)
%29 = call i32 @f_uint_1(i32 %28)
%30 = call i32 @sink(i32 %29)
%31 = call i32 @unsigned_range(i32 1, i32 -1)
%32 = call i32 @f_uint_1(i32 %31)
%33 = call i32 @sink(i32 %32)
ret void
}

LLVM IR (-O2):
define void @test_uint_range(i32 %0) {
%2 = tail call i32 @f_uint_1(i32 %0)
%3 = tail call i32 @sink(i32 %2)
%4 = tail call i32 @unsigned_range(i32 0, i32 1)
%5 = tail call i32 @f_uint_1(i32 %4)
%6 = tail call i32 @sink(i32 %5)
%7 = tail call i32 @unsigned_range(i32 0, i32 1233)
%8 = tail call i32 @f_uint_1(i32 %7)
%9 = tail call i32 @sink(i32 %8)
%10 = tail call i32 @unsigned_range(i32 0, i32 1234)
%11 = tail call i32 @f_uint_1(i32 %10)
%12 = tail call i32 @sink(i32 %11)
%13 = tail call i32 @unsigned_range(i32 0, i32 1235)
%14 = tail call i32 @f_uint_1(i32 %13)
%15 = tail call i32 @sink(i32 %14)
%16 = tail call i32 @unsigned_range(i32 1, i32 1235)
%17 = tail call i32 @f_uint_1(i32 %16)
%18 = tail call i32 @sink(i32 %17)
%19 = tail call i32 @unsigned_range(i32 1234, i32 1235)
%20 = tail call i32 @f_uint_1(i32 %19)
%21 = tail call i32 @sink(i32 %20)
%22 = tail call i32 @unsigned_range(i32 1235, i32 1236)
%23 = tail call i32 @f_uint_1(i32 %22)
%24 = tail call i32 @sink(i32 %23)
%25 = tail call i32 @unsigned_range(i32 1, i32 -2)
%26 = tail call i32 @f_uint_1(i32 %25)
%27 = tail call i32 @sink(i32 %26)
%28 = tail call i32 @unsigned_range(i32 1, i32 -1)
%29 = tail call i32 @f_uint_1(i32 %28)
%30 = tail call i32 @sink(i32 %29)
ret void
}