#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_assert(int);
unsigned int __VERIFIER_nondet_uint();
int main() {
  int sn = 0;
  unsigned int loop1 = __VERIFIER_nondet_uint(), n1 = __VERIFIER_nondet_uint();
  unsigned int x = 0;
  while (1) {
    if (x < 10)
      sn = sn + (2);
    x++;
    __VERIFIER_assert(sn == x * (2) || sn == 0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_uint@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_uint@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jae    1164 <main+0x44>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x14(%rbp),%edx
shl    $0x1,%edx
mov    $0x1,%al
cmp    %edx,%ecx
mov    %al,-0x15(%rbp)
je     118d <main+0x6d>
cmpl   $0x0,-0x8(%rbp)
sete   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
jmp    1151 <main+0x31>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_uint@plt>
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_uint@plt>
mov    $0x2,%r14d
xor    %r15d,%r15d
lea    0x2(%rbx),%ebp
cmp    $0xa,%r15d
cmovae %ebx,%ebp
add    $0x1,%r15d
cmp    %ebp,%r14d
sete   %al
test   %ebp,%ebp
sete   %cl
or     %al,%cl
movzbl %cl,%edi
call   1030 <__VERIFIER_assert@plt>
add    $0x2,%r14d
mov    %ebp,%ebx
jmp    1140 <main+0x20>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%6 = call i32 (...) @__VERIFIER_nondet_uint()
store i32 %6, i32* %3
%7 = call i32 (...) @__VERIFIER_nondet_uint()
store i32 %7, i32* %4
store i32 0, i32* %5
br label %8
8: ; preds = %0, %24
%9 = load i32, i32* %5
%10 = icmp ult i32 %9, 10
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 2
store i32 %13, i32* %2
br label %14
14: ; preds = %11, %8
%15 = load i32, i32* %5
%16 = add i32 %15, 1
store i32 %16, i32* %5
%17 = load i32, i32* %2
%18 = load i32, i32* %5
%19 = mul i32 %18, 2
%20 = icmp eq i32 %17, %19
br i1 %20, label %24, label %21
21: ; preds = %14
%22 = load i32, i32* %2
%23 = icmp eq i32 %22, 0
br label %24
24: ; preds = %21, %14
%25 = phi i1 [ true, %14 ], [ %23, %21 ]
%26 = zext i1 %25 to i32
%27 = call i32 @__VERIFIER_assert(i32 %26)
br label %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_uint()
%2 = tail call i32 (...) @__VERIFIER_nondet_uint()
br label %3
3: ; preds = %3, %0
%4 = phi i32 [ 0, %0 ], [ %8, %3 ]
%5 = phi i32 [ 0, %0 ], [ %9, %3 ]
%6 = icmp ult i32 %5, 10
%7 = add nsw i32 %4, 2
%8 = select i1 %6, i32 %7, i32 %4
%9 = add i32 %5, 1
%10 = shl i32 %9, 1
%11 = icmp eq i32 %8, %10
%12 = icmp eq i32 %8, 0
%13 = or i1 %11, %12
%14 = zext i1 %13 to i32
%15 = tail call i32 @__VERIFIER_assert(i32 %14)
br label %3
}