#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*/ __CRAB_assert(int);
int main(void) {
  int i, j;
  i = 0;
  while (1) {
    i++;
    j = 0;
    while (j < 10) {
      __CRAB_assert(i >= 0);
      __CRAB_assert(i <= 10);
      j++;
    }
    if (i > 9)
      i = 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1170 <main+0x60>
cmpl   $0x0,-0x8(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__CRAB_assert@plt>
cmpl   $0xa,-0x8(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__CRAB_assert@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x26>
cmpl   $0x9,-0x8(%rbp)
jle    1181 <main+0x71>
movl   $0x0,-0x8(%rbp)
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %r14d,%r14d
xor    %ebp,%ebp
nopl   0x0(%rax)
xor    %ebx,%ebx
cmp    $0xffffffff,%ebp
setge  %bl
mov    %ebx,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    %ebx,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    %ebx,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    %ebx,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    %ebx,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    %ebx,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    %ebx,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    %ebx,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    %ebx,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    %ebx,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
cmp    $0x9,%ebp
lea    0x1(%rbp),%eax
cmovge %r14d,%eax
mov    %eax,%ebp
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %0, %25
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
store i32 %6, i32* %2
store i32 0, i32* %3
br label %7
7: ; preds = %10, %4
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 10
br i1 %9, label %10, label %21
10: ; preds = %7
%11 = load i32, i32* %2
%12 = icmp sge i32 %11, 0
%13 = zext i1 %12 to i32
%14 = call i32 @__CRAB_assert(i32 %13)
%15 = load i32, i32* %2
%16 = icmp sle i32 %15, 10
%17 = zext i1 %16 to i32
%18 = call i32 @__CRAB_assert(i32 %17)
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %7
21: ; preds = %7
%22 = load i32, i32* %2
%23 = icmp sgt i32 %22, 9
br i1 %23, label %24, label %25
24: ; preds = %21
store i32 0, i32* %2
br label %25
25: ; preds = %24, %21
br label %4
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %27, %1 ]
%3 = icmp sgt i32 %2, -2
%4 = zext i1 %3 to i32
%5 = tail call i32 @__CRAB_assert(i32 %4)
%6 = tail call i32 @__CRAB_assert(i32 1)
%7 = tail call i32 @__CRAB_assert(i32 %4)
%8 = tail call i32 @__CRAB_assert(i32 1)
%9 = tail call i32 @__CRAB_assert(i32 %4)
%10 = tail call i32 @__CRAB_assert(i32 1)
%11 = tail call i32 @__CRAB_assert(i32 %4)
%12 = tail call i32 @__CRAB_assert(i32 1)
%13 = tail call i32 @__CRAB_assert(i32 %4)
%14 = tail call i32 @__CRAB_assert(i32 1)
%15 = tail call i32 @__CRAB_assert(i32 %4)
%16 = tail call i32 @__CRAB_assert(i32 1)
%17 = tail call i32 @__CRAB_assert(i32 %4)
%18 = tail call i32 @__CRAB_assert(i32 1)
%19 = tail call i32 @__CRAB_assert(i32 %4)
%20 = tail call i32 @__CRAB_assert(i32 1)
%21 = tail call i32 @__CRAB_assert(i32 %4)
%22 = tail call i32 @__CRAB_assert(i32 1)
%23 = tail call i32 @__CRAB_assert(i32 %4)
%24 = tail call i32 @__CRAB_assert(i32 1)
%25 = add nsw i32 %2, 1
%26 = icmp sgt i32 %2, 8
%27 = select i1 %26, i32 0, i32 %25
br label %1
}