#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*/ __VERIFIER_error();
int __VERIFIER_nondet_int();
int addition(int, int);
int main() {
  int m = __VERIFIER_nondet_int();
  if (m < 0 || m > 2147483647) {
    return 0;
  }
  int n = __VERIFIER_nondet_int();
  if (n < 0 || n > 2147483647) {
    return 0;
  }
  int result = addition(m, n);
  if (result == m + n) {
    return 0;
  } else {
  ERROR:
    __VERIFIER_error();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1160 <main+0x30>
cmpl   $0x7fffffff,-0x8(%rbp)
jle    116c <main+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    11d0 <main+0xa0>
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     118d <main+0x5d>
cmpl   $0x7fffffff,-0xc(%rbp)
jle    1199 <main+0x69>
movl   $0x0,-0x4(%rbp)
jmp    11d0 <main+0xa0>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <addition@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jne    11c4 <main+0x94>
movl   $0x0,-0x4(%rbp)
jmp    11d0 <main+0xa0>
jmp    11c9 <main+0x99>
mov    $0x0,%al
call   1050 <__VERIFIER_error@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
js     1163 <main+0x33>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
js     1163 <main+0x33>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %eax,%esi
call   1030 <addition@plt>
add    %ebx,%ebp
cmp    %ebp,%eax
je     1163 <main+0x33>
xor    %eax,%eax
call   1050 <__VERIFIER_error@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp slt i32 %1, 0
br i1 %2, label %12, label %3
3: ; preds = %0
%4 = tail call i32 (...) @__VERIFIER_nondet_int()
%5 = icmp slt i32 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %3
%7 = tail call i32 @addition(i32 %1, i32 %4)
%8 = add nuw nsw i32 %4, %1
%9 = icmp eq i32 %7, %8
br i1 %9, label %12, label %10
10: ; preds = %6
%11 = tail call i32 (...) @__VERIFIER_error()
br label %12
12: ; preds = %3, %6, %10, %0
ret i32 0
}