#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 x = __VERIFIER_nondet_int();
  int y = __VERIFIER_nondet_int();
  int z = __VERIFIER_nondet_int();
  int tx = __VERIFIER_nondet_int();
  while (x >= y && x <= tx + z) {
    if (__VERIFIER_nondet_int()) {
      z = z - 1;
      tx = x;
      x = __VERIFIER_nondet_int();
    } else {
      y = y + 1;
    }
  }
  return 0;
}


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,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0x15(%rbp)
jl     1169 <main+0x59>
mov    -0x8(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    -0x10(%rbp),%ecx
cmp    %ecx,%eax
setle  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1179 <main+0x69>
jmp    11b5 <main+0xa5>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%eax
je     11a7 <main+0x97>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
jmp    11b0 <main+0xa0>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1147 <main+0x37>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
cmp    %r14d,%ebp
jl     1185 <main+0x75>
mov    %eax,%r15d
lea    (%r15,%rbx,1),%eax
cmp    %eax,%ebp
jg     1185 <main+0x75>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
je     1170 <main+0x60>
add    $0xffffffff,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %ebp,%r15d
cmp    %r14d,%eax
jge    117b <main+0x6b>
jmp    1185 <main+0x75>
nop
add    $0x1,%r14d
mov    %ebp,%eax
cmp    %r14d,%eax
jl     1185 <main+0x75>
lea    (%r15,%rbx,1),%ecx
mov    %eax,%ebp
cmp    %ecx,%eax
jle    1150 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
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* %2
%7 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %7, i32* %3
%8 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %8, i32* %4
%9 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %9, i32* %5
br label %10
10: ; preds = %33, %0
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = icmp sge i32 %11, %12
br i1 %13, label %14, label %20
14: ; preds = %10
%15 = load i32, i32* %2
%16 = load i32, i32* %5
%17 = load i32, i32* %4
%18 = add nsw i32 %16, %17
%19 = icmp sle i32 %15, %18
br label %20
20: ; preds = %14, %10
%21 = phi i1 [ false, %10 ], [ %19, %14 ]
br i1 %21, label %22, label %34
22: ; preds = %20
%23 = call i32 (...) @__VERIFIER_nondet_int()
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %30
25: ; preds = %22
%26 = load i32, i32* %4
%27 = sub nsw i32 %26, 1
store i32 %27, i32* %4
%28 = load i32, i32* %2
store i32 %28, i32* %5
%29 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %29, i32* %2
br label %33
30: ; preds = %22
%31 = load i32, i32* %3
%32 = add nsw i32 %31, 1
store i32 %32, i32* %3
br label %33
33: ; preds = %30, %25
br label %10
34: ; preds = %20
ret i32 0
}

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