#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) {
    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) {
    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();
  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();
  while (cond) {
    if (cond == 1) {
      lk4 = 1;
    } else {
      cond = 2;
    }
    if (cond == 1) {
      if (lk4 != 1)
        goto ERROR;
      lk4 = 0;
    } else {
    }
    cond = __VERIFIER_nondet_int();
  }
  cond = __VERIFIER_nondet_int();
  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();
  }
  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     11ac <main+0x9c>
cmpl   $0x1,-0x1c(%rbp)
jne    116c <main+0x5c>
movl   $0x1,-0x8(%rbp)
jmp    1173 <main+0x63>
movl   $0x2,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    1198 <main+0x88>
cmpl   $0x1,-0x8(%rbp)
je     118c <main+0x7c>
jmp    1360 <main+0x250>
movl   $0x0,-0x8(%rbp)
jmp    119d <main+0x8d>
jmp    119d <main+0x8d>
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     1216 <main+0x106>
cmpl   $0x1,-0x1c(%rbp)
jne    11d6 <main+0xc6>
movl   $0x1,-0xc(%rbp)
jmp    11dd <main+0xcd>
movl   $0x2,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    1202 <main+0xf2>
cmpl   $0x1,-0xc(%rbp)
je     11f6 <main+0xe6>
jmp    1360 <main+0x250>
movl   $0x0,-0xc(%rbp)
jmp    1207 <main+0xf7>
jmp    1207 <main+0xf7>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
jmp    11b6 <main+0xa6>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1280 <main+0x170>
cmpl   $0x1,-0x1c(%rbp)
jne    1240 <main+0x130>
movl   $0x1,-0x10(%rbp)
jmp    1247 <main+0x137>
movl   $0x2,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    126c <main+0x15c>
cmpl   $0x1,-0x10(%rbp)
je     1260 <main+0x150>
jmp    1360 <main+0x250>
movl   $0x0,-0x10(%rbp)
jmp    1271 <main+0x161>
jmp    1271 <main+0x161>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
jmp    1220 <main+0x110>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     12ea <main+0x1da>
cmpl   $0x1,-0x1c(%rbp)
jne    12aa <main+0x19a>
movl   $0x1,-0x14(%rbp)
jmp    12b1 <main+0x1a1>
movl   $0x2,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    12d6 <main+0x1c6>
cmpl   $0x1,-0x14(%rbp)
je     12ca <main+0x1ba>
jmp    1360 <main+0x250>
movl   $0x0,-0x14(%rbp)
jmp    12db <main+0x1cb>
jmp    12db <main+0x1cb>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
jmp    128a <main+0x17a>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1354 <main+0x244>
cmpl   $0x1,-0x1c(%rbp)
jne    1314 <main+0x204>
movl   $0x1,-0x18(%rbp)
jmp    131b <main+0x20b>
movl   $0x2,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    1340 <main+0x230>
cmpl   $0x1,-0x18(%rbp)
je     1334 <main+0x224>
jmp    1360 <main+0x250>
movl   $0x0,-0x18(%rbp)
jmp    1345 <main+0x235>
jmp    1345 <main+0x235>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
jmp    12f4 <main+0x1e4>
movl   $0x0,-0x4(%rbp)
jmp    1367 <main+0x257>
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
jne    1120 <main+0x10>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jne    1130 <main+0x20>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jne    1140 <main+0x30>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jne    1150 <main+0x40>
nopl   0x0(%rax,%rax,1)
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 = %26, %0
%10 = load i32, i32* %7
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %28
12: ; preds = %9
%13 = load i32, i32* %7
%14 = icmp eq i32 %13, 1
br i1 %14, label %15, label %16
15: ; preds = %12
store i32 1, i32* %2
br label %17
16: ; preds = %12
store i32 2, i32* %7
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %7
%19 = icmp eq i32 %18, 1
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = load i32, i32* %2
%22 = icmp ne i32 %21, 1
br i1 %22, label %23, label %24
23: ; preds = %20
br label %113
24: ; preds = %20
store i32 0, i32* %2
br label %26
25: ; preds = %17
br label %26
26: ; preds = %25, %24
%27 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %27, i32* %7
br label %9
28: ; preds = %9
%29 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %29, i32* %7
br label %30
30: ; preds = %47, %28
%31 = load i32, i32* %7
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %49
33: ; preds = %30
%34 = load i32, i32* %7
%35 = icmp eq i32 %34, 1
br i1 %35, label %36, label %37
36: ; preds = %33
store i32 1, i32* %3
br label %38
37: ; preds = %33
store i32 2, i32* %7
br label %38
38: ; preds = %37, %36
%39 = load i32, i32* %7
%40 = icmp eq i32 %39, 1
br i1 %40, label %41, label %46
41: ; preds = %38
%42 = load i32, i32* %3
%43 = icmp ne i32 %42, 1
br i1 %43, label %44, label %45
44: ; preds = %41
br label %113
45: ; preds = %41
store i32 0, i32* %3
br label %47
46: ; preds = %38
br label %47
47: ; preds = %46, %45
%48 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %48, i32* %7
br label %30
49: ; preds = %30
%50 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %50, i32* %7
br label %51
51: ; preds = %68, %49
%52 = load i32, i32* %7
%53 = icmp ne i32 %52, 0
br i1 %53, label %54, label %70
54: ; preds = %51
%55 = load i32, i32* %7
%56 = icmp eq i32 %55, 1
br i1 %56, label %57, label %58
57: ; preds = %54
store i32 1, i32* %4
br label %59
58: ; preds = %54
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* %4
%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* %4
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 %51
70: ; preds = %51
%71 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %71, i32* %7
br label %72
72: ; preds = %89, %70
%73 = load i32, i32* %7
%74 = icmp ne i32 %73, 0
br i1 %74, label %75, label %91
75: ; preds = %72
%76 = load i32, i32* %7
%77 = icmp eq i32 %76, 1
br i1 %77, label %78, label %79
78: ; preds = %75
store i32 1, i32* %5
br label %80
79: ; preds = %75
store i32 2, i32* %7
br label %80
80: ; preds = %79, %78
%81 = load i32, i32* %7
%82 = icmp eq i32 %81, 1
br i1 %82, label %83, label %88
83: ; preds = %80
%84 = load i32, i32* %5
%85 = icmp ne i32 %84, 1
br i1 %85, label %86, label %87
86: ; preds = %83
br label %113
87: ; preds = %83
store i32 0, i32* %5
br label %89
88: ; preds = %80
br label %89
89: ; preds = %88, %87
%90 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %90, i32* %7
br label %72
91: ; preds = %72
%92 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %92, i32* %7
br label %93
93: ; preds = %110, %91
%94 = load i32, i32* %7
%95 = icmp ne i32 %94, 0
br i1 %95, label %96, label %112
96: ; preds = %93
%97 = load i32, i32* %7
%98 = icmp eq i32 %97, 1
br i1 %98, label %99, label %100
99: ; preds = %96
store i32 1, i32* %6
br label %101
100: ; preds = %96
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* %6
%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* %6
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 %93
112: ; preds = %93
store i32 0, i32* %1
br label %114
113: ; preds = %107, %86, %65, %44, %23
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 %6, label %3
3: ; preds = %0, %3
%4 = tail call i32 (...) @__VERIFIER_nondet_int()
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %3
6: ; preds = %3, %0
%7 = tail call i32 (...) @__VERIFIER_nondet_int()
%8 = icmp eq i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %6, %9
%10 = tail call i32 (...) @__VERIFIER_nondet_int()
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %9
12: ; preds = %9, %6
%13 = tail call i32 (...) @__VERIFIER_nondet_int()
%14 = icmp eq i32 %13, 0
br i1 %14, label %18, label %15
15: ; preds = %12, %15
%16 = tail call i32 (...) @__VERIFIER_nondet_int()
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %15
18: ; preds = %15, %12
%19 = tail call i32 (...) @__VERIFIER_nondet_int()
%20 = icmp eq i32 %19, 0
br i1 %20, label %24, label %21
21: ; preds = %18, %21
%22 = tail call i32 (...) @__VERIFIER_nondet_int()
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %21
24: ; preds = %21, %18
%25 = tail call i32 (...) @__VERIFIER_nondet_int()
%26 = icmp eq i32 %25, 0
br i1 %26, label %30, label %27
27: ; preds = %24, %27
%28 = tail call i32 (...) @__VERIFIER_nondet_int()
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %27
30: ; preds = %27, %24
ret i32 0
}