#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 *, float);
int main(int argc, char *argv[]) {
  int i, flag = 1;
  float a = 89, b = 55, s = 0, t;
  for (i = 1; i <= 8; i++) {
    s = s + flag * a / b;
    flag = -flag;
    t = b;
    b = a - b;
    a = t;
  }
  printf("%5.1f", s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x18(%rbp)
movss  0xecf(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xebe(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jg     11b6 <main+0xa6>
movss  -0x24(%rbp),%xmm0
cvtsi2ssl -0x18(%rbp),%xmm1
mulss  -0x1c(%rbp),%xmm1
divss  -0x20(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
xor    %eax,%eax
sub    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x1c(%rbp),%xmm0
subss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1156 <main+0x46>
movss  -0x24(%rbp),%xmm0
lea    0xe46(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeec(%rip),%rdi
movss  0xee0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%5.1f\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %7
store float 8.900000e+01, float* %8
store float 5.500000e+01, float* %9
store float 0.000000e+00, float* %10
store i32 1, i32* %6
br label %12
12: ; preds = %31, %2
%13 = load i32, i32* %6
%14 = icmp sle i32 %13, 8
br i1 %14, label %15, label %34
15: ; preds = %12
%16 = load float, float* %10
%17 = load i32, i32* %7
%18 = sitofp i32 %17 to float
%19 = load float, float* %8
%20 = fmul float %18, %19
%21 = load float, float* %9
%22 = fdiv float %20, %21
%23 = fadd float %16, %22
store float %23, float* %10
%24 = load i32, i32* %7
%25 = sub nsw i32 0, %24
store i32 %25, i32* %7
%26 = load float, float* %9
store float %26, float* %11
%27 = load float, float* %8
%28 = load float, float* %9
%29 = fsub float %27, %28
store float %29, float* %9
%30 = load float, float* %11
store float %30, float* %8
br label %31
31: ; preds = %15
%32 = load i32, i32* %6
%33 = add nsw i32 %32, 1
store i32 %33, i32* %6
br label %12
34: ; preds = %12
%35 = load float, float* %10
%36 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %35)
%37 = load i32, i32* %3
ret i32 %37
}

LLVM IR (-O2):
@.str = [6 x i8] c"%5.1f\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float 0x3FC9121600000000)
ret i32 0
}