#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 main() {
  int m;
  int n;
  int res;
  int itLeft;
  assume(m >= 1000);
  assume(m <= 1024);
  assume(n >= 0);
  assume(n <= 64);
  res = 0;
  itLeft = m;
  while (itLeft > 0) {
    itLeft = itLeft - 1;
    res = res + n;
  }
  assert(res == m * n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
cmpl   $0x400,-0x8(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
cmpl   $0x0,-0xc(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
cmpl   $0x40,-0xc(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    11a7 <main+0x87>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1186 <main+0x66>
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   -0xc(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = load i32, i32* %2
%7 = icmp sge i32 %6, 1000
%8 = zext i1 %7 to i32
%9 = call i32 @assume(i32 %8)
%10 = load i32, i32* %2
%11 = icmp sle i32 %10, 1024
%12 = zext i1 %11 to i32
%13 = call i32 @assume(i32 %12)
%14 = load i32, i32* %3
%15 = icmp sge i32 %14, 0
%16 = zext i1 %15 to i32
%17 = call i32 @assume(i32 %16)
%18 = load i32, i32* %3
%19 = icmp sle i32 %18, 64
%20 = zext i1 %19 to i32
%21 = call i32 @assume(i32 %20)
store i32 0, i32* %4
%22 = load i32, i32* %2
store i32 %22, i32* %5
br label %23
23: ; preds = %26, %0
%24 = load i32, i32* %5
%25 = icmp sgt i32 %24, 0
br i1 %25, label %26, label %32
26: ; preds = %23
%27 = load i32, i32* %5
%28 = sub nsw i32 %27, 1
store i32 %28, i32* %5
%29 = load i32, i32* %4
%30 = load i32, i32* %3
%31 = add nsw i32 %29, %30
store i32 %31, i32* %4
br label %23
32: ; preds = %23
%33 = load i32, i32* %4
%34 = load i32, i32* %2
%35 = load i32, i32* %3
%36 = mul nsw i32 %34, %35
%37 = icmp eq i32 %33, %36
%38 = zext i1 %37 to i32
%39 = call i32 @assert(i32 %38)
ret i32 0
}

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