#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, long);
int main() {
  int i;
  long fib[13] = {1, 1};
  for (i = 2; i < 13; i++) {
    fib[i] = fib[i - 1] + fib[i - 2];
  }
  for (i = 0; i < 13; i++) {
    printf("%dN:%ld\n", i, fib[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x68,%edx
call   1040 <memset@plt>
movq   $0x1,-0x70(%rbp)
movq   $0x1,-0x68(%rbp)
movl   $0x2,-0x8(%rbp)
cmpl   $0xd,-0x8(%rbp)
jge    1191 <main+0x71>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x70(%rbp,%rax,8),%rcx
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
cltq
add    -0x70(%rbp,%rax,8),%rcx
movslq -0x8(%rbp),%rax
mov    %rcx,-0x70(%rbp,%rax,8)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1156 <main+0x36>
movl   $0x0,-0x8(%rbp)
cmpl   $0xd,-0x8(%rbp)
jge    11c8 <main+0xa8>
mov    -0x8(%rbp),%esi
movslq -0x8(%rbp),%rax
mov    -0x70(%rbp,%rax,8),%rdx
lea    0xe4b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1198 <main+0x78>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    $0x1,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    $0x1,%edx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    $0x2,%edx
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    $0x3,%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    $0x5,%edx
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    $0x8,%edx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    $0xd,%edx
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    $0x15,%edx
mov    %rbx,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
mov    $0x22,%edx
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    $0x37,%edx
mov    %rbx,%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
mov    $0x59,%edx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
mov    $0x90,%edx
mov    %rbx,%rdi
mov    $0xb,%esi
call   1030 <printf@plt>
mov    $0xe9,%edx
mov    %rbx,%rdi
mov    $0xc,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%dN:%ld\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 0, i64 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1, i64 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 2, i64 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 3, i64 3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 4, i64 5)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 5, i64 8)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 6, i64 13)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 7, i64 21)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 8, i64 34)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 9, i64 55)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 10, i64 89)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 11, i64 144)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 12, i64 233)
ret i32 0
}