#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);
int /*<<< orphan*/ putchar(char);
int main(void) {
  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++) {
    printf("%12d", f[i]);
    if ((i + 1) % 5 == 0)
      putchar('\n');
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1050 <memset@plt>
movl   $0x1,-0x60(%rbp)
movl   $0x1,-0x5c(%rbp)
movl   $0x2,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    119c <main+0x6c>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
cltq
mov    -0x60(%rbp,%rax,4),%ecx
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
add    -0x60(%rbp,%rax,4),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x60(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1164 <main+0x34>
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    11f5 <main+0xc5>
movslq -0x8(%rbp),%rax
mov    -0x60(%rbp,%rax,4),%esi
lea    0xe44(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11e2 <main+0xb2>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    11e7 <main+0xb7>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11a3 <main+0x73>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x58,%rsp
movaps 0xecf(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedc(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee0(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
mov    $0x1,%esi
mov    $0x1,%r15b
xor    %ebx,%ebx
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
movzbl %r15b,%eax
imul   $0xcd,%eax,%eax
shr    $0xa,%eax
lea    (%rax,%rax,4),%ebp
add    $0xff,%bpl
mov    %r14,%rdi
call   1040 <printf@plt>
cmp    %bl,%bpl
jne    11ab <main+0x8b>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmp    $0x13,%rbx
je     11bf <main+0x9f>
mov    0x4(%rsp,%rbx,4),%esi
add    $0x1,%r15b
add    $0x1,%rbx
jmp    1180 <main+0x60>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%12d\00"
define i32 @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 = %24, %0
%13 = phi i32 [ 1, %0 ], [ %26, %24 ]
%14 = phi i64 [ 0, %0 ], [ %16, %24 ]
%15 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %13)
%16 = add nuw nsw i64 %14, 1
%17 = trunc i64 %16 to i8
%18 = urem i8 %17, 5
%19 = icmp eq i8 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %12
%21 = tail call i32 @putchar(i8 signext 10)
br label %22
22: ; preds = %12, %20
%23 = icmp eq i64 %16, 20
br i1 %23, label %27, label %24
24: ; preds = %22
%25 = getelementptr inbounds [20 x i32], [20 x i32]* %1, i64 0, i64 %16
%26 = load i32, i32* %25
br label %12
27: ; preds = %22
ret i32 0
}