#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 (i < 4) {
    j = 0;
    while (j < 4) {
      __CRAB_assert(i <= j + 3);
      i++;
      j++;
    }
    i = i - j + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    1181 <main+0x71>
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    1170 <main+0x60>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x3,%ecx
cmp    %ecx,%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__CRAB_assert@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <main+0x27>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
mov    $0x1,%edi
call   1030 <__CRAB_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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 = %22, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 4
br i1 %6, label %7, label %27
7: ; preds = %4
store i32 0, i32* %3
br label %8
8: ; preds = %11, %7
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 4
br i1 %10, label %11, label %22
11: ; preds = %8
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 3
%15 = icmp sle i32 %12, %14
%16 = zext i1 %15 to i32
%17 = call i32 @__CRAB_assert(i32 %16)
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %8
22: ; preds = %8
%23 = load i32, i32* %2
%24 = load i32, i32* %3
%25 = sub nsw i32 %23, %24
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
br label %4
27: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__CRAB_assert(i32 1)
%2 = tail call i32 @__CRAB_assert(i32 1)
%3 = tail call i32 @__CRAB_assert(i32 1)
%4 = tail call i32 @__CRAB_assert(i32 1)
%5 = tail call i32 @__CRAB_assert(i32 1)
%6 = tail call i32 @__CRAB_assert(i32 1)
%7 = tail call i32 @__CRAB_assert(i32 1)
%8 = tail call i32 @__CRAB_assert(i32 1)
%9 = tail call i32 @__CRAB_assert(i32 1)
%10 = tail call i32 @__CRAB_assert(i32 1)
%11 = tail call i32 @__CRAB_assert(i32 1)
%12 = tail call i32 @__CRAB_assert(i32 1)
%13 = tail call i32 @__CRAB_assert(i32 1)
%14 = tail call i32 @__CRAB_assert(i32 1)
%15 = tail call i32 @__CRAB_assert(i32 1)
%16 = tail call i32 @__CRAB_assert(i32 1)
ret i32 0
}