#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 /*<<< orphan*/ changeMethaneLevel();
int /*<<< orphan*/ cleanup();
int /*<<< orphan*/ timeShift();
int /*<<< orphan*/ waterRise();
void test(void) {
  int splverifierCounter;
  int tmp;
  int tmp___0;
  int tmp___1;
  int tmp___2;
  {
    splverifierCounter = 0;
    {
      while (1) {
      while_1_continue:;
        if (splverifierCounter < 4) {
        } else {
          goto while_1_break;
        }
        { tmp = __VERIFIER_nondet_int(); }
        if (tmp) {
          { waterRise(); }
        } else {
        }
        { tmp___0 = __VERIFIER_nondet_int(); }
        if (tmp___0) {
          { changeMethaneLevel(); }
        } else {
        }
        { tmp___2 = __VERIFIER_nondet_int(); }
        if (tmp___2) {
        } else {
          { tmp___1 = __VERIFIER_nondet_int(); }
          if (tmp___1) {
          } else {
          }
        }
        { timeShift(); }
      }
    while_1_break:;
    }
    { cleanup(); }
    return;
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
jmp    1164 <test+0x14>
cmpl   $0x4,-0x4(%rbp)
jge    1173 <test+0x23>
jmp    1178 <test+0x28>
jmp    120a <test+0xba>
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1198 <test+0x48>
mov    $0x0,%al
call   1030 <waterRise@plt>
jmp    119d <test+0x4d>
jmp    119d <test+0x4d>
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     11bd <test+0x6d>
mov    $0x0,%al
call   1050 <changeMethaneLevel@plt>
jmp    11c2 <test+0x72>
jmp    11c2 <test+0x72>
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     11db <test+0x8b>
jmp    11fe <test+0xae>
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     11f4 <test+0xa4>
jmp    11f9 <test+0xa9>
jmp    11f9 <test+0xa9>
jmp    11fe <test+0xae>
mov    $0x0,%al
call   1070 <timeShift@plt>
jmp    115f <test+0xf>
mov    $0x0,%al
call   1060 <cleanup@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
jmp    1157 <test+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1060 <timeShift@plt>
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
je     1169 <test+0x29>
xor    %eax,%eax
call   1030 <waterRise@plt>
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
je     117b <test+0x3b>
xor    %eax,%eax
call   1050 <changeMethaneLevel@plt>
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jne    1150 <test+0x10>
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
jmp    1150 <test+0x10>

LLVM IR (-O0):
define void @test() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
br label %6
6: ; preds = %0, %38
br label %7
7: ; preds = %6
%8 = load i32, i32* %1
%9 = icmp slt i32 %8, 4
br i1 %9, label %10, label %11
10: ; preds = %7
br label %12
11: ; preds = %7
br label %40
12: ; preds = %10
%13 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 (...) @waterRise()
br label %19
18: ; preds = %12
br label %19
19: ; preds = %18, %16
%20 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %20, i32* %3
%21 = load i32, i32* %3
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = call i32 (...) @changeMethaneLevel()
br label %26
25: ; preds = %19
br label %26
26: ; preds = %25, %23
%27 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %27, i32* %5
%28 = load i32, i32* %5
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %31
30: ; preds = %26
br label %38
31: ; preds = %26
%32 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %32, i32* %4
%33 = load i32, i32* %4
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %36
35: ; preds = %31
br label %37
36: ; preds = %31
br label %37
37: ; preds = %36, %35
br label %38
38: ; preds = %37, %30
%39 = call i32 (...) @timeShift()
br label %6
40: ; preds = %11
%41 = call i32 (...) @cleanup()
ret void
}

LLVM IR (-O2):
define void @test() {
br label %1
1: ; preds = %16, %0
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 (...) @waterRise()
br label %6
6: ; preds = %1, %4
%7 = tail call i32 (...) @__VERIFIER_nondet_int()
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 (...) @changeMethaneLevel()
br label %11
11: ; preds = %6, %9
%12 = tail call i32 (...) @__VERIFIER_nondet_int()
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = tail call i32 (...) @__VERIFIER_nondet_int()
br label %16
16: ; preds = %11, %14
%17 = tail call i32 (...) @timeShift()
br label %1
}