#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, y, z;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  z = __VERIFIER_nondet_int();
  if (x <= 10000 && x >= -10000 && y <= 10000 && z <= 10000) {
    while (y >= 1) {
      x = x - 1;
      while (y < z) {
        x = x + 1;
        z = z - 1;
      }
      y = x + y;
    }
  }
  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)
cmpl   $0x2710,-0x8(%rbp)
jg     11bf <main+0xaf>
cmpl   $0xffffd8f0,-0x8(%rbp)
jl     11bf <main+0xaf>
cmpl   $0x2710,-0xc(%rbp)
jg     11bf <main+0xaf>
cmpl   $0x2710,-0x10(%rbp)
jg     11bf <main+0xaf>
jmp    1176 <main+0x66>
cmpl   $0x1,-0xc(%rbp)
jl     11ba <main+0xaa>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11ac <main+0x9c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1189 <main+0x79>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1176 <main+0x66>
jmp    11bf <main+0xaf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
lea    0x2710(%rbx),%ecx
cmp    $0x4e20,%ecx
ja     116a <main+0x5a>
cmp    $0x2710,%ebp
jg     116a <main+0x5a>
cmp    $0x2710,%eax
jg     116a <main+0x5a>
test   %ebp,%ebp
jle    116a <main+0x5a>
nopl   (%rax)
lea    (%rax,%rbx,1),%ecx
add    $0xffffffff,%ebx
mov    %ebp,%edx
not    %edx
add    %ecx,%edx
cmp    %eax,%ebp
cmovge %ebx,%edx
cmovl  %ebp,%eax
mov    %edx,%ebx
add    %edx,%ebp
jg     1150 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
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
%8 = load i32, i32* %2
%9 = icmp sle i32 %8, 10000
br i1 %9, label %10, label %40
10: ; preds = %0
%11 = load i32, i32* %2
%12 = icmp sge i32 %11, -10000
br i1 %12, label %13, label %40
13: ; preds = %10
%14 = load i32, i32* %3
%15 = icmp sle i32 %14, 10000
br i1 %15, label %16, label %40
16: ; preds = %13
%17 = load i32, i32* %4
%18 = icmp sle i32 %17, 10000
br i1 %18, label %19, label %40
19: ; preds = %16
br label %20
20: ; preds = %35, %19
%21 = load i32, i32* %3
%22 = icmp sge i32 %21, 1
br i1 %22, label %23, label %39
23: ; preds = %20
%24 = load i32, i32* %2
%25 = sub nsw i32 %24, 1
store i32 %25, i32* %2
br label %26
26: ; preds = %30, %23
%27 = load i32, i32* %3
%28 = load i32, i32* %4
%29 = icmp slt i32 %27, %28
br i1 %29, label %30, label %35
30: ; preds = %26
%31 = load i32, i32* %2
%32 = add nsw i32 %31, 1
store i32 %32, i32* %2
%33 = load i32, i32* %4
%34 = sub nsw i32 %33, 1
store i32 %34, i32* %4
br label %26
35: ; preds = %26
%36 = load i32, i32* %2
%37 = load i32, i32* %3
%38 = add nsw i32 %36, %37
store i32 %38, i32* %3
br label %20
39: ; preds = %20
br label %40
40: ; preds = %39, %16, %13, %10, %0
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 = add i32 %1, 10000
%5 = icmp ult i32 %4, 20001
%6 = icmp slt i32 %2, 10001
%7 = select i1 %5, i1 %6, i1 false
%8 = icmp slt i32 %3, 10001
%9 = select i1 %7, i1 %8, i1 false
%10 = icmp sgt i32 %2, 0
%11 = select i1 %9, i1 %10, i1 false
br i1 %11, label %12, label %25
12: ; preds = %0, %12
%13 = phi i32 [ %21, %12 ], [ %1, %0 ]
%14 = phi i32 [ %23, %12 ], [ %2, %0 ]
%15 = phi i32 [ %22, %12 ], [ %3, %0 ]
%16 = add nsw i32 %13, -1
%17 = icmp slt i32 %14, %15
%18 = add nsw i32 %15, -1
%19 = add i32 %18, %13
%20 = sub i32 %19, %14
%21 = select i1 %17, i32 %20, i32 %16
%22 = select i1 %17, i32 %14, i32 %15
%23 = add nsw i32 %21, %14
%24 = icmp sgt i32 %23, 0
br i1 %24, label %12, label %25
25: ; preds = %12, %0
ret i32 0
}