#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 *, ...);
void main() {
  int i;
  int f[20] = {1, 1};
  for (i = 2; i < 20; i++)
    f[i] = f[i - 2] + f[i - 1];
  for (i = 0; i < 20; i++) {
    if (i % 5 == 0)
      printf("\n");
    printf("%12d", f[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1040 <memset@plt>
movl   $0x1,-0x60(%rbp)
movl   $0x1,-0x5c(%rbp)
movl   $0x2,-0x4(%rbp)
cmpl   $0x14,-0x4(%rbp)
jge    1185 <main+0x65>
mov    -0x4(%rbp),%eax
sub    $0x2,%eax
cltq
mov    -0x60(%rbp,%rax,4),%ecx
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
cltq
add    -0x60(%rbp,%rax,4),%ecx
movslq -0x4(%rbp),%rax
mov    %ecx,-0x60(%rbp,%rax,4)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    114d <main+0x2d>
movl   $0x0,-0x4(%rbp)
cmpl   $0x14,-0x4(%rbp)
jge    11dc <main+0xbc>
mov    -0x4(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11b8 <main+0x98>
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x4(%rbp),%rax
mov    -0x60(%rbp,%rax,4),%esi
lea    0xe3b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    118c <main+0x6c>
lea    0xe1d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x50,%rsp
movaps 0xed0(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
lea    0xee5(%rip),%r14
xor    %r15d,%r15d
xor    %ebx,%ebx
jmp    119b <main+0x7b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rsp,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
add    $0xff,%r15b
cmp    $0x14,%rbx
je     11bb <main+0x9b>
movzbl %bl,%eax
imul   $0xcd,%eax,%eax
shr    $0xa,%eax
lea    (%rax,%rax,4),%eax
add    %r15b,%al
jne    1180 <main+0x60>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1180 <main+0x60>
mov    $0xa,%edi
add    $0x50,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%12d\00"
define void @main() {
%1 = alloca [20 x i32]
%2 = bitcast [20 x i32]* %1 to i8*
%3 = bitcast [20 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 1, i32 1, i32 2, i32 3>, <4 x i32>* %3
%4 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 4
%5 = bitcast i32* %4 to <4 x i32>*
store <4 x i32> <i32 5, i32 8, i32 13, i32 21>, <4 x i32>* %5
%6 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 8
%7 = bitcast i32* %6 to <4 x i32>*
store <4 x i32> <i32 34, i32 55, i32 89, i32 144>, <4 x i32>* %7
%8 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 12
%9 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> <i32 233, i32 377, i32 610, i32 987>, <4 x i32>* %9
%10 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 16
%11 = bitcast i32* %10 to <4 x i32>*
store <4 x i32> <i32 1597, i32 2584, i32 4181, i32 6765>, <4 x i32>* %11
br label %12
12: ; preds = %0, %19
%13 = phi i64 [ 0, %0 ], [ %23, %19 ]
%14 = trunc i64 %13 to i8
%15 = urem i8 %14, 5
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %12
%18 = tail call i32 @putchar(i32 10)
br label %19
19: ; preds = %17, %12
%20 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 %13
%21 = load i32, i32* %20
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %21)
%23 = add nuw nsw i64 %13, 1
%24 = icmp eq i64 %23, 20
br i1 %24, label %25, label %12
25: ; preds = %19
%26 = tail call i32 @putchar(i32 10)
ret void
}