#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 *, double, double, double);
int main(int argc, char *argv[]) {
  double a = 2, b = 2.1, c = 2;
  while (1) {
    printf("%.19f %.19f %.19f \n", a, b, c);
    c = (a + b) / (a - b);
    b = (a - b) / (b - c);
    a = (b - c) / (a + b);
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xed2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xecd(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xeb8(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x18(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movsd  %xmm1,-0x68(%rbp)
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x20(%rbp),%xmm1
subsd  -0x28(%rbp),%xmm1
movsd  %xmm1,-0x50(%rbp)
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm1
addsd  -0x20(%rbp),%xmm1
movsd  %xmm1,-0x38(%rbp)
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  %xmm0,-0x18(%rbp)
jmp    114d <main+0x3d>

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movsd  0xee3(%rip),%xmm1
movsd  0xee3(%rip),%xmm0
lea    0xee4(%rip),%rbx
movapd %xmm0,%xmm2
mov    %rbx,%rdi
movsd  %xmm0,0x8(%rsp)
movsd  %xmm1,(%rsp)
call   1030 <printf@plt>
movsd  0x8(%rsp),%xmm1
movapd %xmm1,%xmm2
movsd  (%rsp),%xmm4
addsd  %xmm4,%xmm2
movapd %xmm1,%xmm0
movapd %xmm1,%xmm3
subsd  %xmm4,%xmm0
divsd  %xmm0,%xmm2
subsd  %xmm2,%xmm4
divsd  %xmm4,%xmm0
addsd  %xmm0,%xmm3
movapd %xmm0,%xmm1
subsd  %xmm2,%xmm0
divsd  %xmm3,%xmm0
jmp    1130 <main+0x20>

LLVM IR (-O0):
@.str = [20 x i8] c"%.19f %.19f %.19f \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
%8 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 2.000000e+00, double* %6
store double 2.100000e+00, double* %7
store double 2.000000e+00, double* %8
br label %9
9: ; preds = %2, %9
%10 = load double, double* %6
%11 = load double, double* %7
%12 = load double, double* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), double %10, double %11, double %12)
%14 = load double, double* %6
%15 = load double, double* %7
%16 = fadd double %14, %15
%17 = load double, double* %6
%18 = load double, double* %7
%19 = fsub double %17, %18
%20 = fdiv double %16, %19
store double %20, double* %8
%21 = load double, double* %6
%22 = load double, double* %7
%23 = fsub double %21, %22
%24 = load double, double* %7
%25 = load double, double* %8
%26 = fsub double %24, %25
%27 = fdiv double %23, %26
store double %27, double* %7
%28 = load double, double* %7
%29 = load double, double* %8
%30 = fsub double %28, %29
%31 = load double, double* %6
%32 = load double, double* %7
%33 = fadd double %31, %32
%34 = fdiv double %30, %33
store double %34, double* %6
br label %9
}

LLVM IR (-O2):
@.str = [20 x i8] c"%.19f %.19f %.19f \0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = phi double [ 2.000000e+00, %2 ], [ %15, %3 ]
%5 = phi double [ 2.100000e+00, %2 ], [ %12, %3 ]
%6 = phi double [ 2.000000e+00, %2 ], [ %10, %3 ]
%7 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), double %4, double %5, double %6)
%8 = fadd double %4, %5
%9 = fsub double %4, %5
%10 = fdiv double %8, %9
%11 = fsub double %5, %10
%12 = fdiv double %9, %11
%13 = fsub double %12, %10
%14 = fadd double %4, %12
%15 = fdiv double %13, %14
br label %3
}