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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%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    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1196 <main+0x86>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%eax
je     1170 <main+0x60>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1191 <main+0x81>
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
imul   -0x10(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113d <main+0x2d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
cmp    %r14d,%ebx
jl     1169 <main+0x59>
mov    %eax,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
lea    0x1(%rbx),%ecx
sub    %ebp,%ebx
mov    %ebp,%edx
imul   %ebp,%edx
xor    %esi,%esi
test   %eax,%eax
cmovne %ecx,%ebx
cmovne %ecx,%edx
sete   %sil
sub    %esi,%ebp
add    %edx,%r14d
cmp    %r14d,%ebx
jge    1140 <main+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %2
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %3
%7 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %7, i32* %4
br label %8
8: ; preds = %32, %0
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = icmp sge i32 %9, %10
br i1 %11, label %12, label %33
12: ; preds = %8
%13 = call i32 (...) @__VERIFIER_nondet_int()
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
%18 = load i32, i32* %3
%19 = load i32, i32* %2
%20 = add nsw i32 %18, %19
store i32 %20, i32* %3
br label %32
21: ; preds = %12
%22 = load i32, i32* %2
%23 = load i32, i32* %4
%24 = sub nsw i32 %22, %23
store i32 %24, i32* %2
%25 = load i32, i32* %3
%26 = load i32, i32* %4
%27 = load i32, i32* %4
%28 = mul nsw i32 %26, %27
%29 = add nsw i32 %25, %28
store i32 %29, i32* %3
%30 = load i32, i32* %4
%31 = sub nsw i32 %30, 1
store i32 %31, i32* %4
br label %32
32: ; preds = %21, %15
br label %8
33: ; preds = %8
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 = icmp slt i32 %1, %2
br i1 %4, label %20, label %5
5: ; preds = %0, %5
%6 = phi i32 [ %17, %5 ], [ %3, %0 ]
%7 = phi i32 [ %18, %5 ], [ %2, %0 ]
%8 = phi i32 [ %14, %5 ], [ %1, %0 ]
%9 = tail call i32 (...) @__VERIFIER_nondet_int()
%10 = icmp eq i32 %9, 0
%11 = add nsw i32 %8, 1
%12 = sub nsw i32 %8, %6
%13 = mul nsw i32 %6, %6
%14 = select i1 %10, i32 %12, i32 %11
%15 = select i1 %10, i32 %13, i32 %11
%16 = sext i1 %10 to i32
%17 = add nsw i32 %6, %16
%18 = add nsw i32 %15, %7
%19 = icmp slt i32 %14, %18
br i1 %19, label %20, label %5
20: ; preds = %5, %0
ret i32 0
}