#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 main() {
  int p1 = __VERIFIER_nondet_int();
  int lk1;
  int p2 = __VERIFIER_nondet_int();
  int lk2;
  int cond;
  while (1) {
    cond = __VERIFIER_nondet_int();
    if (cond == 0) {
      goto out;
    } else {
    }
    lk1 = 0;
    lk2 = 0;
    if (p1 != 0) {
      lk1 = 1;
    } else {
    }
    if (p2 != 0) {
      lk2 = 1;
    } else {
    }
    if (p1 != 0) {
      if (lk1 != 1)
        goto ERROR;
      lk1 = 0;
    } else {
    }
    if (p2 != 0) {
      if (lk2 != 1)
        goto ERROR;
      lk2 = 0;
    } else {
      goto ERROR;
    }
  }
out:
  return 0;
ERROR:
  __VERIFIER_error();
  return 0;
}


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,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jne    115c <main+0x3c>
jmp    11fe <main+0xde>
jmp    1161 <main+0x41>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1185 <main+0x65>
movl   $0x1,-0xc(%rbp)
jmp    118a <main+0x6a>
jmp    118a <main+0x6a>
cmpl   $0x0,-0x10(%rbp)
je     11a0 <main+0x80>
movl   $0x1,-0x14(%rbp)
jmp    11a5 <main+0x85>
jmp    11a5 <main+0x85>
cmpl   $0x0,-0x8(%rbp)
je     11ca <main+0xaa>
cmpl   $0x1,-0xc(%rbp)
je     11be <main+0x9e>
jmp    120a <main+0xea>
movl   $0x0,-0xc(%rbp)
jmp    11cf <main+0xaf>
jmp    11cf <main+0xaf>
cmpl   $0x0,-0x10(%rbp)
je     11f4 <main+0xd4>
cmpl   $0x1,-0x14(%rbp)
je     11e8 <main+0xc8>
jmp    120a <main+0xea>
movl   $0x0,-0x14(%rbp)
jmp    11f9 <main+0xd9>
jmp    120a <main+0xea>
jmp    1143 <main+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1218 <main+0xf8>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
movl   $0x0,-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>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
je     1156 <main+0x36>
test   %ebx,%ebx
jne    1140 <main+0x20>
xor    %eax,%eax
call   1040 <__VERIFIER_error@plt>
xor    %eax,%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
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %7, i32* %2
%8 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %8, i32* %4
br label %9
9: ; preds = %0, %43
%10 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %9
br label %44
14: ; preds = %9
br label %15
15: ; preds = %14
store i32 0, i32* %3
store i32 0, i32* %5
%16 = load i32, i32* %2
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 1, i32* %3
br label %20
19: ; preds = %15
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %4
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %20
store i32 1, i32* %5
br label %25
24: ; preds = %20
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %2
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %33
28: ; preds = %25
%29 = load i32, i32* %3
%30 = icmp ne i32 %29, 1
br i1 %30, label %31, label %32
31: ; preds = %28
br label %45
32: ; preds = %28
store i32 0, i32* %3
br label %34
33: ; preds = %25
br label %34
34: ; preds = %33, %32
%35 = load i32, i32* %4
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %42
37: ; preds = %34
%38 = load i32, i32* %5
%39 = icmp ne i32 %38, 1
br i1 %39, label %40, label %41
40: ; preds = %37
br label %45
41: ; preds = %37
store i32 0, i32* %5
br label %43
42: ; preds = %34
br label %45
43: ; preds = %41
br label %9
44: ; preds = %13
store i32 0, i32* %1
br label %47
45: ; preds = %42, %40, %31
%46 = call i32 (...) @__VERIFIER_error()
store i32 0, i32* %1
br label %47
47: ; preds = %45, %44
%48 = load i32, i32* %1
ret i32 %48
}

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