#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 mult(int, int);
int main() {
  int m = __VERIFIER_nondet_int();
  if (m < 0) {
    return 0;
  }
  int n = __VERIFIER_nondet_int();
  if (n < 0) {
    return 0;
  }
  int res1 = mult(m, n);
  int res2 = mult(n, m);
  if (res1 == 0 || (m > 0 || n > 0)) {
    return 0;
  } else {
  ERROR:
    __VERIFIER_error();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    115f <main+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    11d1 <main+0xa1>
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    117f <main+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    11d1 <main+0xa1>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <mult@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <mult@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     11b9 <main+0x89>
cmpl   $0x0,-0x8(%rbp)
jg     11b9 <main+0x89>
cmpl   $0x0,-0xc(%rbp)
jle    11c5 <main+0x95>
movl   $0x0,-0x4(%rbp)
jmp    11d1 <main+0xa1>
jmp    11ca <main+0x9a>
mov    $0x0,%al
call   1050 <__VERIFIER_error@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
js     1177 <main+0x47>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
js     1177 <main+0x47>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %eax,%esi
call   1030 <mult@plt>
mov    %eax,%r14d
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <mult@plt>
test   %r14d,%r14d
je     1177 <main+0x47>
test   %ebx,%ebx
jne    1177 <main+0x47>
test   %ebp,%ebp
jne    1177 <main+0x47>
xor    %eax,%eax
call   1050 <__VERIFIER_error@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
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 = load i32, i32* %2
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %0
store i32 0, i32* %1
br label %34
10: ; preds = %0
%11 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %10
store i32 0, i32* %1
br label %34
15: ; preds = %10
%16 = load i32, i32* %2
%17 = load i32, i32* %3
%18 = call i32 @mult(i32 %16, i32 %17)
store i32 %18, i32* %4
%19 = load i32, i32* %3
%20 = load i32, i32* %2
%21 = call i32 @mult(i32 %19, i32 %20)
store i32 %21, i32* %5
%22 = load i32, i32* %4
%23 = icmp eq i32 %22, 0
br i1 %23, label %30, label %24
24: ; preds = %15
%25 = load i32, i32* %2
%26 = icmp sgt i32 %25, 0
br i1 %26, label %30, label %27
27: ; preds = %24
%28 = load i32, i32* %3
%29 = icmp sgt i32 %28, 0
br i1 %29, label %30, label %31
30: ; preds = %27, %24, %15
store i32 0, i32* %1
br label %34
31: ; preds = %27
br label %32
32: ; preds = %31
%33 = call i32 (...) @__VERIFIER_error()
br label %34
34: ; preds = %9, %14, %30, %32
%35 = load i32, i32* %1
ret i32 %35
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp slt i32 %1, 0
br i1 %2, label %16, label %3
3: ; preds = %0
%4 = tail call i32 (...) @__VERIFIER_nondet_int()
%5 = icmp slt i32 %4, 0
br i1 %5, label %16, label %6
6: ; preds = %3
%7 = tail call i32 @mult(i32 %1, i32 %4)
%8 = tail call i32 @mult(i32 %4, i32 %1)
%9 = icmp eq i32 %7, 0
%10 = icmp ne i32 %1, 0
%11 = select i1 %9, i1 true, i1 %10
%12 = icmp ne i32 %4, 0
%13 = select i1 %11, i1 true, i1 %12
br i1 %13, label %16, label %14
14: ; preds = %6
%15 = tail call i32 (...) @__VERIFIER_error()
br label %16
16: ; preds = %3, %6, %14, %0
ret i32 0
}