int main_test() {
  int n0 = -1073741824;
  int n1 = 1;
  int n2 = 1;
  int i = 0;
  int k = 0;
  while (i < n0) {
    i++;
    k++;
  }
  i = 0;
  while (i < n1) {
    i = 1;
    k = 1;
  }
  i = 0;
  while (i < n2) {
    i = 1;
    k = 2;
  }
  i = 0;
  while (i < n2) {
    i = 1;
    k = 1;
  }
  i = 0;
  while (i < n1) {
    i++;
    k--;
  }
  i = 0;
  while (i < n0) {
    i++;
    k--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main_test>:
push   %rbp
mov    %rsp,%rbp
movl   $0xc0000000,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    114a <main_test+0x4a>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <main_test+0x27>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1170 <main_test+0x70>
movl   $0x1,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
jmp    1151 <main_test+0x51>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1196 <main_test+0x96>
movl   $0x1,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
jmp    1177 <main_test+0x77>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11bc <main_test+0xbc>
movl   $0x1,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
jmp    119d <main_test+0x9d>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11e6 <main_test+0xe6>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    11c3 <main_test+0xc3>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1210 <main_test+0x110>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    11ed <main_test+0xed>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main_test>:
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @main_test() {
ret i32 0
}