#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, N;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  N = __VERIFIER_nondet_int();
  if (N < 536870912 && x < 536870912 && y < 536870912 && x >= -1073741824) {
    if (x + y >= 0) {
      while (x <= N) {
        if (__VERIFIER_nondet_int() != 0) {
          x = 2 * x + y;
          y = y + 1;
        } else {
          x = x + 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)
cmpl   $0x20000000,-0x10(%rbp)
jge    11d3 <main+0xc3>
cmpl   $0x20000000,-0x8(%rbp)
jge    11d3 <main+0xc3>
cmpl   $0x20000000,-0xc(%rbp)
jge    11d3 <main+0xc3>
cmpl   $0xc0000000,-0x8(%rbp)
jl     11d3 <main+0xc3>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    $0x0,%eax
jl     11ce <main+0xbe>
jmp    1185 <main+0x75>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     11c9 <main+0xb9>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%eax
je     11bb <main+0xab>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11c4 <main+0xb4>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1185 <main+0x75>
jmp    11ce <main+0xbe>
jmp    11d3 <main+0xc3>
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    $0x1fffffff,%eax
jg     1186 <main+0x76>
cmp    $0x1fffffff,%ebx
jg     1186 <main+0x76>
cmp    $0x1fffffff,%r14d
jg     1186 <main+0x76>
cmp    $0xc0000000,%ebx
jl     1186 <main+0x76>
mov    %eax,%ebp
mov    %r14d,%eax
add    %ebx,%eax
js     1186 <main+0x76>
nopw   0x0(%rax,%rax,1)
cmp    %ebp,%ebx
jg     1186 <main+0x76>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
lea    0x1(%rbx),%ecx
xor    %edx,%edx
test   %eax,%eax
setne  %dl
lea    (%r14,%rbx,2),%ebx
cmove  %ecx,%ebx
add    %r14d,%edx
mov    %edx,%r14d
cmp    %ebp,%ebx
jle    1164 <main+0x54>
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
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 536870912
br i1 %9, label %10, label %45
10: ; preds = %0
%11 = load i32, i32* %2
%12 = icmp slt i32 %11, 536870912
br i1 %12, label %13, label %45
13: ; preds = %10
%14 = load i32, i32* %3
%15 = icmp slt i32 %14, 536870912
br i1 %15, label %16, label %45
16: ; preds = %13
%17 = load i32, i32* %2
%18 = icmp sge i32 %17, -1073741824
br i1 %18, label %19, label %45
19: ; preds = %16
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = add nsw i32 %20, %21
%23 = icmp sge i32 %22, 0
br i1 %23, label %24, label %44
24: ; preds = %19
br label %25
25: ; preds = %42, %24
%26 = load i32, i32* %2
%27 = load i32, i32* %4
%28 = icmp sle i32 %26, %27
br i1 %28, label %29, label %43
29: ; preds = %25
%30 = call i32 (...) @__VERIFIER_nondet_int()
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %39
32: ; preds = %29
%33 = load i32, i32* %2
%34 = mul nsw i32 2, %33
%35 = load i32, i32* %3
%36 = add nsw i32 %34, %35
store i32 %36, i32* %2
%37 = load i32, i32* %3
%38 = add nsw i32 %37, 1
store i32 %38, i32* %3
br label %42
39: ; preds = %29
%40 = load i32, i32* %2
%41 = add nsw i32 %40, 1
store i32 %41, i32* %2
br label %42
42: ; preds = %39, %32
br label %25
43: ; preds = %25
br label %44
44: ; preds = %43, %19
br label %45
45: ; preds = %44, %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 = icmp sgt i32 %3, 536870911
%5 = icmp sgt i32 %1, 536870911
%6 = select i1 %4, i1 true, i1 %5
%7 = icmp sgt i32 %2, 536870911
%8 = select i1 %6, i1 true, i1 %7
%9 = icmp slt i32 %1, -1073741824
%10 = select i1 %8, i1 true, i1 %9
%11 = add nsw i32 %2, %1
%12 = icmp slt i32 %11, 0
%13 = select i1 %10, i1 true, i1 %12
%14 = icmp sgt i32 %1, %3
%15 = select i1 %13, i1 true, i1 %14
br i1 %15, label %29, label %16
16: ; preds = %0, %16
%17 = phi i32 [ %27, %16 ], [ %1, %0 ]
%18 = phi i32 [ %26, %16 ], [ %2, %0 ]
%19 = tail call i32 (...) @__VERIFIER_nondet_int()
%20 = icmp eq i32 %19, 0
%21 = shl nsw i32 %17, 1
%22 = add nsw i32 %21, %18
%23 = add nsw i32 %17, 1
%24 = xor i1 %20, true
%25 = zext i1 %24 to i32
%26 = add nsw i32 %18, %25
%27 = select i1 %20, i32 %23, i32 %22
%28 = icmp sgt i32 %27, %3
br i1 %28, label %29, label %16
29: ; preds = %16, %0
ret i32 0
}