#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 n = __VERIFIER_nondet_int();
  int x = __VERIFIER_nondet_int();
  int y = __VERIFIER_nondet_int();
  while (x >= 0) {
    while (y >= 0 && __VERIFIER_nondet_int())
      y--;
    x--;
    while (y <= n && __VERIFIER_nondet_int())
      y++;
  }
  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)
cmpl   $0x0,-0xc(%rbp)
jl     11d6 <main+0xc6>
jmp    114c <main+0x3c>
xor    %eax,%eax
cmpl   $0x0,-0x10(%rbp)
mov    %al,-0x11(%rbp)
jl     116b <main+0x5b>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    117b <main+0x6b>
jmp    1189 <main+0x79>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    114c <main+0x3c>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%ecx
xor    %eax,%eax
cmp    -0x8(%rbp),%ecx
mov    %al,-0x12(%rbp)
jg     11b3 <main+0xa3>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%eax
setne  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
test   $0x1,%al
jne    11c3 <main+0xb3>
jmp    11d1 <main+0xc1>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1192 <main+0x82>
jmp    113d <main+0x2d>
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,%r14d
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%r15d
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %r15d,%r15d
js     1186 <main+0x76>
mov    %eax,%ebx
lea    0x1(%r14),%ebp
jmp    114c <main+0x3c>
nop
lea    -0x1(%r15),%eax
test   %r15d,%r15d
mov    %eax,%r15d
jle    1186 <main+0x76>
test   %ebx,%ebx
js     1169 <main+0x59>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
je     1169 <main+0x59>
lea    -0x1(%rbx),%eax
test   %ebx,%ebx
mov    %eax,%ebx
jg     1150 <main+0x40>
mov    $0xffffffff,%ebx
cmp    %r14d,%ebx
jg     1140 <main+0x30>
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
je     1140 <main+0x30>
add    $0x1,%ebx
cmp    %ebx,%ebp
jne    1170 <main+0x60>
mov    %ebp,%ebx
jmp    1140 <main+0x30>
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
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 = %38, %0
%9 = load i32, i32* %3
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %39
11: ; preds = %8
br label %12
12: ; preds = %20, %11
%13 = load i32, i32* %4
%14 = icmp sge i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = call i32 (...) @__VERIFIER_nondet_int()
%17 = icmp ne i32 %16, 0
br label %18
18: ; preds = %15, %12
%19 = phi i1 [ false, %12 ], [ %17, %15 ]
br i1 %19, label %20, label %23
20: ; preds = %18
%21 = load i32, i32* %4
%22 = add nsw i32 %21, -1
store i32 %22, i32* %4
br label %12
23: ; preds = %18
%24 = load i32, i32* %3
%25 = add nsw i32 %24, -1
store i32 %25, i32* %3
br label %26
26: ; preds = %35, %23
%27 = load i32, i32* %4
%28 = load i32, i32* %2
%29 = icmp sle i32 %27, %28
br i1 %29, label %30, label %33
30: ; preds = %26
%31 = call i32 (...) @__VERIFIER_nondet_int()
%32 = icmp ne i32 %31, 0
br label %33
33: ; preds = %30, %26
%34 = phi i1 [ false, %26 ], [ %32, %30 ]
br i1 %34, label %35, label %38
35: ; preds = %33
%36 = load i32, i32* %4
%37 = add nsw i32 %36, 1
store i32 %37, i32* %4
br label %26
38: ; preds = %33
br label %8
39: ; 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 sgt i32 %2, -1
br i1 %4, label %5, label %32
5: ; preds = %0
%6 = add i32 %1, 1
br label %7
7: ; preds = %5, %29
%8 = phi i32 [ %30, %29 ], [ %3, %5 ]
%9 = phi i32 [ %20, %29 ], [ %2, %5 ]
%10 = icmp sgt i32 %8, -1
br i1 %10, label %11, label %18
11: ; preds = %7, %15
%12 = phi i32 [ %16, %15 ], [ %8, %7 ]
%13 = tail call i32 (...) @__VERIFIER_nondet_int()
%14 = icmp eq i32 %13, 0
br i1 %14, label %18, label %15
15: ; preds = %11
%16 = add nsw i32 %12, -1
%17 = icmp sgt i32 %12, 0
br i1 %17, label %11, label %18
18: ; preds = %11, %15, %7
%19 = phi i32 [ %8, %7 ], [ -1, %15 ], [ %12, %11 ]
%20 = add nsw i32 %9, -1
%21 = icmp sgt i32 %19, %1
br i1 %21, label %29, label %22
22: ; preds = %18, %26
%23 = phi i32 [ %27, %26 ], [ %19, %18 ]
%24 = tail call i32 (...) @__VERIFIER_nondet_int()
%25 = icmp eq i32 %24, 0
br i1 %25, label %29, label %26
26: ; preds = %22
%27 = add i32 %23, 1
%28 = icmp eq i32 %23, %1
br i1 %28, label %29, label %22
29: ; preds = %22, %26, %18
%30 = phi i32 [ %19, %18 ], [ %6, %26 ], [ %23, %22 ]
%31 = icmp sgt i32 %9, 0
br i1 %31, label %7, label %32
32: ; preds = %29, %0
ret i32 0
}