#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*/ printf(char *, int, ...);
int main() {
  int total = 1;
  int par = 0;
  int count = 1;
  int plus = 0;
  while (count <= 100) {
    plus = plus + par;
    par = par + 2;
    printf("Count: %d | Amount par: %d \n", total, par);
    total++;
    count++;
    printf("Plus: %d \n\n", plus);
  }
  printf(
      "------------------------- \n | Plus: %d \n ------------------------- \n",
      plus);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x10(%rbp)
jg     1193 <main+0x83>
mov    -0x14(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    113b <main+0x2b>
mov    -0x14(%rbp),%esi
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    $0x1,%ebx
lea    0xedc(%rip),%r14
lea    0xef2(%rip),%r15
xor    %r12d,%r12d
xor    %ebp,%ebp
add    %ebp,%r12d
add    $0x2,%ebp
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%ebx
mov    %r15,%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1030 <printf@plt>
cmp    $0x65,%ebx
jne    1130 <main+0x20>
lea    0xec9(%rip),%rdi
mov    $0x26ac,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Count: %d | Amount par: %d \0A\00"
@.str.1 = [12 x i8] c"Plus: %d \0A\0A\00"
@.str.2 = [69 x i8] c"------------------------- \0A | Plus: %d \0A ------------------------- \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 0, i32* %3
store i32 1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %9, %0
%7 = load i32, i32* %4
%8 = icmp sle i32 %7, 100
br i1 %8, label %9, label %24
9: ; preds = %6
%10 = load i32, i32* %5
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
store i32 %12, i32* %5
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 2
store i32 %14, i32* %3
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %16)
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
%22 = load i32, i32* %5
%23 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %22)
br label %6
24: ; preds = %6
%25 = load i32, i32* %5
%26 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 %25)
%27 = load i32, i32* %1
ret i32 %27
}

LLVM IR (-O2):
@.str = [29 x i8] c"Count: %d | Amount par: %d \0A\00"
@.str.1 = [12 x i8] c"Plus: %d \0A\0A\00"
@.str.2 = [69 x i8] c"------------------------- \0A | Plus: %d \0A ------------------------- \0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = phi i32 [ 1, %0 ], [ %8, %1 ]
%4 = phi i32 [ 0, %0 ], [ %6, %1 ]
%5 = add nuw nsw i32 %2, %4
%6 = add nuw nsw i32 %4, 2
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %6)
%8 = add nuw nsw i32 %3, 1
%9 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%10 = icmp eq i32 %8, 101
br i1 %10, label %11, label %1
11: ; preds = %1
%12 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0), i32 9900)
ret i32 0
}