double compute_pi_machin(double x, double y) {
  double x2 = x * x;
  double x3 = x2 * x;
  double x5 = x3 * x2;
  double x7 = x5 * x2;
  double x9 = x7 * x2;
  double x11 = x9 * x2;
  double x13 = x11 * x2;
  double x15 = x13 * x2;
  double x17 = x15 * x2;
  double x19 = x17 * x2;
  double atx = x17 / 17 - x19 / 19;
  atx += x13 / 13 - x15 / 15;
  atx += x9 / 9 - x11 / 11;
  atx += x5 / 5 - x7 / 7;
  atx += x - x3 / 3;
  double y2 = y * y;
  double y3 = y2 * y;
  double y5 = y3 * y2;
  double y7 = y5 * y2;
  double y9 = y7 * y2;
  double y11 = y9 * y2;
  double y13 = y11 * y2;
  double y15 = y13 * y2;
  double aty = y13 / 13 - y15 / 15;
  aty += y9 / 9 - y11 / 11;
  aty += y5 / 5 - y7 / 7;
  aty += y - y3 / 3;
  return 4 * (4 * atx - aty);
}


x86 assembly (clang, -O0):
<compute_pi_machin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xe93(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x60(%rbp),%xmm1
movsd  0xe7a(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  0xe58(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x50(%rbp),%xmm1
movsd  0xe3f(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xe18(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  0xdff(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xdd8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  0xdbf(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xd93(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  0xd0e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0xa8(%rbp),%xmm1
ff
movsd  0xcf2(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  0xcca(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x98(%rbp),%xmm1
ff
movsd  0xcae(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
addsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  0xc81(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x88(%rbp),%xmm1
ff
movsd  0xc65(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
addsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movsd  0xc33(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
addsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x68(%rbp),%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xbe7(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xbd7(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_pi_machin>:
movapd %xmm0,%xmm4
mulsd  %xmm0,%xmm4
movapd %xmm4,%xmm7
mulsd  %xmm0,%xmm7
movapd %xmm4,%xmm11
mulsd  %xmm7,%xmm11
movapd %xmm4,%xmm10
mulsd  %xmm11,%xmm10
movapd %xmm4,%xmm6
mulsd  %xmm10,%xmm6
movapd %xmm4,%xmm5
mulsd  %xmm6,%xmm5
movapd %xmm4,%xmm2
mulsd  %xmm5,%xmm2
movapd %xmm4,%xmm9
mulsd  %xmm2,%xmm9
movapd %xmm4,%xmm3
mulsd  %xmm9,%xmm3
mulsd  %xmm3,%xmm4
unpcklpd %xmm4,%xmm3
divpd  0xea0(%rip),%xmm3
unpcklpd %xmm2,%xmm6
movapd 0xea3(%rip),%xmm8
divpd  %xmm8,%xmm6
unpcklpd %xmm9,%xmm5
movapd 0xea0(%rip),%xmm9
divpd  %xmm9,%xmm5
subpd  %xmm5,%xmm6
movsd  0xeae(%rip),%xmm12
divsd  %xmm12,%xmm11
unpcklpd %xmm10,%xmm7
movapd 0xe8b(%rip),%xmm10
divpd  %xmm10,%xmm7
unpcklpd %xmm11,%xmm0
subpd  %xmm7,%xmm0
movapd %xmm3,%xmm2
unpckhpd %xmm3,%xmm2
subsd  %xmm2,%xmm3
movapd %xmm6,%xmm2
unpckhpd %xmm6,%xmm2
addsd  %xmm3,%xmm2
addsd  %xmm6,%xmm2
movapd %xmm0,%xmm3
unpckhpd %xmm0,%xmm3
addsd  %xmm2,%xmm3
addsd  %xmm3,%xmm0
movapd %xmm1,%xmm3
mulsd  %xmm1,%xmm3
movapd %xmm3,%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm3,%xmm6
mulsd  %xmm2,%xmm6
movapd %xmm3,%xmm11
mulsd  %xmm6,%xmm11
movapd %xmm3,%xmm4
mulsd  %xmm11,%xmm4
movapd %xmm3,%xmm5
mulsd  %xmm4,%xmm5
movapd %xmm3,%xmm7
mulsd  %xmm5,%xmm7
mulsd  %xmm7,%xmm3
unpcklpd %xmm7,%xmm4
divpd  %xmm8,%xmm4
unpcklpd %xmm3,%xmm5
divpd  %xmm9,%xmm5
subpd  %xmm5,%xmm4
divsd  %xmm12,%xmm6
unpcklpd %xmm11,%xmm2
divpd  %xmm10,%xmm2
unpcklpd %xmm6,%xmm1
subpd  %xmm2,%xmm1
movapd %xmm4,%xmm2
unpckhpd %xmm4,%xmm2
addsd  %xmm4,%xmm2
movapd %xmm1,%xmm3
unpckhpd %xmm1,%xmm3
addsd  %xmm2,%xmm3
addsd  %xmm1,%xmm3
movsd  0xdd9(%rip),%xmm1
mulsd  %xmm1,%xmm0
subsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @compute_pi_machin(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
store double %0, double* %3
store double %1, double* %4
%25 = load double, double* %3
%26 = load double, double* %3
%27 = fmul double %25, %26
store double %27, double* %5
%28 = load double, double* %5
%29 = load double, double* %3
%30 = fmul double %28, %29
store double %30, double* %6
%31 = load double, double* %6
%32 = load double, double* %5
%33 = fmul double %31, %32
store double %33, double* %7
%34 = load double, double* %7
%35 = load double, double* %5
%36 = fmul double %34, %35
store double %36, double* %8
%37 = load double, double* %8
%38 = load double, double* %5
%39 = fmul double %37, %38
store double %39, double* %9
%40 = load double, double* %9
%41 = load double, double* %5
%42 = fmul double %40, %41
store double %42, double* %10
%43 = load double, double* %10
%44 = load double, double* %5
%45 = fmul double %43, %44
store double %45, double* %11
%46 = load double, double* %11
%47 = load double, double* %5
%48 = fmul double %46, %47
store double %48, double* %12
%49 = load double, double* %12
%50 = load double, double* %5
%51 = fmul double %49, %50
store double %51, double* %13
%52 = load double, double* %13
%53 = load double, double* %5
%54 = fmul double %52, %53
store double %54, double* %14
%55 = load double, double* %13
%56 = fdiv double %55, 1.700000e+01
%57 = load double, double* %14
%58 = fdiv double %57, 1.900000e+01
%59 = fsub double %56, %58
store double %59, double* %15
%60 = load double, double* %11
%61 = fdiv double %60, 1.300000e+01
%62 = load double, double* %12
%63 = fdiv double %62, 1.500000e+01
%64 = fsub double %61, %63
%65 = load double, double* %15
%66 = fadd double %65, %64
store double %66, double* %15
%67 = load double, double* %9
%68 = fdiv double %67, 9.000000e+00
%69 = load double, double* %10
%70 = fdiv double %69, 1.100000e+01
%71 = fsub double %68, %70
%72 = load double, double* %15
%73 = fadd double %72, %71
store double %73, double* %15
%74 = load double, double* %7
%75 = fdiv double %74, 5.000000e+00
%76 = load double, double* %8
%77 = fdiv double %76, 7.000000e+00
%78 = fsub double %75, %77
%79 = load double, double* %15
%80 = fadd double %79, %78
store double %80, double* %15
%81 = load double, double* %3
%82 = load double, double* %6
%83 = fdiv double %82, 3.000000e+00
%84 = fsub double %81, %83
%85 = load double, double* %15
%86 = fadd double %85, %84
store double %86, double* %15
%87 = load double, double* %4
%88 = load double, double* %4
%89 = fmul double %87, %88
store double %89, double* %16
%90 = load double, double* %16
%91 = load double, double* %4
%92 = fmul double %90, %91
store double %92, double* %17
%93 = load double, double* %17
%94 = load double, double* %16
%95 = fmul double %93, %94
store double %95, double* %18
%96 = load double, double* %18
%97 = load double, double* %16
%98 = fmul double %96, %97
store double %98, double* %19
%99 = load double, double* %19
%100 = load double, double* %16
%101 = fmul double %99, %100
store double %101, double* %20
%102 = load double, double* %20
%103 = load double, double* %16
%104 = fmul double %102, %103
store double %104, double* %21
%105 = load double, double* %21
%106 = load double, double* %16
%107 = fmul double %105, %106
store double %107, double* %22
%108 = load double, double* %22
%109 = load double, double* %16
%110 = fmul double %108, %109
store double %110, double* %23
%111 = load double, double* %22
%112 = fdiv double %111, 1.300000e+01
%113 = load double, double* %23
%114 = fdiv double %113, 1.500000e+01
%115 = fsub double %112, %114
store double %115, double* %24
%116 = load double, double* %20
%117 = fdiv double %116, 9.000000e+00
%118 = load double, double* %21
%119 = fdiv double %118, 1.100000e+01
%120 = fsub double %117, %119
%121 = load double, double* %24
%122 = fadd double %121, %120
store double %122, double* %24
%123 = load double, double* %18
%124 = fdiv double %123, 5.000000e+00
%125 = load double, double* %19
%126 = fdiv double %125, 7.000000e+00
%127 = fsub double %124, %126
%128 = load double, double* %24
%129 = fadd double %128, %127
store double %129, double* %24
%130 = load double, double* %4
%131 = load double, double* %17
%132 = fdiv double %131, 3.000000e+00
%133 = fsub double %130, %132
%134 = load double, double* %24
%135 = fadd double %134, %133
store double %135, double* %24
%136 = load double, double* %15
%137 = load double, double* %24
%138 = fneg double %137
%139 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %136, double %138)
%140 = fmul double 4.000000e+00, %139
ret double %140
}

LLVM IR (-O2):
define double @compute_pi_machin(double %0, double %1) {
%3 = fmul double %0, %0
%4 = fmul double %3, %0
%5 = fmul double %3, %4
%6 = fmul double %3, %5
%7 = fmul double %3, %6
%8 = fmul double %3, %7
%9 = fmul double %3, %8
%10 = fmul double %3, %9
%11 = fmul double %3, %10
%12 = fmul double %3, %11
%13 = insertelement <2 x double> poison, double %11, i64 0
%14 = insertelement <2 x double> %13, double %12, i64 1
%15 = fdiv <2 x double> %14, <double 1.700000e+01, double 1.900000e+01>
%16 = shufflevector <2 x double> %15, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%17 = fsub <2 x double> %15, %16
%18 = insertelement <2 x double> poison, double %7, i64 0
%19 = insertelement <2 x double> %18, double %9, i64 1
%20 = fdiv <2 x double> %19, <double 9.000000e+00, double 1.300000e+01>
%21 = insertelement <2 x double> poison, double %8, i64 0
%22 = insertelement <2 x double> %21, double %10, i64 1
%23 = fdiv <2 x double> %22, <double 1.100000e+01, double 1.500000e+01>
%24 = fsub <2 x double> %20, %23
%25 = shufflevector <2 x double> %24, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%26 = fadd <2 x double> %25, %17
%27 = fadd <2 x double> %24, %26
%28 = fdiv double %5, 5.000000e+00
%29 = insertelement <2 x double> poison, double %4, i64 0
%30 = insertelement <2 x double> %29, double %6, i64 1
%31 = fdiv <2 x double> %30, <double 3.000000e+00, double 7.000000e+00>
%32 = insertelement <2 x double> poison, double %0, i64 0
%33 = insertelement <2 x double> %32, double %28, i64 1
%34 = fsub <2 x double> %33, %31
%35 = shufflevector <2 x double> %34, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%36 = fadd <2 x double> %35, %27
%37 = fadd <2 x double> %34, %36
%38 = extractelement <2 x double> %37, i64 0
%39 = fmul double %1, %1
%40 = fmul double %39, %1
%41 = fmul double %39, %40
%42 = fmul double %39, %41
%43 = fmul double %39, %42
%44 = fmul double %39, %43
%45 = fmul double %39, %44
%46 = fmul double %39, %45
%47 = insertelement <2 x double> poison, double %43, i64 0
%48 = insertelement <2 x double> %47, double %45, i64 1
%49 = fdiv <2 x double> %48, <double 9.000000e+00, double 1.300000e+01>
%50 = insertelement <2 x double> poison, double %44, i64 0
%51 = insertelement <2 x double> %50, double %46, i64 1
%52 = fdiv <2 x double> %51, <double 1.100000e+01, double 1.500000e+01>
%53 = fsub <2 x double> %49, %52
%54 = shufflevector <2 x double> %53, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%55 = fadd <2 x double> %53, %54
%56 = fdiv double %41, 5.000000e+00
%57 = insertelement <2 x double> poison, double %40, i64 0
%58 = insertelement <2 x double> %57, double %42, i64 1
%59 = fdiv <2 x double> %58, <double 3.000000e+00, double 7.000000e+00>
%60 = insertelement <2 x double> poison, double %1, i64 0
%61 = insertelement <2 x double> %60, double %56, i64 1
%62 = fsub <2 x double> %61, %59
%63 = shufflevector <2 x double> %62, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%64 = fadd <2 x double> %63, %55
%65 = fadd <2 x double> %62, %64
%66 = extractelement <2 x double> %65, i64 0
%67 = fneg double %66
%68 = tail call double @llvm.fmuladd.f64(double %38, double 4.000000e+00, double %67)
%69 = fmul double %68, 4.000000e+00
ret double %69
}