#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 lk1 = 0;
  int lk2 = 0;
  int lk3 = 0;
  int lk4 = 0;
  int lk5 = 0;
  int cond = __VERIFIER_nondet_int();
  while (cond) {
    while (cond) {
      while (cond) {
        if (cond == 1) {
          lk3 = 1;
        } else {
          cond = 2;
        }
        if (cond == 1) {
          if (lk3 != 1)
            goto ERROR;
          lk3 = 0;
        } else {
        }
        cond = __VERIFIER_nondet_int();
      }
      cond = __VERIFIER_nondet_int();
      if (cond == 1) {
        lk2 = 1;
      } else {
        cond = 2;
      }
      if (cond == 1) {
        if (lk2 != 1)
          goto ERROR;
        lk2 = 0;
      } else {
      }
      cond = __VERIFIER_nondet_int();
    }
    cond = __VERIFIER_nondet_int();
    if (cond == 1) {
      lk1 = 1;
    } else {
      cond = 2;
    }
    if (cond == 1) {
      if (lk1 != 1)
        goto ERROR;
      lk1 = 0;
    } else {
    }
    cond = __VERIFIER_nondet_int();
  }
  cond = __VERIFIER_nondet_int();
  while (cond) {
    while (cond) {
      if (cond == 1) {
        lk5 = 1;
      } else {
        cond = 2;
      }
      if (cond == 1) {
        if (lk5 != 1)
          goto ERROR;
        lk5 = 0;
      } else {
      }
      cond = __VERIFIER_nondet_int();
    }
    cond = __VERIFIER_nondet_int();
    if (cond == 1) {
      lk4 = 1;
    } else {
      cond = 2;
    }
    if (cond == 1) {
      if (lk4 != 1)
        goto ERROR;
      lk4 = 0;
    } else {
    }
    cond = __VERIFIER_nondet_int();
  }
  return 0;
