#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, i, r, N;
  N = 10;
  x = 0;
  y = 0;
  i = 0;
  while (i < N) {
    i = i + 1;
    r = __VERIFIER_nondet_int();
    if (r >= 0 && r <= 3) {
      if (r == 0) {
        x = x + 1;
      } else {
        if (r == 1) {
          x = x - 1;
        } else {
          if (r == 2) {
            y = y + 1;
          } else {
            if (r == 3) {
              y = y - 1;
            }
          }
        }
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x18(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    11e2 <main+0xd2>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     11dd <main+0xcd>
cmpl   $0x3,-0x14(%rbp)
jg     11dd <main+0xcd>
cmpl   $0x0,-0x14(%rbp)
jne    1186 <main+0x76>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11d8 <main+0xc8>
cmpl   $0x1,-0x14(%rbp)
jne    119e <main+0x8e>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11d3 <main+0xc3>
cmpl   $0x2,-0x14(%rbp)
jne    11b6 <main+0xa6>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11ce <main+0xbe>
cmpl   $0x3,-0x14(%rbp)
jne    11c9 <main+0xb9>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11ce <main+0xbe>
jmp    11d3 <main+0xc3>
jmp    11d8 <main+0xc8>
jmp    11dd <main+0xcd>
jmp    113b <main+0x2b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %6
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %7
7: ; preds = %48, %0
%8 = load i32, i32* %4
%9 = load i32, i32* %6
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %49
11: ; preds = %7
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 1
store i32 %13, i32* %4
%14 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %14, i32* %5
%15 = load i32, i32* %5
%16 = icmp sge i32 %15, 0
br i1 %16, label %17, label %48
17: ; preds = %11
%18 = load i32, i32* %5
%19 = icmp sle i32 %18, 3
br i1 %19, label %20, label %48
20: ; preds = %17
%21 = load i32, i32* %5
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = load i32, i32* %2
%25 = add nsw i32 %24, 1
store i32 %25, i32* %2
br label %47
26: ; preds = %20
%27 = load i32, i32* %5
%28 = icmp eq i32 %27, 1
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = load i32, i32* %2
%31 = sub nsw i32 %30, 1
store i32 %31, i32* %2
br label %46
32: ; preds = %26
%33 = load i32, i32* %5
%34 = icmp eq i32 %33, 2
br i1 %34, label %35, label %38
35: ; preds = %32
%36 = load i32, i32* %3
%37 = add nsw i32 %36, 1
store i32 %37, i32* %3
br label %45
38: ; preds = %32
%39 = load i32, i32* %5
%40 = icmp eq i32 %39, 3
br i1 %40, label %41, label %44
41: ; preds = %38
%42 = load i32, i32* %3
%43 = sub nsw i32 %42, 1
store i32 %43, i32* %3
br label %44
44: ; preds = %41, %38
br label %45
45: ; preds = %44, %35
br label %46
46: ; preds = %45, %29
br label %47
47: ; preds = %46, %23
br label %48
48: ; preds = %47, %17, %11
br label %7
49: ; preds = %7
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 = tail call i32 (...) @__VERIFIER_nondet_int()
%5 = tail call i32 (...) @__VERIFIER_nondet_int()
%6 = tail call i32 (...) @__VERIFIER_nondet_int()
%7 = tail call i32 (...) @__VERIFIER_nondet_int()
%8 = tail call i32 (...) @__VERIFIER_nondet_int()
%9 = tail call i32 (...) @__VERIFIER_nondet_int()
%10 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}