#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 s__state;
  int s__hit = __VERIFIER_nondet_int();
  int blastFlag;
  int tmp___1;
  s__state = 8466;
  blastFlag = 0;
  while (1) {
    if (s__state <= 8512 && blastFlag > 2) {
      goto ERROR;
    }
    {
      {
        {
          {
            {
              if (s__state == 8466) {
                goto switch_1_8466;
              } else {
                {
                  {
                    if (s__state == 8512) {
                      goto switch_1_8512;
                    } else {
                      {
                        {
                          {
                            {
                              {
                                {
                                  {
                                    {
                                      {
                                        {
                                          {
                                            {
                                              {
                                                if (s__state == 8640) {
                                                  goto switch_1_8640;
                                                } else {
                                                  {
                                                    if (s__state == 8656) {
                                                      goto switch_1_8656;
                                                    } else {
                                                      {
                                                        {
                                                          goto end;
                                                        switch_1_8466:
                                                          if (blastFlag == 0) {
                                                            blastFlag = 2;
                                                          }
                                                          if (s__hit) {
                                                            s__state = 8656;
                                                          } else {
                                                            s__state = 8512;
                                                          }
                                                          goto switch_1_break;
                                                        switch_1_8512:
                                                          tmp___1 =
                                                              __VERIFIER_nondet_int();
                                                          if (tmp___1) {
                                                            s__state = 8466;
                                                          } else {
                                                            s__state = 8640;
                                                          }
                                                          goto switch_1_break;
                                                        switch_1_8640:
                                                          if (blastFlag == 3) {
                                                            blastFlag = 4;
                                                          }
                                                          if (s__hit) {
                                                            goto end;
                                                          } else {
                                                            s__state = 8656;
                                                          }
                                                          goto switch_1_break;
                                                        switch_1_8656:
                                                          if (blastFlag == 2) {
                                                            blastFlag = 3;
                                                          }
                                                          if (blastFlag == 4) {
                                                            blastFlag = 5;
                                                          } else {
                                                            if (blastFlag ==
                                                                5) {
                                                              goto ERROR;
                                                            }
                                                          }
                                                          if (s__hit) {
                                                            s__state = 8640;
                                                          } else {
                                                            goto end;
                                                          }
                                                          goto switch_1_break;
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  switch_1_break:;
  }
end:
  return (-1);
ERROR:
  __VERIFIER_error();
  return (-1);
}


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,-0xc(%rbp)
movl   $0x2112,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x2140,-0x8(%rbp)
jg     1163 <main+0x43>
cmpl   $0x2,-0x10(%rbp)
jle    1163 <main+0x43>
jmp    12a7 <main+0x187>
cmpl   $0x2112,-0x8(%rbp)
jne    1175 <main+0x55>
jmp    11b0 <main+0x90>
cmpl   $0x2140,-0x8(%rbp)
jne    1187 <main+0x67>
jmp    11e3 <main+0xc3>
cmpl   $0x21c0,-0x8(%rbp)
jne    1199 <main+0x79>
jmp    120f <main+0xef>
cmpl   $0x21d0,-0x8(%rbp)
jne    11ab <main+0x8b>
jmp    123b <main+0x11b>
jmp    129b <main+0x17b>
cmpl   $0x0,-0x10(%rbp)
jne    11c1 <main+0xa1>
movl   $0x2,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     11d7 <main+0xb7>
movl   $0x21d0,-0x8(%rbp)
jmp    11de <main+0xbe>
movl   $0x2140,-0x8(%rbp)
jmp    1296 <main+0x176>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1203 <main+0xe3>
movl   $0x2112,-0x8(%rbp)
jmp    120a <main+0xea>
movl   $0x21c0,-0x8(%rbp)
jmp    1296 <main+0x176>
cmpl   $0x3,-0x10(%rbp)
jne    1220 <main+0x100>
movl   $0x4,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     122f <main+0x10f>
jmp    129b <main+0x17b>
movl   $0x21d0,-0x8(%rbp)
jmp    1296 <main+0x176>
cmpl   $0x2,-0x10(%rbp)
jne    124c <main+0x12c>
movl   $0x3,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jne    1262 <main+0x142>
movl   $0x5,-0x10(%rbp)
jmp    1276 <main+0x156>
cmpl   $0x5,-0x10(%rbp)
jne    1271 <main+0x151>
jmp    12a7 <main+0x187>
jmp    1276 <main+0x156>
cmpl   $0x0,-0xc(%rbp)
je     128c <main+0x16c>
movl   $0x21c0,-0x8(%rbp)
jmp    1291 <main+0x171>
jmp    129b <main+0x17b>
jmp    1296 <main+0x176>
jmp    1147 <main+0x27>
movl   $0xffffffff,-0x4(%rbp)
jmp    12b5 <main+0x195>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
test   %eax,%eax
mov    $0x2140,%eax
mov    $0x21d0,%r13d
cmove  %eax,%r13d
mov    $0x2112,%ecx
mov    $0x2,%r14d
mov    $0x4,%r15d
mov    $0x3,%r12d
xor    %ebp,%ebp
xchg   %ax,%ax
cmp    $0x21bf,%ecx
jg     11a0 <main+0x80>
cmp    $0x2112,%ecx
je     11e0 <main+0xc0>
cmp    $0x2140,%ecx
jne    1224 <main+0x104>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    $0x21c0,%ecx
test   %eax,%eax
je     11e9 <main+0xc9>
mov    $0x2112,%ecx
cmp    $0x2140,%ecx
jbe    11f5 <main+0xd5>
jmp    1160 <main+0x40>
nopl   0x0(%rax,%rax,1)
cmp    $0x21c0,%ecx
je     1200 <main+0xe0>
cmp    $0x21d0,%ecx
jne    1224 <main+0x104>
cmp    $0x2,%ebp
cmove  %r12d,%ebp
mov    $0x5,%eax
cmp    $0x4,%ebp
je     11c8 <main+0xa8>
cmp    $0x5,%ebp
je     121d <main+0xfd>
mov    %ebp,%eax
mov    $0x21c0,%ecx
mov    %eax,%ebp
test   %ebx,%ebx
jne    11e9 <main+0xc9>
jmp    1224 <main+0x104>
cs nopw 0x0(%rax,%rax,1)
nop
test   %ebp,%ebp
cmove  %r14d,%ebp
mov    %r13d,%ecx
cmp    $0x2140,%ecx
ja     1160 <main+0x40>
cmp    $0x3,%ebp
jl     1160 <main+0x40>
jmp    121d <main+0xfd>
test   %ebx,%ebx
jne    1224 <main+0x104>
cmp    $0x3,%ebp
cmove  %r15d,%ebp
mov    $0x21d0,%ecx
cmp    $0x2140,%ecx
jbe    11f5 <main+0xd5>
jmp    1160 <main+0x40>
xor    %eax,%eax
call   1040 <__VERIFIER_error@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
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* %3
store i32 8466, i32* %2
store i32 0, i32* %4
br label %7
7: ; preds = %0, %77
%8 = load i32, i32* %2
%9 = icmp sle i32 %8, 8512
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i32, i32* %4
%12 = icmp sgt i32 %11, 2
br i1 %12, label %13, label %14
13: ; preds = %10
br label %79
14: ; preds = %10, %7
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 8466
br i1 %16, label %17, label %18
17: ; preds = %14
br label %31
18: ; preds = %14
%19 = load i32, i32* %2
%20 = icmp eq i32 %19, 8512
br i1 %20, label %21, label %22
21: ; preds = %18
br label %41
22: ; preds = %18
%23 = load i32, i32* %2
%24 = icmp eq i32 %23, 8640
br i1 %24, label %25, label %26
25: ; preds = %22
br label %48
26: ; preds = %22
%27 = load i32, i32* %2
%28 = icmp eq i32 %27, 8656
br i1 %28, label %29, label %30
29: ; preds = %26
br label %58
30: ; preds = %26
br label %78
31: ; preds = %17
%32 = load i32, i32* %4
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %35
34: ; preds = %31
store i32 2, i32* %4
br label %35
35: ; preds = %34, %31
%36 = load i32, i32* %3
%37 = icmp ne i32 %36, 0
br i1 %37, label %38, label %39
38: ; preds = %35
store i32 8656, i32* %2
br label %40
39: ; preds = %35
store i32 8512, i32* %2
br label %40
40: ; preds = %39, %38
br label %77
41: ; preds = %21
%42 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %42, i32* %5
%43 = load i32, i32* %5
%44 = icmp ne i32 %43, 0
br i1 %44, label %45, label %46
45: ; preds = %41
store i32 8466, i32* %2
br label %47
46: ; preds = %41
store i32 8640, i32* %2
br label %47
47: ; preds = %46, %45
br label %77
48: ; preds = %25
%49 = load i32, i32* %4
%50 = icmp eq i32 %49, 3
br i1 %50, label %51, label %52
51: ; preds = %48
store i32 4, i32* %4
br label %52
52: ; preds = %51, %48
%53 = load i32, i32* %3
%54 = icmp ne i32 %53, 0
br i1 %54, label %55, label %56
55: ; preds = %52
br label %78
56: ; preds = %52
store i32 8656, i32* %2
br label %57
57: ; preds = %56
br label %77
58: ; preds = %29
%59 = load i32, i32* %4
%60 = icmp eq i32 %59, 2
br i1 %60, label %61, label %62
61: ; preds = %58
store i32 3, i32* %4
br label %62
62: ; preds = %61, %58
%63 = load i32, i32* %4
%64 = icmp eq i32 %63, 4
br i1 %64, label %65, label %66
65: ; preds = %62
store i32 5, i32* %4
br label %71
66: ; preds = %62
%67 = load i32, i32* %4
%68 = icmp eq i32 %67, 5
br i1 %68, label %69, label %70
69: ; preds = %66
br label %79
70: ; preds = %66
br label %71
71: ; preds = %70, %65
%72 = load i32, i32* %3
%73 = icmp ne i32 %72, 0
br i1 %73, label %74, label %75
74: ; preds = %71
store i32 8640, i32* %2
br label %76
75: ; preds = %71
br label %78
76: ; preds = %74
br label %77
77: ; preds = %76, %57, %47, %40
br label %7
78: ; preds = %75, %55, %30
store i32 -1, i32* %1
br label %81
79: ; preds = %69, %13
%80 = call i32 (...) @__VERIFIER_error()
store i32 -1, i32* %1
br label %81
81: ; preds = %79, %78
%82 = load i32, i32* %1
ret i32 %82
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp eq i32 %1, 0
%3 = select i1 %2, i32 8512, i32 8656
br label %4
4: ; preds = %0, %24
%5 = phi i32 [ 0, %0 ], [ %26, %24 ]
%6 = phi i32 [ 8466, %0 ], [ %25, %24 ]
switch i32 %6, label %32 [
i32 8466, label %7
i32 8512, label %10
i32 8640, label %14
i32 8656, label %18
]
7: ; preds = %4
%8 = icmp eq i32 %5, 0
%9 = select i1 %8, i32 2, i32 %5
br label %24
10: ; preds = %4
%11 = tail call i32 (...) @__VERIFIER_nondet_int()
%12 = icmp eq i32 %11, 0
%13 = select i1 %12, i32 8640, i32 8466
br label %24
14: ; preds = %4
br i1 %2, label %15, label %32
15: ; preds = %14
%16 = icmp eq i32 %5, 3
%17 = select i1 %16, i32 4, i32 %5
br label %24
18: ; preds = %4
%19 = icmp eq i32 %5, 2
%20 = select i1 %19, i32 3, i32 %5
switch i32 %20, label %21 [
i32 4, label %22
i32 5, label %30
]
21: ; preds = %18
br label %22
22: ; preds = %18, %21
%23 = phi i32 [ 5, %18 ], [ %20, %21 ]
br i1 %2, label %32, label %24
24: ; preds = %22, %10, %7, %15
%25 = phi i32 [ 8656, %15 ], [ %3, %7 ], [ %13, %10 ], [ 8640, %22 ]
%26 = phi i32 [ %17, %15 ], [ %9, %7 ], [ %5, %10 ], [ %23, %22 ]
%27 = icmp ult i32 %25, 8513
%28 = icmp sgt i32 %26, 2
%29 = select i1 %27, i1 %28, i1 false
br i1 %29, label %30, label %4
30: ; preds = %18, %24
%31 = tail call i32 (...) @__VERIFIER_error()
br label %32
32: ; preds = %14, %22, %4, %30
ret i32 -1
}