#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*/ assert(int);
int /*<<< orphan*/ assume(int);
int /*<<< orphan*/ bound_var(int);
int /*<<< orphan*/ bounding_var(int);
void main() {
  int n, h;
  int i, j, k, m;
  bound_var(h);
  bounding_var(n);
  assume(n >= 0);
  assume(n <= 200);
  k = 0;
  i = n;
  h = i + k;
  while (i > 0) {
    i--;
    k++;
    h = i + k;
  }
  j = k;
  m = 0;
  h = j + m;
  while (j > 0) {
    j--;
    m++;
    h = j + m;
  }
  assert(i >= 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%edi
call   1030 <bound_var@plt>
mov    -0x4(%rbp),%edi
call   1050 <bounding_var@plt>
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assume@plt>
cmpl   $0xc8,-0x4(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assume@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    11bd <main+0x7d>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1193 <main+0x53>
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    11fd <main+0xbd>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    11d3 <main+0x93>
cmpl   $0x0,-0xc(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <bound_var@plt>
call   1050 <bounding_var@plt>
mov    $0x1,%edi
call   1060 <assume@plt>
mov    $0x1,%edi
call   1060 <assume@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = load i32, i32* %2
%8 = call i32 @bound_var(i32 %7)
%9 = load i32, i32* %1
%10 = call i32 @bounding_var(i32 %9)
%11 = load i32, i32* %1
%12 = icmp sge i32 %11, 0
%13 = zext i1 %12 to i32
%14 = call i32 @assume(i32 %13)
%15 = load i32, i32* %1
%16 = icmp sle i32 %15, 200
%17 = zext i1 %16 to i32
%18 = call i32 @assume(i32 %17)
store i32 0, i32* %5
%19 = load i32, i32* %1
store i32 %19, i32* %3
%20 = load i32, i32* %3
%21 = load i32, i32* %5
%22 = add nsw i32 %20, %21
store i32 %22, i32* %2
br label %23
23: ; preds = %26, %0
%24 = load i32, i32* %3
%25 = icmp sgt i32 %24, 0
br i1 %25, label %26, label %34
26: ; preds = %23
%27 = load i32, i32* %3
%28 = add nsw i32 %27, -1
store i32 %28, i32* %3
%29 = load i32, i32* %5
%30 = add nsw i32 %29, 1
store i32 %30, i32* %5
%31 = load i32, i32* %3
%32 = load i32, i32* %5
%33 = add nsw i32 %31, %32
store i32 %33, i32* %2
br label %23
34: ; preds = %23
%35 = load i32, i32* %5
store i32 %35, i32* %4
store i32 0, i32* %6
%36 = load i32, i32* %4
%37 = load i32, i32* %6
%38 = add nsw i32 %36, %37
store i32 %38, i32* %2
br label %39
39: ; preds = %42, %34
%40 = load i32, i32* %4
%41 = icmp sgt i32 %40, 0
br i1 %41, label %42, label %50
42: ; preds = %39
%43 = load i32, i32* %4
%44 = add nsw i32 %43, -1
store i32 %44, i32* %4
%45 = load i32, i32* %6
%46 = add nsw i32 %45, 1
store i32 %46, i32* %6
%47 = load i32, i32* %4
%48 = load i32, i32* %6
%49 = add nsw i32 %47, %48
store i32 %49, i32* %2
br label %39
50: ; preds = %39
%51 = load i32, i32* %3
%52 = icmp sge i32 %51, 0
%53 = zext i1 %52 to i32
%54 = call i32 @assert(i32 %53)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @bound_var(i32 undef)
%2 = tail call i32 @bounding_var(i32 undef)
%3 = tail call i32 @assume(i32 1)
%4 = tail call i32 @assume(i32 1)
%5 = tail call i32 @assert(i32 0)
ret void
}