#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*/ __ESBMC_assume(int);
int /*<<< orphan*/ assert(int);
int main(int argc, char *argv[]) {
  int n0, n1, n2;
  int i = 0;
  int k = 0;
  __ESBMC_assume(i + k + 2 > n0 && i >= 0 && i + 2 > n0 && k + 2 > 0);
  i = 0;
  while (i < n0) {
    assert(k > 0);
    i++;
    k--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x20(%rbp),%ecx
add    -0x24(%rbp),%ecx
add    $0x2,%ecx
xor    %eax,%eax
cmp    -0x14(%rbp),%ecx
mov    %al,-0x25(%rbp)
jle    118d <main+0x6d>
xor    %eax,%eax
cmpl   $0x0,-0x20(%rbp)
mov    %al,-0x25(%rbp)
jl     118d <main+0x6d>
mov    -0x20(%rbp),%ecx
add    $0x2,%ecx
xor    %eax,%eax
cmp    -0x14(%rbp),%ecx
mov    %al,-0x25(%rbp)
jle    118d <main+0x6d>
mov    -0x24(%rbp),%eax
add    $0x2,%eax
cmp    $0x0,%eax
setg   %al
mov    %al,-0x25(%rbp)
mov    -0x25(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__ESBMC_assume@plt>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11d5 <main+0xb5>
cmpl   $0x0,-0x24(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    11a1 <main+0x81>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @__ESBMC_assume(i32 0)
ret i32 0
}