#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 *, long long);
int main() {
  long long int fib[100], a, b, i, j, n, sum;
  fib[0] = 0;
  fib[1] = 1;
  for (i = 2; i < 100; i++) {
    fib[i] = fib[i - 1] + fib[i - 2];
    printf("%lld ", fib[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x360,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x330(%rbp)
movq   $0x1,-0x328(%rbp)
movq   $0x2,-0x348(%rbp)
cmpq   $0x64,-0x348(%rbp)
64
jge    11b8 <main+0xa8>
mov    -0x348(%rbp),%rax
sub    $0x1,%rax
mov    -0x330(%rbp,%rax,8),%rcx
ff
mov    -0x348(%rbp),%rax
sub    $0x2,%rax
add    -0x330(%rbp,%rax,8),%rcx
ff
mov    -0x348(%rbp),%rax
mov    %rcx,-0x330(%rbp,%rax,8)
ff
mov    -0x348(%rbp),%rax
mov    -0x330(%rbp,%rax,8),%rsi
ff
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
mov    -0x348(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x348(%rbp)
jmp    1143 <main+0x33>
xor    %eax,%eax
add    $0x360,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x320,%rsp
movaps 0xedd(%rip),%xmm0
movaps %xmm0,(%rsp)
movq   $0x1,0x10(%rsp)
lea    0xed9(%rip),%r14
mov    $0x1,%r15d
mov    $0x1,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    $0x3,%ebx
nop
add    -0x10(%rsp,%rbx,8),%r15
mov    %r15,(%rsp,%rbx,8)
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    $0x64,%rbx
jne    1150 <main+0x40>
xor    %eax,%eax
add    $0x320,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%lld \00"
define i32 @main() {
%1 = alloca [100 x i64]
%2 = bitcast [100 x i64]* %1 to i8*
%3 = bitcast [100 x i64]* %1 to <2 x i64>*
store <2 x i64> <i64 0, i64 1>, <2 x i64>* %3
%4 = getelementptr inbounds [100 x i64], [100 x i64]* %1, i64 0, i64 2
store i64 1, i64* %4
%5 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 1)
br label %6
6: ; preds = %0, %6
%7 = phi i64 [ 3, %0 ], [ %16, %6 ]
%8 = phi i64 [ 1, %0 ], [ %13, %6 ]
%9 = phi i64 [ 2, %0 ], [ %7, %6 ]
%10 = add nsw i64 %9, -1
%11 = getelementptr inbounds [100 x i64], [100 x i64]* %1, i64 0, i64 %10
%12 = load i64, i64* %11
%13 = add nsw i64 %12, %8
%14 = getelementptr inbounds [100 x i64], [100 x i64]* %1, i64 0, i64 %7
store i64 %13, i64* %14
%15 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %13)
%16 = add nuw nsw i64 %7, 1
%17 = icmp eq i64 %16, 100
br i1 %17, label %18, label %6
18: ; preds = %6
ret i32 0
}