#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 /*<<< orphan*/ __VERIFIER_assume(int);
int __VERIFIER_nondet_int();
int /*<<< orphan*/ assert(int);
int main() {
  int x = 0, y = 0, z = 0;
  while (__VERIFIER_nondet_int()) {
    x = __VERIFIER_nondet_int();
    __VERIFIER_assume(x >= -10 && x <= 10);
    while (__VERIFIER_nondet_int()) {
    }
    if (x == 1) {
      y = x;
    } else if (x == -1) {
      z = -x;
    }
  }
  assert(x + y + z == x + y + z);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%eax
je     11da <main+0xaa>
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0xfffffff6,-0x8(%rbp)
mov    %al,-0x11(%rbp)
jl     1187 <main+0x57>
cmpl   $0xa,-0x8(%rbp)
setle  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <__VERIFIER_assume@plt>
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%eax
je     11a9 <main+0x79>
jmp    1194 <main+0x64>
cmpl   $0x1,-0x8(%rbp)
jne    11be <main+0x8e>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    11d5 <main+0xa5>
cmpl   $0xffffffff,-0x8(%rbp)
jne    11d0 <main+0xa0>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    11d5 <main+0xa5>
jmp    1154 <main+0x24>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
je     117d <main+0x4d>
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
add    $0xa,%eax
xor    %edi,%edi
cmp    $0x15,%eax
setb   %dil
call   1050 <__VERIFIER_assume@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
jne    1170 <main+0x40>
jmp    1140 <main+0x10>
mov    $0x1,%edi
call   1030 <assert@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
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %35, %0
%6 = call i32 (...) @__VERIFIER_nondet_int()
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %36
8: ; preds = %5
%9 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = icmp sge i32 %10, -10
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = load i32, i32* %2
%14 = icmp sle i32 %13, 10
br label %15
15: ; preds = %12, %8
%16 = phi i1 [ false, %8 ], [ %14, %12 ]
%17 = zext i1 %16 to i32
%18 = call i32 @__VERIFIER_assume(i32 %17)
br label %19
19: ; preds = %22, %15
%20 = call i32 (...) @__VERIFIER_nondet_int()
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %19
br label %19
23: ; preds = %19
%24 = load i32, i32* %2
%25 = icmp eq i32 %24, 1
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = load i32, i32* %2
store i32 %27, i32* %3
br label %35
28: ; preds = %23
%29 = load i32, i32* %2
%30 = icmp eq i32 %29, -1
br i1 %30, label %31, label %34
31: ; preds = %28
%32 = load i32, i32* %2
%33 = sub nsw i32 0, %32
store i32 %33, i32* %4
br label %34
34: ; preds = %31, %28
br label %35
35: ; preds = %34, %26
br label %5
36: ; preds = %5
%37 = load i32, i32* %2
%38 = load i32, i32* %3
%39 = add nsw i32 %37, %38
%40 = load i32, i32* %4
%41 = add nsw i32 %39, %40
%42 = load i32, i32* %2
%43 = load i32, i32* %3
%44 = add nsw i32 %42, %43
%45 = load i32, i32* %4
%46 = add nsw i32 %44, %45
%47 = icmp eq i32 %41, %46
%48 = zext i1 %47 to i32
%49 = call i32 @assert(i32 %48)
%50 = load i32, i32* %1
ret i32 %50
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp eq i32 %1, 0
br i1 %2, label %15, label %3
3: ; preds = %0, %12
%4 = tail call i32 (...) @__VERIFIER_nondet_int()
%5 = add i32 %4, 10
%6 = icmp ult i32 %5, 21
%7 = zext i1 %6 to i32
%8 = tail call i32 @__VERIFIER_assume(i32 %7)
br label %9
9: ; preds = %9, %3
%10 = tail call i32 (...) @__VERIFIER_nondet_int()
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %9
12: ; preds = %9
%13 = tail call i32 (...) @__VERIFIER_nondet_int()
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %3
15: ; preds = %12, %0
%16 = tail call i32 @assert(i32 1)
ret i32 0
}