#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*/ __print_int(int);
int main() {
  int i;
  int a;
  i = 0;
  while (i < 5) {
    __print_int(i);
    ++i;
  }
  i = 0;
  while (0) {
    ++i;
  }
  __print_int(i);
  i = 0;
  while (1) {
    ++i;
    if (i > 999) {
      break;
    }
  }
  __print_int(i);
  a = 0;
  i = -1;
  while (i < 9) {
    ++i;
    a += i;
    continue;
    a *= i;
  }
  __print_int(a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1146 <main+0x36>
mov    -0x8(%rbp),%edi
call   1030 <__print_int@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    115c <main+0x4c>
jmp    116a <main+0x5a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114d <main+0x3d>
mov    -0x8(%rbp),%edi
call   1030 <__print_int@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x3e7,-0x8(%rbp)
jle    1194 <main+0x84>
jmp    1199 <main+0x89>
jmp    1179 <main+0x69>
mov    -0x8(%rbp),%edi
call   1030 <__print_int@plt>
movl   $0x0,-0xc(%rbp)
movl   $0xffffffff,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jge    11d0 <main+0xc0>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    11af <main+0x9f>
mov    -0xc(%rbp),%edi
call   1030 <__print_int@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <__print_int@plt>
mov    $0x1,%edi
call   1030 <__print_int@plt>
mov    $0x2,%edi
call   1030 <__print_int@plt>
mov    $0x3,%edi
call   1030 <__print_int@plt>
mov    $0x4,%edi
call   1030 <__print_int@plt>
xor    %edi,%edi
call   1030 <__print_int@plt>
mov    $0x3e8,%edi
call   1030 <__print_int@plt>
mov    $0x2d,%edi
call   1030 <__print_int@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 5
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i32, i32* %2
%9 = call i32 @__print_int(i32 %8)
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %4
12: ; preds = %4
store i32 0, i32* %2
br label %13
13: ; preds = %14, %12
br i1 false, label %14, label %17
14: ; preds = %13
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 1
store i32 %16, i32* %2
br label %13
17: ; preds = %13
%18 = load i32, i32* %2
%19 = call i32 @__print_int(i32 %18)
store i32 0, i32* %2
br label %20
20: ; preds = %17, %26
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = icmp sgt i32 %23, 999
br i1 %24, label %25, label %26
25: ; preds = %20
br label %27
26: ; preds = %20
br label %20
27: ; preds = %25
%28 = load i32, i32* %2
%29 = call i32 @__print_int(i32 %28)
store i32 0, i32* %3
store i32 -1, i32* %2
br label %30
30: ; preds = %33, %27
%31 = load i32, i32* %2
%32 = icmp slt i32 %31, 9
br i1 %32, label %33, label %39
33: ; preds = %30
%34 = load i32, i32* %2
%35 = add nsw i32 %34, 1
store i32 %35, i32* %2
%36 = load i32, i32* %2
%37 = load i32, i32* %3
%38 = add nsw i32 %37, %36
store i32 %38, i32* %3
br label %30
39: ; preds = %30
%40 = load i32, i32* %3
%41 = call i32 @__print_int(i32 %40)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__print_int(i32 0)
%2 = tail call i32 @__print_int(i32 1)
%3 = tail call i32 @__print_int(i32 2)
%4 = tail call i32 @__print_int(i32 3)
%5 = tail call i32 @__print_int(i32 4)
%6 = tail call i32 @__print_int(i32 0)
%7 = tail call i32 @__print_int(i32 1000)
%8 = tail call i32 @__print_int(i32 45)
ret i32 0
}