#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*/ clang_analyzer_eval(int);
void negate_positive_range(int m, int n) {
  if (m - n <= 0)
    return;
  clang_analyzer_eval(n - m < 0);
  clang_analyzer_eval(n - m > ((~0U) & ~((~0U) >> 1)));
  clang_analyzer_eval(n - m == ((~0U) & ~((~0U) >> 1)));
}


x86 assembly (clang, -O0):
<negate_positive_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
cmp    $0x0,%eax
jg     1132 <negate_positive_range+0x22>
jmp    1178 <negate_positive_range+0x68>
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
cmp    $0x0,%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
cmp    $0x80000000,%eax
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
cmp    $0x80000000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<negate_positive_range>:
push   %rbx
mov    %esi,%ebx
sub    %edi,%ebx
jge    1144 <negate_positive_range+0x34>
mov    %ebx,%edi
shr    $0x1f,%edi
call   1030 <clang_analyzer_eval@plt>
xor    %edi,%edi
cmp    $0x80000001,%ebx
setae  %dil
call   1030 <clang_analyzer_eval@plt>
xor    %edi,%edi
cmp    $0x80000000,%ebx
sete   %dil
pop    %rbx
jmp    1030 <clang_analyzer_eval@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @negate_positive_range(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
%8 = icmp sle i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %2
br label %29
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = sub nsw i32 %11, %12
%14 = icmp slt i32 %13, 0
%15 = zext i1 %14 to i32
%16 = call i32 @clang_analyzer_eval(i32 %15)
%17 = load i32, i32* %4
%18 = load i32, i32* %3
%19 = sub nsw i32 %17, %18
%20 = icmp ugt i32 %19, -2147483648
%21 = zext i1 %20 to i32
%22 = call i32 @clang_analyzer_eval(i32 %21)
%23 = load i32, i32* %4
%24 = load i32, i32* %3
%25 = sub nsw i32 %23, %24
%26 = icmp eq i32 %25, -2147483648
%27 = zext i1 %26 to i32
%28 = call i32 @clang_analyzer_eval(i32 %27)
br label %29
29: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
define void @negate_positive_range(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, %0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = sub nsw i32 %1, %0
%6 = lshr i32 %5, 31
%7 = tail call i32 @clang_analyzer_eval(i32 %6)
%8 = icmp ugt i32 %5, -2147483648
%9 = zext i1 %8 to i32
%10 = tail call i32 @clang_analyzer_eval(i32 %9)
%11 = icmp eq i32 %5, -2147483648
%12 = zext i1 %11 to i32
%13 = tail call i32 @clang_analyzer_eval(i32 %12)
br label %14
14: ; preds = %2, %4
ret void
}