#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 fib(int);
int /*<<< orphan*/ putint(int);
int /*<<< orphan*/ putstring(char *);
int main(void) {
  int i;
  char space[2];
  char cr[2];
  space[0] = ' ';
  space[1] = 0;
  cr[0] = '\n';
  cr[1] = 0;
  i = 0;
  while (i <= 12) {
    putint(i);
    putstring(space);
    putint(fib(i));
    putstring(cr);
    i = i + 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x20,-0xa(%rbp)
movb   $0x0,-0x9(%rbp)
movb   $0xa,-0xc(%rbp)
movb   $0x0,-0xb(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xc,-0x8(%rbp)
jg     1197 <main+0x67>
mov    -0x8(%rbp),%edi
call   1030 <putint@plt>
lea    -0xa(%rbp),%rdi
call   1040 <putstring@plt>
mov    -0x8(%rbp),%edi
call   1050 <fib@plt>
mov    %eax,%edi
call   1030 <putint@plt>
lea    -0xc(%rbp),%rdi
call   1040 <putstring@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1156 <main+0x26>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movw   $0x20,0x6(%rsp)
movw   $0xa,0x4(%rsp)
xor    %edi,%edi
call   1030 <putint@plt>
lea    0x6(%rsp),%r14
mov    %r14,%rdi
call   1040 <putstring@plt>
xor    %edi,%edi
call   1050 <fib@plt>
mov    %eax,%edi
call   1030 <putint@plt>
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <putstring@plt>
mov    $0x1,%edi
call   1030 <putint@plt>
mov    %r14,%rdi
call   1040 <putstring@plt>
mov    $0x1,%edi
call   1050 <fib@plt>
mov    %eax,%edi
call   1030 <putint@plt>
mov    %rbx,%rdi
call   1040 <putstring@plt>
mov    $0x2,%edi
call   1030 <putint@plt>
mov    %r14,%rdi
call   1040 <putstring@plt>
mov    $0x2,%edi
call   1050 <fib@plt>
mov    %eax,%edi
call   1030 <putint@plt>
mov    %rbx,%rdi
call   1040 <putstring@plt>
mov    $0x3,%edi
call   1030 <putint@plt>
mov    %r14,%rdi
call   1040 <putstring@plt>
mov    $0x3,%edi
call   1050 <fib@plt>
mov    %eax,%edi
call   1030 <putint@plt>
mov    %rbx,%rdi
call   1040 <putstring@plt>
mov    $0x4,%edi
call   1030 <putint@plt>
mov    %r14,%rdi
call   1040 <putstring@plt>
mov    $0x4,%edi
call   1050 <fib@plt>
mov    %eax,%edi
call   1030 <putint@plt>
mov    %rbx,%rdi
call   1040 <putstring@plt>
mov    $0x5,%edi
call   1030 <putint@plt>
mov    %r14,%rdi
call   1040 <putstring@plt>
mov    $0x5,%edi
call   1050 <fib@plt>
mov    %eax,%edi
call   1030 <putint@plt>
mov    %rbx,%rdi
call   1040 <putstring@plt>
mov    $0x6,%edi
call   1030 <putint@plt>
mov    %r14,%rdi
call   1040 <putstring@plt>
mov    $0x6,%edi
call   1050 <fib@plt>
mov    %eax,%edi
call   1030 <putint@plt>
mov    %rbx,%rdi
call   1040 <putstring@plt>
mov    $0x7,%edi
call   1030 <putint@plt>
mov    %r14,%rdi
call   1040 <putstring@plt>
mov    $0x7,%edi
call   1050 <fib@plt>
mov    %eax,%edi
call   1030 <putint@plt>
mov    %rbx,%rdi
call   1040 <putstring@plt>
mov    $0x8,%edi
call   1030 <putint@plt>
mov    %r14,%rdi
call   1040 <putstring@plt>
mov    $0x8,%edi
call   1050 <fib@plt>
mov    %eax,%edi
call   1030 <putint@plt>
mov    %rbx,%rdi
call   1040 <putstring@plt>
mov    $0x9,%edi
call   1030 <putint@plt>
mov    %r14,%rdi
call   1040 <putstring@plt>
mov    $0x9,%edi
call   1050 <fib@plt>
mov    %eax,%edi
call   1030 <putint@plt>
mov    %rbx,%rdi
call   1040 <putstring@plt>
mov    $0xa,%edi
call   1030 <putint@plt>
mov    %r14,%rdi
call   1040 <putstring@plt>
mov    $0xa,%edi
call   1050 <fib@plt>
mov    %eax,%edi
call   1030 <putint@plt>
mov    %rbx,%rdi
call   1040 <putstring@plt>
mov    $0xb,%edi
call   1030 <putint@plt>
mov    %r14,%rdi
call   1040 <putstring@plt>
mov    $0xb,%edi
call   1050 <fib@plt>
mov    %eax,%edi
call   1030 <putint@plt>
mov    %rbx,%rdi
call   1040 <putstring@plt>
mov    $0xc,%edi
call   1030 <putint@plt>
mov    %r14,%rdi
call   1040 <putstring@plt>
mov    $0xc,%edi
call   1050 <fib@plt>
mov    %eax,%edi
call   1030 <putint@plt>
mov    %rbx,%rdi
call   1040 <putstring@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [2 x i8]
%4 = alloca [2 x i8]
store i32 0, i32* %1
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
store i8 32, i8* %5
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 0, i8* %6
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
store i8 10, i8* %7
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 1
store i8 0, i8* %8
store i32 0, i32* %2
br label %9
9: ; preds = %12, %0
%10 = load i32, i32* %2
%11 = icmp sle i32 %10, 12
br i1 %11, label %12, label %24
12: ; preds = %9
%13 = load i32, i32* %2
%14 = call i32 @putint(i32 %13)
%15 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%16 = call i32 @putstring(i8* %15)
%17 = load i32, i32* %2
%18 = call i32 @fib(i32 %17)
%19 = call i32 @putint(i32 %18)
%20 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
%21 = call i32 @putstring(i8* %20)
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 1
store i32 %23, i32* %2
br label %9
24: ; preds = %9
%25 = load i32, i32* %1
ret i32 %25
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [2 x i8]
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
store i8 32, i8* %3
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 1
store i8 0, i8* %5
store i8 10, i8* %4
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
store i8 0, i8* %6
%7 = call i32 @putint(i32 0)
%8 = call i32 @putstring(i8* %3)
%9 = call i32 @fib(i32 0)
%10 = call i32 @putint(i32 %9)
%11 = call i32 @putstring(i8* %4)
%12 = call i32 @putint(i32 1)
%13 = call i32 @putstring(i8* %3)
%14 = call i32 @fib(i32 1)
%15 = call i32 @putint(i32 %14)
%16 = call i32 @putstring(i8* %4)
%17 = call i32 @putint(i32 2)
%18 = call i32 @putstring(i8* %3)
%19 = call i32 @fib(i32 2)
%20 = call i32 @putint(i32 %19)
%21 = call i32 @putstring(i8* %4)
%22 = call i32 @putint(i32 3)
%23 = call i32 @putstring(i8* %3)
%24 = call i32 @fib(i32 3)
%25 = call i32 @putint(i32 %24)
%26 = call i32 @putstring(i8* %4)
%27 = call i32 @putint(i32 4)
%28 = call i32 @putstring(i8* %3)
%29 = call i32 @fib(i32 4)
%30 = call i32 @putint(i32 %29)
%31 = call i32 @putstring(i8* %4)
%32 = call i32 @putint(i32 5)
%33 = call i32 @putstring(i8* %3)
%34 = call i32 @fib(i32 5)
%35 = call i32 @putint(i32 %34)
%36 = call i32 @putstring(i8* %4)
%37 = call i32 @putint(i32 6)
%38 = call i32 @putstring(i8* %3)
%39 = call i32 @fib(i32 6)
%40 = call i32 @putint(i32 %39)
%41 = call i32 @putstring(i8* %4)
%42 = call i32 @putint(i32 7)
%43 = call i32 @putstring(i8* %3)
%44 = call i32 @fib(i32 7)
%45 = call i32 @putint(i32 %44)
%46 = call i32 @putstring(i8* %4)
%47 = call i32 @putint(i32 8)
%48 = call i32 @putstring(i8* %3)
%49 = call i32 @fib(i32 8)
%50 = call i32 @putint(i32 %49)
%51 = call i32 @putstring(i8* %4)
%52 = call i32 @putint(i32 9)
%53 = call i32 @putstring(i8* %3)
%54 = call i32 @fib(i32 9)
%55 = call i32 @putint(i32 %54)
%56 = call i32 @putstring(i8* %4)
%57 = call i32 @putint(i32 10)
%58 = call i32 @putstring(i8* %3)
%59 = call i32 @fib(i32 10)
%60 = call i32 @putint(i32 %59)
%61 = call i32 @putstring(i8* %4)
%62 = call i32 @putint(i32 11)
%63 = call i32 @putstring(i8* %3)
%64 = call i32 @fib(i32 11)
%65 = call i32 @putint(i32 %64)
%66 = call i32 @putstring(i8* %4)
%67 = call i32 @putint(i32 12)
%68 = call i32 @putstring(i8* %3)
%69 = call i32 @fib(i32 12)
%70 = call i32 @putint(i32 %69)
%71 = call i32 @putstring(i8* %4)
ret i32 0
}