#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, long double);
int main() {
  long double x, y, z;
  int i;
  x = 2;
  y = 1;
  for (i = 0; i <= 100; i++) {
    printf("%d - %.0LF \n", i, x);
    z = x + y;
    x = y;
    y = z;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
flds   0xedb(%rip)
fstpt  -0x20(%rbp)
fld1
fstpt  -0x30(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x64,-0x44(%rbp)
jg     117a <main+0x6a>
mov    -0x44(%rbp),%esi
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
fldt   -0x20(%rbp)
fldt   -0x30(%rbp)
faddp  %st,%st(1)
fstpt  -0x40(%rbp)
fldt   -0x30(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x40(%rbp)
fstpt  -0x30(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1134 <main+0x24>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
fld1
flds   0xee1(%rip)
xor    %ebx,%ebx
lea    0xedc(%rip),%r14
nopl   0x0(%rax,%rax,1)
fxch   %st(1)
fstpt  0x10(%rsp)
fld    %st(0)
fstpt  0x1c(%rsp)
fstpt  (%rsp)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
fldt   0x10(%rsp)
fldt   0x1c(%rsp)
fadd   %st(1),%st
add    $0x1,%ebx
cmp    $0x65,%ebx
fxch   %st(1)
jne    1130 <main+0x20>
fstp   %st(1)
fstp   %st(0)
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

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

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