#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 __VERIFIER_nondet_int();
int main() {
  int a = __VERIFIER_nondet_int();
  int b = __VERIFIER_nondet_int();
  int diff = a - b;
  int returnValue;
  if (diff > 0) {
    returnValue = 1;
  }
  if (diff < 0) {
    returnValue = -1;
  }
  if (diff == 0) {
    returnValue = 0;
  }
  if (returnValue < -1 || returnValue > 1) {
  ERROR:
    return -10;
  } else {
    return returnValue;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    114d <main+0x3d>
movl   $0x1,-0x14(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    115e <main+0x4e>
movl   $0xffffffff,-0x14(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    116f <main+0x5f>
movl   $0x0,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jl     1183 <main+0x73>
cmpl   $0x1,-0x14(%rbp)
jle    1194 <main+0x84>
jmp    1188 <main+0x78>
movl   $0xfffffff6,-0x4(%rbp)
jmp    119a <main+0x8a>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
sub    %eax,%ebx
mov    %ebx,%eax
sar    $0x1f,%eax
or     $0x1,%eax
test   %ebx,%ebx
cmove  %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %2
%7 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = sub nsw i32 %8, %9
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %0
store i32 1, i32* %5
br label %14
14: ; preds = %13, %0
%15 = load i32, i32* %4
%16 = icmp slt i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %14
store i32 -1, i32* %5
br label %18
18: ; preds = %17, %14
%19 = load i32, i32* %4
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %18
store i32 0, i32* %5
br label %22
22: ; preds = %21, %18
%23 = load i32, i32* %5
%24 = icmp slt i32 %23, -1
br i1 %24, label %28, label %25
25: ; preds = %22
%26 = load i32, i32* %5
%27 = icmp sgt i32 %26, 1
br i1 %27, label %28, label %30
28: ; preds = %25, %22
br label %29
29: ; preds = %28
store i32 -10, i32* %1
br label %32
30: ; preds = %25
%31 = load i32, i32* %5
store i32 %31, i32* %1
br label %32
32: ; preds = %30, %29
%33 = load i32, i32* %1
ret i32 %33
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = sub nsw i32 %1, %2
%4 = icmp sgt i32 %3, -1
%5 = select i1 %4, i32 1, i32 -1
%6 = icmp eq i32 %3, 0
%7 = select i1 %6, i32 0, i32 %5
ret i32 %7
}