#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 main() {
  int f1 = 1, f2 = 1, f3;
  int i;
  printf("%12d\n%12d\n", f1, f2);
  for (i = 1; i <= 38; i++) {
    f3 = f1 + f2;
    printf("%12d\n", f3);
    f1 = f2;
    f2 = f3;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x14(%rbp)
cmpl   $0x26,-0x14(%rbp)
jg     1186 <main+0x76>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1148 <main+0x38>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
lea    0xee1(%rip),%rdi
mov    $0x1,%r15d
mov    $0x1,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x26,%ebx
lea    0xec3(%rip),%r14
mov    $0x1,%r12d
nopl   0x0(%rax,%rax,1)
mov    %r15d,%ebp
add    %r12d,%ebp
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r12d,%r15d
mov    %ebp,%r12d
add    $0xffffffff,%ebx
jne    1150 <main+0x40>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"%12d\0A%12d\0A\00"
@.str.1 = [6 x i8] c"%12d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 1, i32 1)
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 1, %0 ], [ %8, %2 ]
%4 = phi i32 [ 1, %0 ], [ %5, %2 ]
%5 = phi i32 [ 1, %0 ], [ %6, %2 ]
%6 = add nsw i32 %4, %5
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = add nuw nsw i32 %3, 1
%9 = icmp eq i32 %8, 39
br i1 %9, label %10, label %2
10: ; preds = %2
ret i32 0
}