#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*/ fibonacci(int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int main() {
  printf("fibonacci of 0 is %llu\n", fibonacci(0));
  printf("fibonacci of 1 is %llu\n", fibonacci(1));
  printf("fibonacci of 2 is %llu\n", fibonacci(2));
  printf("fibonacci of 3 is %llu\n", fibonacci(3));
  printf("fibonacci of 4 is %llu\n", fibonacci(4));
  printf("fibonacci of 5 is %llu\n", fibonacci(5));
  printf("fibonacci of 6 is %llu\n", fibonacci(6));
  printf("fibonacci of 10 is %llu\n", fibonacci(10));
  printf("fibonacci of 20 is %llu\n", fibonacci(20));
  printf("fibonacci of 30 is %llu\n", fibonacci(30));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1040 <fibonacci@plt>
mov    %eax,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <fibonacci@plt>
mov    %eax,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <fibonacci@plt>
mov    %eax,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x3,%edi
call   1040 <fibonacci@plt>
mov    %eax,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x4,%edi
call   1040 <fibonacci@plt>
mov    %eax,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5,%edi
call   1040 <fibonacci@plt>
mov    %eax,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x6,%edi
call   1040 <fibonacci@plt>
mov    %eax,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <fibonacci@plt>
mov    %eax,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x14,%edi
call   1040 <fibonacci@plt>
mov    %eax,%esi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1e,%edi
call   1040 <fibonacci@plt>
mov    %eax,%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <fibonacci@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <fibonacci@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <fibonacci@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x3,%edi
call   1040 <fibonacci@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x4,%edi
call   1040 <fibonacci@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x5,%edi
call   1040 <fibonacci@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x6,%edi
call   1040 <fibonacci@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0xa,%edi
call   1040 <fibonacci@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x14,%edi
call   1040 <fibonacci@plt>
lea    0xed2(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x1e,%edi
call   1040 <fibonacci@plt>
lea    0xed3(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"fibonacci of 0 is %llu\0A\00"
@.str.1 = [24 x i8] c"fibonacci of 1 is %llu\0A\00"
@.str.2 = [24 x i8] c"fibonacci of 2 is %llu\0A\00"
@.str.3 = [24 x i8] c"fibonacci of 3 is %llu\0A\00"
@.str.4 = [24 x i8] c"fibonacci of 4 is %llu\0A\00"
@.str.5 = [24 x i8] c"fibonacci of 5 is %llu\0A\00"
@.str.6 = [24 x i8] c"fibonacci of 6 is %llu\0A\00"
@.str.7 = [25 x i8] c"fibonacci of 10 is %llu\0A\00"
@.str.8 = [25 x i8] c"fibonacci of 20 is %llu\0A\00"
@.str.9 = [25 x i8] c"fibonacci of 30 is %llu\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @fibonacci(i32 0)
%3 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @fibonacci(i32 1)
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = call i32 @fibonacci(i32 2)
%7 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = call i32 @fibonacci(i32 3)
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = call i32 @fibonacci(i32 4)
%11 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %10)
%12 = call i32 @fibonacci(i32 5)
%13 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %12)
%14 = call i32 @fibonacci(i32 6)
%15 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32 %14)
%16 = call i32 @fibonacci(i32 10)
%17 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i32 %16)
%18 = call i32 @fibonacci(i32 20)
%19 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0), i32 %18)
%20 = call i32 @fibonacci(i32 30)
%21 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i32 %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"fibonacci of 0 is %llu\0A\00"
@.str.1 = [24 x i8] c"fibonacci of 1 is %llu\0A\00"
@.str.2 = [24 x i8] c"fibonacci of 2 is %llu\0A\00"
@.str.3 = [24 x i8] c"fibonacci of 3 is %llu\0A\00"
@.str.4 = [24 x i8] c"fibonacci of 4 is %llu\0A\00"
@.str.5 = [24 x i8] c"fibonacci of 5 is %llu\0A\00"
@.str.6 = [24 x i8] c"fibonacci of 6 is %llu\0A\00"
@.str.7 = [25 x i8] c"fibonacci of 10 is %llu\0A\00"
@.str.8 = [25 x i8] c"fibonacci of 20 is %llu\0A\00"
@.str.9 = [25 x i8] c"fibonacci of 30 is %llu\0A\00"
define i32 @main() {
%1 = tail call i32 @fibonacci(i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @fibonacci(i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 @fibonacci(i32 2)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = tail call i32 @fibonacci(i32 3)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = tail call i32 @fibonacci(i32 4)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = tail call i32 @fibonacci(i32 5)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = tail call i32 @fibonacci(i32 6)
%14 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = tail call i32 @fibonacci(i32 10)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = tail call i32 @fibonacci(i32 20)
%18 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0), i32 %17)
%19 = tail call i32 @fibonacci(i32 30)
%20 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i32 %19)
ret i32 0
}