#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ stdin;
int main(void) {
  float pi, t1, t2, t3, t4, t5;
  t1 = 292 + 0.5;
  t2 = 1 + 1 / t1;
  t3 = 15 + 1 / t2;
  t4 = 7 + 1 / t3;
  pi = 3 + 1 / t4;
  printf("Pi = %f\n", pi);
  fflush(stdin);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xeb0(%rip),%xmm1
divss  -0xc(%rbp),%xmm1
movss  0xea3(%rip),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe92(%rip),%xmm1
divss  -0x10(%rbp),%xmm1
movss  0xe8d(%rip),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xe74(%rip),%xmm1
divss  -0x14(%rbp),%xmm1
movss  0xe6b(%rip),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xe56(%rip),%xmm1
divss  -0x18(%rbp),%xmm1
movss  0xe45(%rip),%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e0c(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xecc(%rip),%rdi
movss  0xec0(%rip),%xmm0
call   1030 <printf@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Pi = %f\0A\00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store i32 0, i32* %1
store float 2.925000e+02, float* %3
%8 = load float, float* %3
%9 = fdiv float 1.000000e+00, %8
%10 = fadd float 1.000000e+00, %9
store float %10, float* %4
%11 = load float, float* %4
%12 = fdiv float 1.000000e+00, %11
%13 = fadd float 1.500000e+01, %12
store float %13, float* %5
%14 = load float, float* %5
%15 = fdiv float 1.000000e+00, %14
%16 = fadd float 7.000000e+00, %15
store float %16, float* %6
%17 = load float, float* %6
%18 = fdiv float 1.000000e+00, %17
%19 = fadd float 3.000000e+00, %18
store float %19, float* %2
%20 = load float, float* %2
%21 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %20)
%22 = load i32, i32* @stdin
%23 = call i32 @fflush(i32 %22)
%24 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"Pi = %f\0A\00"
@stdin = global i32 0
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float 0x400921FB60000000)
%2 = load i32, i32* @stdin
%3 = tail call i32 @fflush(i32 %2)
%4 = tail call i32 (...) @getchar()
ret i32 0
}