#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 Fibonacci(int);
int /*<<< orphan*/ printf(char *);
main(int argc, char **argv) {
  printf("Calculating a big number!\n");
  int i = 0;
  int f = 0;
  for (i = 0; i < 43; i++) {
    f = Fibonacci(i);
  }
  printf("Fib is done!!\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x2b,-0x14(%rbp)
jge    117a <main+0x5a>
mov    -0x14(%rbp),%edi
call   1030 <Fibonacci@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1157 <main+0x37>
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <Fibonacci@plt>
mov    $0x1,%edi
call   1040 <Fibonacci@plt>
mov    $0x2,%edi
call   1040 <Fibonacci@plt>
mov    $0x3,%edi
call   1040 <Fibonacci@plt>
mov    $0x4,%edi
call   1040 <Fibonacci@plt>
mov    $0x5,%edi
call   1040 <Fibonacci@plt>
mov    $0x6,%edi
call   1040 <Fibonacci@plt>
mov    $0x7,%edi
call   1040 <Fibonacci@plt>
mov    $0x8,%edi
call   1040 <Fibonacci@plt>
mov    $0x9,%edi
call   1040 <Fibonacci@plt>
mov    $0xa,%edi
call   1040 <Fibonacci@plt>
mov    $0xb,%edi
call   1040 <Fibonacci@plt>
mov    $0xc,%edi
call   1040 <Fibonacci@plt>
mov    $0xd,%edi
call   1040 <Fibonacci@plt>
mov    $0xe,%edi
call   1040 <Fibonacci@plt>
mov    $0xf,%edi
call   1040 <Fibonacci@plt>
mov    $0x10,%edi
call   1040 <Fibonacci@plt>
mov    $0x11,%edi
call   1040 <Fibonacci@plt>
mov    $0x12,%edi
call   1040 <Fibonacci@plt>
mov    $0x13,%edi
call   1040 <Fibonacci@plt>
mov    $0x14,%edi
call   1040 <Fibonacci@plt>
mov    $0x15,%edi
call   1040 <Fibonacci@plt>
mov    $0x16,%edi
call   1040 <Fibonacci@plt>
mov    $0x17,%edi
call   1040 <Fibonacci@plt>
mov    $0x18,%edi
call   1040 <Fibonacci@plt>
mov    $0x19,%edi
call   1040 <Fibonacci@plt>
mov    $0x1a,%edi
call   1040 <Fibonacci@plt>
mov    $0x1b,%edi
call   1040 <Fibonacci@plt>
mov    $0x1c,%edi
call   1040 <Fibonacci@plt>
mov    $0x1d,%edi
call   1040 <Fibonacci@plt>
mov    $0x1e,%edi
call   1040 <Fibonacci@plt>
mov    $0x1f,%edi
call   1040 <Fibonacci@plt>
mov    $0x20,%edi
call   1040 <Fibonacci@plt>
mov    $0x21,%edi
call   1040 <Fibonacci@plt>
mov    $0x22,%edi
call   1040 <Fibonacci@plt>
mov    $0x23,%edi
call   1040 <Fibonacci@plt>
mov    $0x24,%edi
call   1040 <Fibonacci@plt>
mov    $0x25,%edi
call   1040 <Fibonacci@plt>
mov    $0x26,%edi
call   1040 <Fibonacci@plt>
mov    $0x27,%edi
call   1040 <Fibonacci@plt>
mov    $0x28,%edi
call   1040 <Fibonacci@plt>
mov    $0x29,%edi
call   1040 <Fibonacci@plt>
mov    $0x2a,%edi
call   1040 <Fibonacci@plt>
lea    0xd3b(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Calculating a big number!\0A\00"
@.str.1 = [15 x i8] c"Fib is done!!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %6
br label %9
9: ; preds = %15, %2
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 43
br i1 %11, label %12, label %18
12: ; preds = %9
%13 = load i32, i32* %6
%14 = call i32 @Fibonacci(i32 %13)
store i32 %14, i32* %7
br label %15
15: ; preds = %12
%16 = load i32, i32* %6
%17 = add nsw i32 %16, 1
store i32 %17, i32* %6
br label %9
18: ; preds = %9
%19 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@str = [26 x i8] c"Calculating a big number!\00"
@str.2 = [14 x i8] c"Fib is done!!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @Fibonacci(i32 0)
%5 = tail call i32 @Fibonacci(i32 1)
%6 = tail call i32 @Fibonacci(i32 2)
%7 = tail call i32 @Fibonacci(i32 3)
%8 = tail call i32 @Fibonacci(i32 4)
%9 = tail call i32 @Fibonacci(i32 5)
%10 = tail call i32 @Fibonacci(i32 6)
%11 = tail call i32 @Fibonacci(i32 7)
%12 = tail call i32 @Fibonacci(i32 8)
%13 = tail call i32 @Fibonacci(i32 9)
%14 = tail call i32 @Fibonacci(i32 10)
%15 = tail call i32 @Fibonacci(i32 11)
%16 = tail call i32 @Fibonacci(i32 12)
%17 = tail call i32 @Fibonacci(i32 13)
%18 = tail call i32 @Fibonacci(i32 14)
%19 = tail call i32 @Fibonacci(i32 15)
%20 = tail call i32 @Fibonacci(i32 16)
%21 = tail call i32 @Fibonacci(i32 17)
%22 = tail call i32 @Fibonacci(i32 18)
%23 = tail call i32 @Fibonacci(i32 19)
%24 = tail call i32 @Fibonacci(i32 20)
%25 = tail call i32 @Fibonacci(i32 21)
%26 = tail call i32 @Fibonacci(i32 22)
%27 = tail call i32 @Fibonacci(i32 23)
%28 = tail call i32 @Fibonacci(i32 24)
%29 = tail call i32 @Fibonacci(i32 25)
%30 = tail call i32 @Fibonacci(i32 26)
%31 = tail call i32 @Fibonacci(i32 27)
%32 = tail call i32 @Fibonacci(i32 28)
%33 = tail call i32 @Fibonacci(i32 29)
%34 = tail call i32 @Fibonacci(i32 30)
%35 = tail call i32 @Fibonacci(i32 31)
%36 = tail call i32 @Fibonacci(i32 32)
%37 = tail call i32 @Fibonacci(i32 33)
%38 = tail call i32 @Fibonacci(i32 34)
%39 = tail call i32 @Fibonacci(i32 35)
%40 = tail call i32 @Fibonacci(i32 36)
%41 = tail call i32 @Fibonacci(i32 37)
%42 = tail call i32 @Fibonacci(i32 38)
%43 = tail call i32 @Fibonacci(i32 39)
%44 = tail call i32 @Fibonacci(i32 40)
%45 = tail call i32 @Fibonacci(i32 41)
%46 = tail call i32 @Fibonacci(i32 42)
%47 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}