#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 N = __VERIFIER_nondet_int();
  if (N >= 536870912 || x >= 536870912 || y >= 536870912 || x < -1073741824) {
    return 0;
  }
  if (x + y >= 0) {
    while (x <= N) {
      if (__VERIFIER_nondet_int()) {
        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    1171 <main+0x61>
cmpl   $0x20000000,-0x8(%rbp)
jge    1171 <main+0x61>
cmpl   $0x20000000,-0xc(%rbp)
jge    1171 <main+0x61>
cmpl   $0xc0000000,-0x8(%rbp)
jge    117d <main+0x6d>
movl   $0x0,-0x4(%rbp)
jmp    11e1 <main+0xd1>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    $0x0,%eax
jl     11da <main+0xca>
jmp    1191 <main+0x81>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     11d5 <main+0xc5>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%eax
je     11c7 <main+0xb7>
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    11d0 <main+0xc0>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1191 <main+0x81>
jmp    11da <main+0xca>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%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 sge i32 %8, 536870912
br i1 %9, label %19, label %10
10: ; preds = %0
%11 = load i32, i32* %2
%12 = icmp sge i32 %11, 536870912
br i1 %12, label %19, label %13
13: ; preds = %10
%14 = load i32, i32* %3
%15 = icmp sge i32 %14, 536870912
br i1 %15, label %19, label %16
16: ; preds = %13
%17 = load i32, i32* %2
%18 = icmp slt i32 %17, -1073741824
br i1 %18, label %19, label %20
19: ; preds = %16, %13, %10, %0
store i32 0, i32* %1
br label %46
20: ; preds = %16
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = add nsw i32 %21, %22
%24 = icmp sge i32 %23, 0
br i1 %24, label %25, label %45
25: ; preds = %20
br label %26
26: ; preds = %43, %25
%27 = load i32, i32* %2
%28 = load i32, i32* %4
%29 = icmp sle i32 %27, %28
br i1 %29, label %30, label %44
30: ; preds = %26
%31 = call i32 (...) @__VERIFIER_nondet_int()
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %40
33: ; preds = %30
%34 = load i32, i32* %2
%35 = mul nsw i32 2, %34
%36 = load i32, i32* %3
%37 = add nsw i32 %35, %36
store i32 %37, i32* %2
%38 = load i32, i32* %3
%39 = add nsw i32 %38, 1
store i32 %39, i32* %3
br label %43
40: ; preds = %30
%41 = load i32, i32* %2
%42 = add nsw i32 %41, 1
store i32 %42, i32* %2
br label %43
43: ; preds = %40, %33
br label %26
44: ; preds = %26
br label %45
45: ; preds = %44, %20
store i32 0, i32* %1
br label %46
46: ; preds = %45, %19
%47 = load i32, i32* %1
ret i32 %47
}

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 ], [ %2, %0 ]
%18 = phi i32 [ %24, %16 ], [ %1, %0 ]
%19 = tail call i32 (...) @__VERIFIER_nondet_int()
%20 = icmp eq i32 %19, 0
%21 = shl nsw i32 %18, 1
%22 = add nsw i32 %21, %17
%23 = add nsw i32 %18, 1
%24 = select i1 %20, i32 %23, i32 %22
%25 = xor i1 %20, true
%26 = zext i1 %25 to i32
%27 = add nsw i32 %17, %26
%28 = icmp sgt i32 %24, %3
br i1 %28, label %29, label %16
29: ; preds = %16, %0
ret i32 0
}