#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 */
scalar_t__ nondet();
void main() {
  int x, y, z, w;
  x = y = z = w = 0;
  while (nondet()) {
    if (nondet()) {
      x++;
      y = y + 2;
    } else if (nondet()) {
      if (x >= 4) {
        x++;
        y = y + 3;
        z = z + 10;
        w = w + 10;
      }
    } else if (x >= z && w >= y + 1) {
      x = -x;
      y = -y;
    }
    x = x;
  }
  if (3 * x <= y - 1)
    goto ERROR;
  return;
ERROR:;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <nondet@plt>
cmp    $0x0,%rax
je     11f3 <main+0xe3>
mov    $0x0,%al
call   1030 <nondet@plt>
cmp    $0x0,%rax
je     116d <main+0x5d>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    11e8 <main+0xd8>
mov    $0x0,%al
call   1030 <nondet@plt>
cmp    $0x0,%rax
je     11b1 <main+0xa1>
cmpl   $0x4,-0x4(%rbp)
jl     11ac <main+0x9c>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x10(%rbp)
jmp    11e3 <main+0xd3>
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     11de <main+0xce>
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jl     11de <main+0xce>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    11e3 <main+0xd3>
jmp    11e8 <main+0xd8>
mov    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1134 <main+0x24>
imul   $0x3,-0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     120a <main+0xfa>
jmp    120f <main+0xff>
jmp    1214 <main+0x104>
jmp    1214 <main+0x104>
add    $0x10,%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 <nondet@plt>
test   %rax,%rax
je     1141 <main+0x31>
xor    %eax,%eax
call   1030 <nondet@plt>
test   %rax,%rax
jne    1120 <main+0x10>
xor    %eax,%eax
call   1030 <nondet@plt>
jmp    1120 <main+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %4
store i32 0, i32* %3
store i32 0, i32* %2
store i32 0, i32* %1
br label %5
5: ; preds = %48, %0
%6 = call i64 (...) @nondet()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %50
8: ; preds = %5
%9 = call i64 (...) @nondet()
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 1
store i32 %13, i32* %1
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 2
store i32 %15, i32* %2
br label %48
16: ; preds = %8
%17 = call i64 (...) @nondet()
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %32
19: ; preds = %16
%20 = load i32, i32* %1
%21 = icmp sge i32 %20, 4
br i1 %21, label %22, label %31
22: ; preds = %19
%23 = load i32, i32* %1
%24 = add nsw i32 %23, 1
store i32 %24, i32* %1
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 3
store i32 %26, i32* %2
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 10
store i32 %28, i32* %3
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 10
store i32 %30, i32* %4
br label %31
31: ; preds = %22, %19
br label %47
32: ; preds = %16
%33 = load i32, i32* %1
%34 = load i32, i32* %3
%35 = icmp sge i32 %33, %34
br i1 %35, label %36, label %46
36: ; preds = %32
%37 = load i32, i32* %4
%38 = load i32, i32* %2
%39 = add nsw i32 %38, 1
%40 = icmp sge i32 %37, %39
br i1 %40, label %41, label %46
41: ; preds = %36
%42 = load i32, i32* %1
%43 = sub nsw i32 0, %42
store i32 %43, i32* %1
%44 = load i32, i32* %2
%45 = sub nsw i32 0, %44
store i32 %45, i32* %2
br label %46
46: ; preds = %41, %36, %32
br label %47
47: ; preds = %46, %31
br label %48
48: ; preds = %47, %11
%49 = load i32, i32* %1
store i32 %49, i32* %1
br label %5
50: ; preds = %5
%51 = load i32, i32* %1
%52 = mul nsw i32 3, %51
%53 = load i32, i32* %2
%54 = sub nsw i32 %53, 1
%55 = icmp sle i32 %52, %54
br i1 %55, label %56, label %57
56: ; preds = %50
br label %58
57: ; preds = %50
br label %59
58: ; preds = %56
br label %59
59: ; preds = %58, %57
ret void
}

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