#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*/ puts(char *);
int main() {
  int a[20] = {1, 1};
  int i;
  for (i = 0; i < 20 - 2; i++)
    a[i + 2] = a[i] + a[i + 1];
  for (i = 20 - 1; i >= 0; i--) {
    printf("%d\t", a[i]);
    if (!(i % 5))
      puts("");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%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   $0x0,-0x64(%rbp)
cmpl   $0x12,-0x64(%rbp)
jge    119c <main+0x6c>
movslq -0x64(%rbp),%rax
mov    -0x60(%rbp,%rax,4),%ecx
mov    -0x64(%rbp),%eax
add    $0x1,%eax
cltq
add    -0x60(%rbp,%rax,4),%ecx
mov    -0x64(%rbp),%eax
add    $0x2,%eax
cltq
mov    %ecx,-0x60(%rbp,%rax,4)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1164 <main+0x34>
movl   $0x13,-0x64(%rbp)
cmpl   $0x0,-0x64(%rbp)
jl     11f4 <main+0xc4>
movslq -0x64(%rbp),%rax
mov    -0x60(%rbp,%rax,4),%esi
lea    0xe44(%rip),%rdi
call   1040 <printf@plt>
mov    -0x64(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11e1 <main+0xb1>
lea    0xe27(%rip),%rdi
call   1030 <puts@plt>
jmp    11e6 <main+0xb6>
mov    -0x64(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x64(%rbp)
jmp    11a3 <main+0x73>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
movaps 0xecb(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xed0(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xedc(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
mov    $0x1a6d,%esi
mov    $0x4c,%ebx
mov    $0xffffffed,%r15d
mov    $0x13,%r13d
mov    $0xcccccccd,%r12d
lea    0xec4(%rip),%r14
nopl   0x0(%rax)
mov    %r13d,%eax
imul   %r12,%rax
shr    $0x22,%rax
lea    (%rax,%rax,4),%ebp
mov    %r14,%rdi
call   1040 <printf@plt>
add    %r15d,%ebp
jne    11b5 <main+0x95>
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %rbx,%rbx
je     11cc <main+0xac>
mov    -0x4(%rsp,%rbx,1),%esi
add    $0xfffffffffffffffc,%rbx
add    $0x1,%r15d
add    $0xffffffff,%r13d
jmp    1190 <main+0x70>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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