#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);
int /*<<< orphan*/ __VERIFIER_assume(int);
int __VERIFIER_nondet_int();
void main() {
  int x, y;
  x = -50;
  y = __VERIFIER_nondet_int();
  __VERIFIER_assume(-1000 < y && y < 1000000);
  while (x < 0) {
    x = x + y;
    y++;
  }
  __VERIFIER_assert(y > 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffce,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
mov    $0xfffffc18,%ecx
cmp    -0x8(%rbp),%ecx
mov    %al,-0x9(%rbp)
jge    1169 <main+0x39>
cmpl   $0xf4240,-0x8(%rbp)
setl   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <__VERIFIER_assume@plt>
cmpl   $0x0,-0x4(%rbp)
jge    1197 <main+0x67>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1176 <main+0x46>
cmpl   $0x0,-0x8(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ebx
add    $0x3e7,%eax
xor    %edi,%edi
cmp    $0xf4627,%eax
setb   %dil
call   1050 <__VERIFIER_assume@plt>
mov    $0xffffffce,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ebx,%ecx
add    %ebx,%eax
lea    0x1(%rcx),%ebx
js     1160 <main+0x30>
neg    %ebx
shr    $0x1f,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <__VERIFIER_assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
store i32 -50, i32* %1
%3 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 -1000, %4
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 1000000
br label %9
9: ; preds = %6, %0
%10 = phi i1 [ false, %0 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
%12 = call i32 @__VERIFIER_assume(i32 %11)
br label %13
13: ; preds = %16, %9
%14 = load i32, i32* %1
%15 = icmp slt i32 %14, 0
br i1 %15, label %16, label %22
16: ; preds = %13
%17 = load i32, i32* %1
%18 = load i32, i32* %2
%19 = add nsw i32 %17, %18
store i32 %19, i32* %1
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
store i32 %21, i32* %2
br label %13
22: ; preds = %13
%23 = load i32, i32* %2
%24 = icmp sgt i32 %23, 0
%25 = zext i1 %24 to i32
%26 = call i32 @__VERIFIER_assert(i32 %25)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = add i32 %1, 999
%3 = icmp ult i32 %2, 1000999
%4 = zext i1 %3 to i32
%5 = tail call i32 @__VERIFIER_assume(i32 %4)
br label %6
6: ; preds = %0, %6
%7 = phi i32 [ %1, %0 ], [ %10, %6 ]
%8 = phi i32 [ -50, %0 ], [ %9, %6 ]
%9 = add nsw i32 %7, %8
%10 = add nsw i32 %7, 1
%11 = icmp slt i32 %9, 0
br i1 %11, label %6, label %12
12: ; preds = %6
%13 = xor i32 %7, -1
%14 = lshr i32 %13, 31
%15 = tail call i32 @__VERIFIER_assert(i32 %14)
ret void
}