#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);
scalar_t__ __VERIFIER_nondet_int();
int main(void) {
  int i, j;
L0:
  i = 0;
L1:
  while (__VERIFIER_nondet_int() && i < 1000000) {
    i++;
  }
  if (i >= 100)
  STUCK:
    goto STUCK;
  j = 0;
L2:
  while (__VERIFIER_nondet_int() && i < 1000000) {
    i++;
    j++;
  }
  if (j >= 100)
    goto STUCK;
  __VERIFIER_assert(i < 200);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
jmp    113b <main+0x1b>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0xd(%rbp)
je     1161 <main+0x41>
cmpl   $0xf4240,-0x8(%rbp)
setl   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1171 <main+0x51>
jmp    117f <main+0x5f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113b <main+0x1b>
cmpl   $0x64,-0x8(%rbp)
jl     1193 <main+0x73>
jmp    118e <main+0x6e>
jmp    118e <main+0x6e>
movl   $0x0,-0xc(%rbp)
jmp    119f <main+0x7f>
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0xe(%rbp)
je     11c5 <main+0xa5>
cmpl   $0xf4240,-0x8(%rbp)
setl   %al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%al
test   $0x1,%al
jne    11d5 <main+0xb5>
jmp    11ec <main+0xcc>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    119f <main+0x7f>
cmpl   $0x64,-0xc(%rbp)
jl     11fb <main+0xdb>
jmp    118e <main+0x6e>
cmpl   $0xc8,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebp,%ebx
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
lea    0x1(%rbx),%ebp
test   %rax,%rax
je     1149 <main+0x29>
cmp    $0xf4240,%ebx
jb     1130 <main+0x10>
cmp    $0x63,%ebx
ja     1180 <main+0x60>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %rax,%rax
je     1186 <main+0x66>
mov    $0xffffffff,%ebx
nop
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
lea    0x1(%rbx),%ecx
test   %rax,%rax
je     117b <main+0x5b>
add    %ebp,%ebx
cmp    $0xf423f,%ebx
mov    %ecx,%ebx
jb     1160 <main+0x40>
cmp    $0x63,%ecx
jb     1182 <main+0x62>
jmp    1180 <main+0x60>
add    %ecx,%ebp
mov    %ebp,%ebx
xor    %edi,%edi
cmp    $0xc8,%ebx
setb   %dil
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
br label %4
4: ; preds = %0
store i32 0, i32* %2
br label %5
5: ; preds = %4
br label %6
6: ; preds = %14, %5
%7 = call i64 (...) @__VERIFIER_nondet_int()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 1000000
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ false, %6 ], [ %11, %9 ]
br i1 %13, label %14, label %17
14: ; preds = %12
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %6
17: ; preds = %12
%18 = load i32, i32* %2
%19 = icmp sge i32 %18, 100
br i1 %19, label %20, label %22
20: ; preds = %17
br label %21
21: ; preds = %40, %21, %20
br label %21
22: ; preds = %17
store i32 0, i32* %3
br label %23
23: ; preds = %22
br label %24
24: ; preds = %32, %23
%25 = call i64 (...) @__VERIFIER_nondet_int()
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %30
27: ; preds = %24
%28 = load i32, i32* %2
%29 = icmp slt i32 %28, 1000000
br label %30
30: ; preds = %27, %24
%31 = phi i1 [ false, %24 ], [ %29, %27 ]
br i1 %31, label %32, label %37
32: ; preds = %30
%33 = load i32, i32* %2
%34 = add nsw i32 %33, 1
store i32 %34, i32* %2
%35 = load i32, i32* %3
%36 = add nsw i32 %35, 1
store i32 %36, i32* %3
br label %24
37: ; preds = %30
%38 = load i32, i32* %3
%39 = icmp sge i32 %38, 100
br i1 %39, label %40, label %41
40: ; preds = %37
br label %21
41: ; preds = %37
%42 = load i32, i32* %2
%43 = icmp slt i32 %42, 200
%44 = zext i1 %43 to i32
%45 = call i32 @__VERIFIER_assert(i32 %44)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %7, %1 ]
%3 = tail call i64 (...) @__VERIFIER_nondet_int()
%4 = icmp ne i64 %3, 0
%5 = icmp ult i32 %2, 1000000
%6 = select i1 %4, i1 %5, i1 false
%7 = add nuw nsw i32 %2, 1
br i1 %6, label %1, label %8
8: ; preds = %1
%9 = icmp ugt i32 %2, 99
br i1 %9, label %25, label %10
10: ; preds = %8
%11 = tail call i64 (...) @__VERIFIER_nondet_int()
%12 = icmp eq i64 %11, 0
br i1 %12, label %26, label %14
13: ; preds = %25, %13
br label %13
14: ; preds = %10, %14
%15 = phi i32 [ %18, %14 ], [ 0, %10 ]
%16 = phi i32 [ %17, %14 ], [ %2, %10 ]
%17 = add nuw nsw i32 %16, 1
%18 = add nuw nsw i32 %15, 1
%19 = tail call i64 (...) @__VERIFIER_nondet_int()
%20 = icmp ne i64 %19, 0
%21 = icmp ult i32 %16, 999999
%22 = select i1 %20, i1 %21, i1 false
br i1 %22, label %14, label %23
23: ; preds = %14
%24 = icmp ugt i32 %15, 98
br i1 %24, label %25, label %26
25: ; preds = %8, %23
br label %13
26: ; preds = %10, %23
%27 = phi i32 [ %17, %23 ], [ %2, %10 ]
%28 = icmp ult i32 %27, 200
%29 = zext i1 %28 to i32
%30 = tail call i32 @__VERIFIER_assert(i32 %29)
ret i32 0
}