#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 printFibonacciArray() {
  int i;
  unsigned long long current;
  unsigned long long precedingBy1 = 1, precedingBy2 = 0;
  printf("const unsigned long long FIBONNACI[61] = {\n    0,\n    1");
  for (i = 0; i < 59; i++) {
    current = precedingBy1 + precedingBy2;
    printf(",\n    %llu", current);
    precedingBy2 = precedingBy1;
    precedingBy1 = current;
  }
  printf("\n};\n");
}


x86 assembly (clang, -O0):
<printFibonacciArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x1,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3b,-0x8(%rbp)
jge    1183 <printFibonacciArray+0x73>
mov    -0x18(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <printFibonacciArray+0x2d>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printFibonacciArray>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%r15d
mov    $0x3b,%ebp
lea    0xef1(%rip),%r14
xor    %eax,%eax
nopl   0x0(%rax)
mov    %rax,%rbx
add    %r15,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rax
mov    %rbx,%r15
add    $0xffffffff,%ebp
jne    1150 <printFibonacciArray+0x30>
lea    0xece(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"const unsigned long long FIBONNACI[61] = {\0A 0,\0A 1\00"
@.str.1 = [11 x i8] c",\0A %llu\00"
@.str.2 = [5 x i8] c"\0A};\0A\00"
define i32 @printFibonacciArray() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 1, i64* %4
store i64 0, i64* %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %7
7: ; preds = %18, %0
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 59
br i1 %9, label %10, label %21
10: ; preds = %7
%11 = load i64, i64* %4
%12 = load i64, i64* %5
%13 = add i64 %11, %12
store i64 %13, i64* %3
%14 = load i64, i64* %3
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 %14)
%16 = load i64, i64* %4
store i64 %16, i64* %5
%17 = load i64, i64* %3
store i64 %17, i64* %4
br label %18
18: ; preds = %10
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 1
store i32 %20, i32* %2
br label %7
21: ; preds = %7
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%23 = load i32, i32* %1
ret i32 %23
}

LLVM IR (-O2):
@.str = [56 x i8] c"const unsigned long long FIBONNACI[61] = {\0A 0,\0A 1\00"
@.str.1 = [11 x i8] c",\0A %llu\00"
@str = [4 x i8] c"\0A};\00"
define i32 @printFibonacciArray() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = phi i64 [ 0, %0 ], [ %4, %2 ]
%4 = phi i64 [ 1, %0 ], [ %6, %2 ]
%5 = phi i32 [ 0, %0 ], [ %8, %2 ]
%6 = add i64 %3, %4
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 %6)
%8 = add nuw nsw i32 %5, 1
%9 = icmp eq i32 %8, 59
br i1 %9, label %10, label %2
10: ; preds = %2
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret i32 undef
}