#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 main() {
  unsigned int a, b = 3, L = 2, z;
  printf("2\n");
  printf("1\n");
  for (a = 1; a <= 2; a++) {
    L = L + 1;
    ;
    printf("%u\n", L);
  }
  for (a = 2; a <= 101; a++) {
    z = L;
    L = L + b;
    ;
    b = z;
    printf("%u\n", L);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0xc(%rbp)
movl   $0x2,-0x10(%rbp)
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
ja     1182 <main+0x72>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1150 <main+0x40>
movl   $0x2,-0x8(%rbp)
cmpl   $0x65,-0x8(%rbp)
ja     11c7 <main+0xb7>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1189 <main+0x79>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%r14
mov    $0x3,%ebp
mov    %r14,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x4,%r15d
mov    %r14,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x64,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r15d,%r12d
add    %r15d,%ebp
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%r15d
mov    %r12d,%ebp
add    $0xffffffff,%ebx
jne    1180 <main+0x60>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"2\0A\00"
@.str.1 = [3 x i8] c"1\0A\00"
@.str.2 = [4 x i8] c"%u\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 3, i32* %3
store i32 2, i32* %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %2
br label %8
8: ; preds = %16, %0
%9 = load i32, i32* %2
%10 = icmp ule i32 %9, 2
br i1 %10, label %11, label %19
11: ; preds = %8
%12 = load i32, i32* %4
%13 = add i32 %12, 1
store i32 %13, i32* %4
%14 = load i32, i32* %4
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %11
%17 = load i32, i32* %2
%18 = add i32 %17, 1
store i32 %18, i32* %2
br label %8
19: ; preds = %8
store i32 2, i32* %2
br label %20
20: ; preds = %31, %19
%21 = load i32, i32* %2
%22 = icmp ule i32 %21, 101
br i1 %22, label %23, label %34
23: ; preds = %20
%24 = load i32, i32* %4
store i32 %24, i32* %5
%25 = load i32, i32* %4
%26 = load i32, i32* %3
%27 = add i32 %25, %26
store i32 %27, i32* %4
%28 = load i32, i32* %5
store i32 %28, i32* %3
%29 = load i32, i32* %4
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %29)
br label %31
31: ; preds = %23
%32 = load i32, i32* %2
%33 = add i32 %32, 1
store i32 %33, i32* %2
br label %20
34: ; preds = %20
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [4 x i8] c"%u\0A\00"
@str = [2 x i8] c"2\00"
@str.3 = [2 x i8] c"1\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 3)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 4)
br label %5
5: ; preds = %0, %5
%6 = phi i32 [ %11, %5 ], [ 2, %0 ]
%7 = phi i32 [ %9, %5 ], [ 4, %0 ]
%8 = phi i32 [ %7, %5 ], [ 3, %0 ]
%9 = add i32 %7, %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i32 %6, 1
%12 = icmp eq i32 %11, 102
br i1 %12, label %13, label %5
13: ; preds = %5
ret i32 0
}