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


x86 assembly (clang, -O0):
<main_test>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-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    1146 <main_test+0x46>
movl   $0x1,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
jmp    1127 <main_test+0x27>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    116c <main_test+0x6c>
movl   $0x1,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
jmp    114d <main_test+0x4d>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1192 <main_test+0x92>
movl   $0x1,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
jmp    1173 <main_test+0x73>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11b8 <main_test+0xb8>
movl   $0x1,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
jmp    1199 <main_test+0x99>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11de <main_test+0xde>
movl   $0x1,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
jmp    11bf <main_test+0xbf>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1208 <main_test+0x108>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    11e5 <main_test+0xe5>
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 1, 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 %11
10: ; preds = %6
store i32 1, i32* %4
store i32 1, i32* %5
br label %6
11: ; preds = %6
store i32 0, i32* %4
br label %12
12: ; preds = %16, %11
%13 = load i32, i32* %4
%14 = load i32, i32* %2
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 1, i32* %4
store i32 2, i32* %5
br label %12
17: ; preds = %12
store i32 0, i32* %4
br label %18
18: ; preds = %22, %17
%19 = load i32, i32* %4
%20 = load i32, i32* %3
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 1, i32* %4
store i32 3, i32* %5
br label %18
23: ; preds = %18
store i32 0, i32* %4
br label %24
24: ; preds = %28, %23
%25 = load i32, i32* %4
%26 = load i32, i32* %3
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %29
28: ; preds = %24
store i32 1, i32* %4
store i32 2, i32* %5
br label %24
29: ; preds = %24
store i32 0, i32* %4
br label %30
30: ; preds = %34, %29
%31 = load i32, i32* %4
%32 = load i32, i32* %2
%33 = icmp slt i32 %31, %32
br i1 %33, label %34, label %35
34: ; preds = %30
store i32 1, i32* %4
store i32 1, i32* %5
br label %30
35: ; preds = %30
store i32 0, i32* %4
br label %36
36: ; preds = %40, %35
%37 = load i32, i32* %4
%38 = load i32, i32* %1
%39 = icmp slt i32 %37, %38
br i1 %39, label %40, label %45
40: ; preds = %36
%41 = load i32, i32* %4
%42 = add nsw i32 %41, 1
store i32 %42, i32* %4
%43 = load i32, i32* %5
%44 = add nsw i32 %43, -1
store i32 %44, i32* %5
br label %36
45: ; preds = %36
ret i32 0
}

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