#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 i;
  int j;
  assume(m >= 1000);
  assume(m <= 1024);
  assume(n >= 0);
  assume(n <= 64);
  i = m;
  j = 0;
  while (j < m) {
    j = j + 1;
    i = i + 2 * n;
  }
  assert(i == 2 * 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>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11ae <main+0x8e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
jmp    1186 <main+0x66>
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x1,%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)
%22 = load i32, i32* %2
store i32 %22, i32* %4
store i32 0, i32* %5
br label %23
23: ; preds = %27, %0
%24 = load i32, i32* %5
%25 = load i32, i32* %2
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %34
27: ; preds = %23
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
store i32 %29, i32* %5
%30 = load i32, i32* %4
%31 = load i32, i32* %3
%32 = mul nsw i32 2, %31
%33 = add nsw i32 %30, %32
store i32 %33, i32* %4
br label %23
34: ; preds = %23
%35 = load i32, i32* %4
%36 = load i32, i32* %2
%37 = mul nsw i32 2, %36
%38 = load i32, i32* %3
%39 = mul nsw i32 %37, %38
%40 = icmp eq i32 %35, %39
%41 = zext i1 %40 to i32
%42 = call i32 @assert(i32 %41)
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
}