ERROR:
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     128a <main+0x17a>
jmp    115b <main+0x4b>
cmpl   $0x0,-0x1c(%rbp)
je     122a <main+0x11a>
jmp    116a <main+0x5a>
cmpl   $0x0,-0x1c(%rbp)
je     11ca <main+0xba>
cmpl   $0x1,-0x1c(%rbp)
jne    118a <main+0x7a>
movl   $0x1,-0x10(%rbp)
jmp    1191 <main+0x81>
movl   $0x2,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    11b6 <main+0xa6>
cmpl   $0x1,-0x10(%rbp)
je     11aa <main+0x9a>
jmp    136f <main+0x25f>
movl   $0x0,-0x10(%rbp)
jmp    11bb <main+0xab>
jmp    11bb <main+0xab>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
jmp    116a <main+0x5a>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    11ea <main+0xda>
movl   $0x1,-0xc(%rbp)
jmp    11f1 <main+0xe1>
movl   $0x2,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    1216 <main+0x106>
cmpl   $0x1,-0xc(%rbp)
je     120a <main+0xfa>
jmp    136f <main+0x25f>
movl   $0x0,-0xc(%rbp)
jmp    121b <main+0x10b>
jmp    121b <main+0x10b>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
jmp    115b <main+0x4b>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    124a <main+0x13a>
movl   $0x1,-0x8(%rbp)
jmp    1251 <main+0x141>
movl   $0x2,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    1276 <main+0x166>
cmpl   $0x1,-0x8(%rbp)
je     126a <main+0x15a>
jmp    136f <main+0x25f>
movl   $0x0,-0x8(%rbp)
jmp    127b <main+0x16b>
jmp    127b <main+0x16b>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
jmp    114c <main+0x3c>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1363 <main+0x253>
jmp    12a3 <main+0x193>
cmpl   $0x0,-0x1c(%rbp)
je     1303 <main+0x1f3>
cmpl   $0x1,-0x1c(%rbp)
jne    12c3 <main+0x1b3>
movl   $0x1,-0x18(%rbp)
jmp    12ca <main+0x1ba>
movl   $0x2,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    12ef <main+0x1df>
cmpl   $0x1,-0x18(%rbp)
je     12e3 <main+0x1d3>
jmp    136f <main+0x25f>
movl   $0x0,-0x18(%rbp)
jmp    12f4 <main+0x1e4>
jmp    12f4 <main+0x1e4>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
jmp    12a3 <main+0x193>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    1323 <main+0x213>
movl   $0x1,-0x14(%rbp)
jmp    132a <main+0x21a>
movl   $0x2,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    134f <main+0x23f>
cmpl   $0x1,-0x14(%rbp)
je     1343 <main+0x233>
jmp    136f <main+0x25f>
movl   $0x0,-0x14(%rbp)
jmp    1354 <main+0x244>
jmp    1354 <main+0x244>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
jmp    1294 <main+0x184>
movl   $0x0,-0x4(%rbp)
jmp    1376 <main+0x266>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
je     1172 <main+0x62>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jne    1130 <main+0x20>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jne    1130 <main+0x20>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
jmp    1120 <main+0x10>
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jne    1160 <main+0x50>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jne    1160 <main+0x50>
xor    %eax,%eax
pop    %rcx
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
%7 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
%8 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %8, i32* %7
br label %9
9: ; preds = %68, %0
%10 = load i32, i32* %7
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %70
12: ; preds = %9
br label %13
13: ; preds = %51, %12
%14 = load i32, i32* %7
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %53
16: ; preds = %13
br label %17
17: ; preds = %34, %16
%18 = load i32, i32* %7
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %36
20: ; preds = %17
%21 = load i32, i32* %7
%22 = icmp eq i32 %21, 1
br i1 %22, label %23, label %24
23: ; preds = %20
store i32 1, i32* %4
br label %25
24: ; preds = %20
store i32 2, i32* %7
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %7
%27 = icmp eq i32 %26, 1
br i1 %27, label %28, label %33
28: ; preds = %25
%29 = load i32, i32* %4
%30 = icmp ne i32 %29, 1
br i1 %30, label %31, label %32
31: ; preds = %28
br label %113
32: ; preds = %28
store i32 0, i32* %4
br label %34
33: ; preds = %25
br label %34
34: ; preds = %33, %32
%35 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %35, i32* %7
br label %17
36: ; preds = %17
%37 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %37, i32* %7
%38 = load i32, i32* %7
%39 = icmp eq i32 %38, 1
br i1 %39, label %40, label %41
40: ; preds = %36
store i32 1, i32* %3
br label %42
41: ; preds = %36
store i32 2, i32* %7
br label %42
42: ; preds = %41, %40
%43 = load i32, i32* %7
%44 = icmp eq i32 %43, 1
br i1 %44, label %45, label %50
45: ; preds = %42
%46 = load i32, i32* %3
%47 = icmp ne i32 %46, 1
br i1 %47, label %48, label %49
48: ; preds = %45
br label %113
49: ; preds = %45
store i32 0, i32* %3
br label %51
50: ; preds = %42
br label %51
51: ; preds = %50, %49
%52 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %52, i32* %7
br label %13
53: ; preds = %13
%54 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %54, i32* %7
%55 = load i32, i32* %7
%56 = icmp eq i32 %55, 1
br i1 %56, label %57, label %58
57: ; preds = %53
store i32 1, i32* %2
br label %59
58: ; preds = %53
store i32 2, i32* %7
br label %59
59: ; preds = %58, %57
%60 = load i32, i32* %7
%61 = icmp eq i32 %60, 1
br i1 %61, label %62, label %67
62: ; preds = %59
%63 = load i32, i32* %2
%64 = icmp ne i32 %63, 1
br i1 %64, label %65, label %66
65: ; preds = %62
br label %113
66: ; preds = %62
store i32 0, i32* %2
br label %68
67: ; preds = %59
br label %68
68: ; preds = %67, %66
%69 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %69, i32* %7
br label %9
70: ; preds = %9
%71 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %71, i32* %7
br label %72
72: ; preds = %110, %70
%73 = load i32, i32* %7
%74 = icmp ne i32 %73, 0
br i1 %74, label %75, label %112
75: ; preds = %72
br label %76
76: ; preds = %93, %75
%77 = load i32, i32* %7
%78 = icmp ne i32 %77, 0
br i1 %78, label %79, label %95
79: ; preds = %76
%80 = load i32, i32* %7
%81 = icmp eq i32 %80, 1
br i1 %81, label %82, label %83
82: ; preds = %79
store i32 1, i32* %6
br label %84
83: ; preds = %79
store i32 2, i32* %7
br label %84
84: ; preds = %83, %82
%85 = load i32, i32* %7
%86 = icmp eq i32 %85, 1
br i1 %86, label %87, label %92
87: ; preds = %84
%88 = load i32, i32* %6
%89 = icmp ne i32 %88, 1
br i1 %89, label %90, label %91
90: ; preds = %87
br label %113
91: ; preds = %87
store i32 0, i32* %6
br label %93
92: ; preds = %84
br label %93
93: ; preds = %92, %91
%94 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %94, i32* %7
br label %76
95: ; preds = %76
%96 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %96, i32* %7
%97 = load i32, i32* %7
%98 = icmp eq i32 %97, 1
br i1 %98, label %99, label %100
99: ; preds = %95
store i32 1, i32* %5
br label %101
100: ; preds = %95
store i32 2, i32* %7
br label %101
101: ; preds = %100, %99
%102 = load i32, i32* %7
%103 = icmp eq i32 %102, 1
br i1 %103, label %104, label %109
104: ; preds = %101
%105 = load i32, i32* %5
%106 = icmp ne i32 %105, 1
br i1 %106, label %107, label %108
107: ; preds = %104
br label %113
108: ; preds = %104
store i32 0, i32* %5
br label %110
109: ; preds = %101
br label %110
110: ; preds = %109, %108
%111 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %111, i32* %7
br label %72
112: ; preds = %72
store i32 0, i32* %1
br label %114
113: ; preds = %107, %90, %65, %48, %31
store i32 0, i32* %1
br label %114
114: ; preds = %113, %112
%115 = load i32, i32* %1
ret i32 %115
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp eq i32 %1, 0
br i1 %2, label %15, label %3
3: ; preds = %0, %6
%4 = tail call i32 (...) @__VERIFIER_nondet_int()
%5 = icmp eq i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %3, %11, %7
br label %3
7: ; preds = %3
%8 = tail call i32 (...) @__VERIFIER_nondet_int()
%9 = tail call i32 (...) @__VERIFIER_nondet_int()
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %6
11: ; preds = %7
%12 = tail call i32 (...) @__VERIFIER_nondet_int()
%13 = tail call i32 (...) @__VERIFIER_nondet_int()
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %6
15: ; preds = %11, %0
%16 = tail call i32 (...) @__VERIFIER_nondet_int()
%17 = icmp eq i32 %16, 0
br i1 %17, label %26, label %18
18: ; preds = %15, %21
%19 = tail call i32 (...) @__VERIFIER_nondet_int()
%20 = icmp eq i32 %19, 0
br i1 %20, label %22, label %21
21: ; preds = %18, %22
br label %18
22: ; preds = %18
%23 = tail call i32 (...) @__VERIFIER_nondet_int()
%24 = tail call i32 (...) @__VERIFIER_nondet_int()
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %21
26: ; preds = %22, %15
ret i32 0
}