int tpd6(int inverse, const int i[], const double p[], int Nhat,
         const double rawcrd[], double *discrd) {
  double r, s, u, v;
  if (i[4 + inverse] != 31 || 2 < Nhat) {
    return 1;
  }
  u = rawcrd[0];
  v = rawcrd[1];
  if (i[6]) {
    r = p[0] + p[1] * u + p[2] * v;
    v = p[3] + p[4] * u + p[5] * v;
    u = r;
    p += 6;
  }
  if (inverse)
    p += i[4];
  *discrd =
      p[0] +
      u * (p[1] +
           u * (p[4] + u * (p[7] + u * (p[12] + u * (p[17] + u * (p[24]))))));
  if (Nhat == 1)
    return 0;
  *discrd +=
      v * (p[2] +
           v * (p[6] + v * (p[10] + v * (p[16] + v * (p[22] + v * (p[30])))))) +
      u *
          (p[5] + v * (p[9] + v * (p[15] + v * (p[21] + v * (p[29])))) +
           u * (p[8] + v * (p[14] + v * (p[20] + v * (p[28]))) +
                u * (p[13] + v * (p[19] + v * (p[27])) +
                     u * (p[18] + v * (p[26]) + u * (p[25]))))) *
          v;
  if (i[7]) {
    s = u * u + v * v;
    r = sqrt(s);
    *discrd += r * (p[3] + s * (p[11] + s * (p[23])));
  }
  return 0;
}


x86 assembly (clang, -O0):
<tpd6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
cmpl   $0x1f,(%rax,%rcx,4)
jne    1153 <tpd6+0x43>
mov    $0x2,%eax
cmp    -0x1c(%rbp),%eax
jge    115f <tpd6+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    15ae <tpd6+0x49e>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,0x18(%rax)
je     1211 <tpd6+0x101>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm1
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
add    $0x30,%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1234 <tpd6+0x124>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x48(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm3
movsd  -0x48(%rbp),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm5
movsd  -0x48(%rbp),%xmm4
mov    -0x18(%rbp),%rax
movsd  0x38(%rax),%xmm7
movsd  -0x48(%rbp),%xmm6
mov    -0x18(%rbp),%rax
movsd  0x60(%rax),%xmm9
movsd  -0x48(%rbp),%xmm8
mov    -0x18(%rbp),%rax
movsd  0x88(%rax),%xmm11
movsd  -0x48(%rbp),%xmm10
mov    -0x18(%rbp),%rax
movsd  0xc0(%rax),%xmm12
mulsd  %xmm12,%xmm10
addsd  %xmm11,%xmm10
mulsd  %xmm10,%xmm8
addsd  %xmm9,%xmm8
mulsd  %xmm8,%xmm6
addsd  %xmm7,%xmm6
mulsd  %xmm6,%xmm4
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
cmpl   $0x1,-0x1c(%rbp)
jne    12ee <tpd6+0x1de>
movl   $0x0,-0x4(%rbp)
jmp    15ae <tpd6+0x49e>
movsd  -0x50(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm1
movsd  -0x50(%rbp),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x30(%rax),%xmm4
movsd  -0x50(%rbp),%xmm3
mov    -0x18(%rbp),%rax
movsd  0x50(%rax),%xmm6
movsd  -0x50(%rbp),%xmm5
mov    -0x18(%rbp),%rax
movsd  0x80(%rax),%xmm8
movsd  -0x50(%rbp),%xmm7
mov    -0x18(%rbp),%rax
movsd  0xb0(%rax),%xmm10
movsd  -0x50(%rbp),%xmm9
mov    -0x18(%rbp),%rax
movsd  0xf0(%rax),%xmm11
mulsd  %xmm11,%xmm9
addsd  %xmm10,%xmm9
mulsd  %xmm9,%xmm7
addsd  %xmm8,%xmm7
mulsd  %xmm7,%xmm5
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x48(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm3
movsd  -0x50(%rbp),%xmm4
mov    -0x18(%rbp),%rax
movsd  0x48(%rax),%xmm6
movsd  -0x50(%rbp),%xmm5
mov    -0x18(%rbp),%rax
movsd  0x78(%rax),%xmm8
movsd  -0x50(%rbp),%xmm7
mov    -0x18(%rbp),%rax
movsd  0xa8(%rax),%xmm10
movsd  -0x50(%rbp),%xmm9
mov    -0x18(%rbp),%rax
movsd  0xe8(%rax),%xmm11
mulsd  %xmm11,%xmm9
addsd  %xmm10,%xmm9
mulsd  %xmm9,%xmm7
addsd  %xmm8,%xmm7
mulsd  %xmm7,%xmm5
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm4
addsd  %xmm3,%xmm4
movsd  -0x48(%rbp),%xmm3
mov    -0x18(%rbp),%rax
movsd  0x40(%rax),%xmm5
movsd  -0x50(%rbp),%xmm6
mov    -0x18(%rbp),%rax
movsd  0x70(%rax),%xmm8
movsd  -0x50(%rbp),%xmm7
mov    -0x18(%rbp),%rax
movsd  0xa0(%rax),%xmm10
movsd  -0x50(%rbp),%xmm9
mov    -0x18(%rbp),%rax
movsd  0xe0(%rax),%xmm11
mulsd  %xmm11,%xmm9
addsd  %xmm10,%xmm9
mulsd  %xmm9,%xmm7
addsd  %xmm8,%xmm7
mulsd  %xmm7,%xmm6
addsd  %xmm5,%xmm6
movsd  -0x48(%rbp),%xmm5
mov    -0x18(%rbp),%rax
movsd  0x68(%rax),%xmm7
movsd  -0x50(%rbp),%xmm8
mov    -0x18(%rbp),%rax
movsd  0x98(%rax),%xmm10
movsd  -0x50(%rbp),%xmm9
mov    -0x18(%rbp),%rax
movsd  0xd8(%rax),%xmm11
mulsd  %xmm11,%xmm9
addsd  %xmm10,%xmm9
mulsd  %xmm9,%xmm8
addsd  %xmm7,%xmm8
movsd  -0x48(%rbp),%xmm7
mov    -0x18(%rbp),%rax
movsd  0x90(%rax),%xmm9
movsd  -0x50(%rbp),%xmm10
mov    -0x18(%rbp),%rax
movsd  0xd0(%rax),%xmm11
mulsd  %xmm11,%xmm10
addsd  %xmm9,%xmm10
movsd  -0x48(%rbp),%xmm9
mov    -0x18(%rbp),%rax
movsd  0xc8(%rax),%xmm11
mulsd  %xmm11,%xmm9
addsd  %xmm10,%xmm9
mulsd  %xmm9,%xmm7
addsd  %xmm8,%xmm7
mulsd  %xmm7,%xmm5
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0x0,0x1c(%rax)
je     15a7 <tpd6+0x497>
movsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm1
movsd  -0x40(%rbp),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x58(%rax),%xmm4
movsd  -0x40(%rbp),%xmm3
mov    -0x18(%rbp),%rax
movsd  0xb8(%rax),%xmm5
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tpd6>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    $0x1,%ebp
cmp    $0x2,%ecx
jg     1363 <tpd6+0x253>
movslq %edi,%rax
cmpl   $0x1f,0x10(%rsi,%rax,4)
jne    1363 <tpd6+0x253>
mov    %r9,%r14
mov    %rdx,%rbx
movupd (%r8),%xmm8
cmpl   $0x0,0x18(%rsi)
je     1187 <tpd6+0x77>
movsd  (%rbx),%xmm0
movsd  0x8(%rbx),%xmm1
movhpd 0x20(%rbx),%xmm1
movsd  0x10(%rbx),%xmm2
movapd %xmm8,%xmm3
unpcklpd %xmm8,%xmm3
movhpd 0x18(%rbx),%xmm0
mulpd  %xmm1,%xmm3
addpd  %xmm3,%xmm0
movhpd 0x28(%rbx),%xmm2
unpckhpd %xmm8,%xmm8
mulpd  %xmm2,%xmm8
addpd  %xmm0,%xmm8
add    $0x30,%rbx
test   %edi,%edi
je     1193 <tpd6+0x83>
movslq 0x10(%rsi),%rax
lea    (%rbx,%rax,8),%rbx
movsd  0xc0(%rbx),%xmm0
mulsd  %xmm8,%xmm0
addsd  0x88(%rbx),%xmm0
mulsd  %xmm8,%xmm0
addsd  0x60(%rbx),%xmm0
mulsd  %xmm8,%xmm0
addsd  0x38(%rbx),%xmm0
mulsd  %xmm8,%xmm0
addsd  0x20(%rbx),%xmm0
mulsd  %xmm8,%xmm0
addsd  0x8(%rbx),%xmm0
mulsd  %xmm8,%xmm0
addsd  (%rbx),%xmm0
movsd  %xmm0,(%r14)
xor    %ebp,%ebp
cmp    $0x1,%ecx
je     1363 <tpd6+0x253>
movapd %xmm8,%xmm1
unpckhpd %xmm8,%xmm1
movsd  0xf0(%rbx),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xb0(%rbx),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x80(%rbx),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x50(%rbx),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x30(%rbx),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x10(%rbx),%xmm2
movsd  0xe8(%rbx),%xmm3
mulsd  %xmm1,%xmm3
addsd  0xa8(%rbx),%xmm3
mulsd  %xmm1,%xmm3
addsd  0x78(%rbx),%xmm3
mulsd  %xmm1,%xmm3
addsd  0x48(%rbx),%xmm3
mulsd  %xmm1,%xmm3
addsd  0x28(%rbx),%xmm3
movsd  0xe0(%rbx),%xmm4
mulsd  %xmm1,%xmm4
addsd  0xa0(%rbx),%xmm4
mulsd  %xmm1,%xmm4
addsd  0x70(%rbx),%xmm4
mulsd  %xmm1,%xmm4
addsd  0x40(%rbx),%xmm4
movsd  0xd8(%rbx),%xmm5
mulsd  %xmm1,%xmm5
addsd  0x98(%rbx),%xmm5
mulsd  %xmm1,%xmm5
addsd  0x68(%rbx),%xmm5
movsd  0xd0(%rbx),%xmm6
mulsd  %xmm1,%xmm6
addsd  0x90(%rbx),%xmm6
movsd  0xc8(%rbx),%xmm7
mulsd  %xmm8,%xmm7
addsd  %xmm6,%xmm7
mulsd  %xmm8,%xmm7
addsd  %xmm5,%xmm7
mulsd  %xmm8,%xmm7
addsd  %xmm4,%xmm7
mulsd  %xmm8,%xmm7
addsd  %xmm3,%xmm7
mulsd  %xmm8,%xmm7
mulsd  %xmm1,%xmm7
mulsd  %xmm1,%xmm2
addsd  %xmm7,%xmm2
addsd  %xmm2,%xmm0
movsd  %xmm0,(%r14)
cmpl   $0x0,0x1c(%rsi)
je     1363 <tpd6+0x253>
mulsd  %xmm1,%xmm1
mulsd  %xmm8,%xmm8
addsd  %xmm1,%xmm8
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm8
jb     1323 <tpd6+0x213>
xorps  %xmm0,%xmm0
sqrtsd %xmm8,%xmm0
jmp    1339 <tpd6+0x229>
movapd %xmm8,%xmm0
movapd %xmm8,(%rsp)
call   1030 <sqrt@plt>
movapd (%rsp),%xmm8
movsd  0xb8(%rbx),%xmm1
mulsd  %xmm8,%xmm1
addsd  0x58(%rbx),%xmm1
mulsd  %xmm8,%xmm1
addsd  0x18(%rbx),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%r14),%xmm1
movsd  %xmm1,(%r14)
mov    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @tpd6(i32 %0, i32* %1, double* %2, i32 %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
%10 = alloca double*
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
store i32 %0, i32* %8
store i32* %1, i32** %9
store double* %2, double** %10
store i32 %3, i32* %11
store double* %4, double** %12
store double* %5, double** %13
%18 = load i32*, i32** %9
%19 = load i32, i32* %8
%20 = add nsw i32 4, %19
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %18, i64 %21
%23 = load i32, i32* %22
%24 = icmp ne i32 %23, 31
br i1 %24, label %28, label %25
25: ; preds = %6
%26 = load i32, i32* %11
%27 = icmp slt i32 2, %26
br i1 %27, label %28, label %29
28: ; preds = %25, %6
store i32 1, i32* %7
br label %260
29: ; preds = %25
%30 = load double*, double** %12
%31 = getelementptr inbounds double, double* %30, i64 0
%32 = load double, double* %31
store double %32, double* %16
%33 = load double*, double** %12
%34 = getelementptr inbounds double, double* %33, i64 1
%35 = load double, double* %34
store double %35, double* %17
%36 = load i32*, i32** %9
%37 = getelementptr inbounds i32, i32* %36, i64 6
%38 = load i32, i32* %37
%39 = icmp ne i32 %38, 0
br i1 %39, label %40, label %70
40: ; preds = %29
%41 = load double*, double** %10
%42 = getelementptr inbounds double, double* %41, i64 0
%43 = load double, double* %42
%44 = load double*, double** %10
%45 = getelementptr inbounds double, double* %44, i64 1
%46 = load double, double* %45
%47 = load double, double* %16
%48 = call double @llvm.fmuladd.f64(double %46, double %47, double %43)
%49 = load double*, double** %10
%50 = getelementptr inbounds double, double* %49, i64 2
%51 = load double, double* %50
%52 = load double, double* %17
%53 = call double @llvm.fmuladd.f64(double %51, double %52, double %48)
store double %53, double* %14
%54 = load double*, double** %10
%55 = getelementptr inbounds double, double* %54, i64 3
%56 = load double, double* %55
%57 = load double*, double** %10
%58 = getelementptr inbounds double, double* %57, i64 4
%59 = load double, double* %58
%60 = load double, double* %16
%61 = call double @llvm.fmuladd.f64(double %59, double %60, double %56)
%62 = load double*, double** %10
%63 = getelementptr inbounds double, double* %62, i64 5
%64 = load double, double* %63
%65 = load double, double* %17
%66 = call double @llvm.fmuladd.f64(double %64, double %65, double %61)
store double %66, double* %17
%67 = load double, double* %14
store double %67, double* %16
%68 = load double*, double** %10
%69 = getelementptr inbounds double, double* %68, i64 6
store double* %69, double** %10
br label %70
70: ; preds = %40, %29
%71 = load i32, i32* %8
%72 = icmp ne i32 %71, 0
br i1 %72, label %73, label %80
73: ; preds = %70
%74 = load i32*, i32** %9
%75 = getelementptr inbounds i32, i32* %74, i64 4
%76 = load i32, i32* %75
%77 = load double*, double** %10
%78 = sext i32 %76 to i64
%79 = getelementptr inbounds double, double* %77, i64 %78
store double* %79, double** %10
br label %80
80: ; preds = %73, %70
%81 = load double*, double** %10
%82 = getelementptr inbounds double, double* %81, i64 0
%83 = load double, double* %82
%84 = load double, double* %16
%85 = load double*, double** %10
%86 = getelementptr inbounds double, double* %85, i64 1
%87 = load double, double* %86
%88 = load double, double* %16
%89 = load double*, double** %10
%90 = getelementptr inbounds double, double* %89, i64 4
%91 = load double, double* %90
%92 = load double, double* %16
%93 = load double*, double** %10
%94 = getelementptr inbounds double, double* %93, i64 7
%95 = load double, double* %94
%96 = load double, double* %16
%97 = load double*, double** %10
%98 = getelementptr inbounds double, double* %97, i64 12
%99 = load double, double* %98
%100 = load double, double* %16
%101 = load double*, double** %10
%102 = getelementptr inbounds double, double* %101, i64 17
%103 = load double, double* %102
%104 = load double, double* %16
%105 = load double*, double** %10
%106 = getelementptr inbounds double, double* %105, i64 24
%107 = load double, double* %106
%108 = call double @llvm.fmuladd.f64(double %104, double %107, double %103)
%109 = call double @llvm.fmuladd.f64(double %100, double %108, double %99)
%110 = call double @llvm.fmuladd.f64(double %96, double %109, double %95)
%111 = call double @llvm.fmuladd.f64(double %92, double %110, double %91)
%112 = call double @llvm.fmuladd.f64(double %88, double %111, double %87)
%113 = call double @llvm.fmuladd.f64(double %84, double %112, double %83)
%114 = load double*, double** %13
store double %113, double* %114
%115 = load i32, i32* %11
%116 = icmp eq i32 %115, 1
br i1 %116, label %117, label %118
117: ; preds = %80
store i32 0, i32* %7
br label %260
118: ; preds = %80
%119 = load double, double* %17
%120 = load double*, double** %10
%121 = getelementptr inbounds double, double* %120, i64 2
%122 = load double, double* %121
%123 = load double, double* %17
%124 = load double*, double** %10
%125 = getelementptr inbounds double, double* %124, i64 6
%126 = load double, double* %125
%127 = load double, double* %17
%128 = load double*, double** %10
%129 = getelementptr inbounds double, double* %128, i64 10
%130 = load double, double* %129
%131 = load double, double* %17
%132 = load double*, double** %10
%133 = getelementptr inbounds double, double* %132, i64 16
%134 = load double, double* %133
%135 = load double, double* %17
%136 = load double*, double** %10
%137 = getelementptr inbounds double, double* %136, i64 22
%138 = load double, double* %137
%139 = load double, double* %17
%140 = load double*, double** %10
%141 = getelementptr inbounds double, double* %140, i64 30
%142 = load double, double* %141
%143 = call double @llvm.fmuladd.f64(double %139, double %142, double %138)
%144 = call double @llvm.fmuladd.f64(double %135, double %143, double %134)
%145 = call double @llvm.fmuladd.f64(double %131, double %144, double %130)
%146 = call double @llvm.fmuladd.f64(double %127, double %145, double %126)
%147 = call double @llvm.fmuladd.f64(double %123, double %146, double %122)
%148 = load double, double* %16
%149 = load double*, double** %10
%150 = getelementptr inbounds double, double* %149, i64 5
%151 = load double, double* %150
%152 = load double, double* %17
%153 = load double*, double** %10
%154 = getelementptr inbounds double, double* %153, i64 9
%155 = load double, double* %154
%156 = load double, double* %17
%157 = load double*, double** %10
%158 = getelementptr inbounds double, double* %157, i64 15
%159 = load double, double* %158
%160 = load double, double* %17
%161 = load double*, double** %10
%162 = getelementptr inbounds double, double* %161, i64 21
%163 = load double, double* %162
%164 = load double, double* %17
%165 = load double*, double** %10
%166 = getelementptr inbounds double, double* %165, i64 29
%167 = load double, double* %166
%168 = call double @llvm.fmuladd.f64(double %164, double %167, double %163)
%169 = call double @llvm.fmuladd.f64(double %160, double %168, double %159)
%170 = call double @llvm.fmuladd.f64(double %156, double %169, double %155)
%171 = call double @llvm.fmuladd.f64(double %152, double %170, double %151)
%172 = load double, double* %16
%173 = load double*, double** %10
%174 = getelementptr inbounds double, double* %173, i64 8
%175 = load double, double* %174
%176 = load double, double* %17
%177 = load double*, double** %10
%178 = getelementptr inbounds double, double* %177, i64 14
%179 = load double, double* %178
%180 = load double, double* %17
%181 = load double*, double** %10
%182 = getelementptr inbounds double, double* %181, i64 20
%183 = load double, double* %182
%184 = load double, double* %17
%185 = load double*, double** %10
%186 = getelementptr inbounds double, double* %185, i64 28
%187 = load double, double* %186
%188 = call double @llvm.fmuladd.f64(double %184, double %187, double %183)
%189 = call double @llvm.fmuladd.f64(double %180, double %188, double %179)
%190 = call double @llvm.fmuladd.f64(double %176, double %189, double %175)
%191 = load double, double* %16
%192 = load double*, double** %10
%193 = getelementptr inbounds double, double* %192, i64 13
%194 = load double, double* %193
%195 = load double, double* %17
%196 = load double*, double** %10
%197 = getelementptr inbounds double, double* %196, i64 19
%198 = load double, double* %197
%199 = load double, double* %17
%200 = load double*, double** %10
%201 = getelementptr inbounds double, double* %200, i64 27
%202 = load double, double* %201
%203 = call double @llvm.fmuladd.f64(double %199, double %202, double %198)
%204 = call double @llvm.fmuladd.f64(double %195, double %203, double %194)
%205 = load double, double* %16
%206 = load double*, double** %10
%207 = getelementptr inbounds double, double* %206, i64 18
%208 = load double, double* %207
%209 = load double, double* %17
%210 = load double*, double** %10
%211 = getelementptr inbounds double, double* %210, i64 26
%212 = load double, double* %211
%213 = call double @llvm.fmuladd.f64(double %209, double %212, double %208)
%214 = load double, double* %16
%215 = load double*, double** %10
%216 = getelementptr inbounds double, double* %215, i64 25
%217 = load double, double* %216
%218 = call double @llvm.fmuladd.f64(double %214, double %217, double %213)
%219 = call double @llvm.fmuladd.f64(double %205, double %218, double %204)
%220 = call double @llvm.fmuladd.f64(double %191, double %219, double %190)
%221 = call double @llvm.fmuladd.f64(double %172, double %220, double %171)
%222 = fmul double %148, %221
%223 = load double, double* %17
%224 = fmul double %222, %223
%225 = call double @llvm.fmuladd.f64(double %119, double %147, double %224)
%226 = load double*, double** %13
%227 = load double, double* %226
%228 = fadd double %227, %225
store double %228, double* %226
%229 = load i32*, i32** %9
%230 = getelementptr inbounds i32, i32* %229, i64 7
%231 = load i32, i32* %230
%232 = icmp ne i32 %231, 0
br i1 %232, label %233, label %259
233: ; preds = %118
%234 = load double, double* %16
%235 = load double, double* %16
%236 = load double, double* %17
%237 = load double, double* %17
%238 = fmul double %236, %237
%239 = call double @llvm.fmuladd.f64(double %234, double %235, double %238)
store double %239, double* %15
%240 = load double, double* %15
%241 = call double @sqrt(double %240)
store double %241, double* %14
%242 = load double, double* %14
%243 = load double*, double** %10
%244 = getelementptr inbounds double, double* %243, i64 3
%245 = load double, double* %244
%246 = load double, double* %15
%247 = load double*, double** %10
%248 = getelementptr inbounds double, double* %247, i64 11
%249 = load double, double* %248
%250 = load double, double* %15
%251 = load double*, double** %10
%252 = getelementptr inbounds double, double* %251, i64 23
%253 = load double, double* %252
%254 = call double @llvm.fmuladd.f64(double %250, double %253, double %249)
%255 = call double @llvm.fmuladd.f64(double %246, double %254, double %245)
%256 = load double*, double** %13
%257 = load double, double* %256
%258 = call double @llvm.fmuladd.f64(double %242, double %255, double %257)
store double %258, double* %256
br label %259
259: ; preds = %233, %118
store i32 0, i32* %7
br label %260
260: ; preds = %259, %117, %28
%261 = load i32, i32* %7
ret i32 %261
}

LLVM IR (-O2):
define i32 @tpd6(i32 %0, i32* nocapture %1, double* %2, i32 %3, double* nocapture %4, double* nocapture %5) {
%7 = add nsw i32 %0, 4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %1, i64 %8
%10 = load i32, i32* %9
%11 = icmp ne i32 %10, 31
%12 = icmp sgt i32 %3, 2
%13 = or i1 %12, %11
br i1 %13, label %159, label %14
14: ; preds = %6
%15 = bitcast double* %4 to <2 x double>*
%16 = load <2 x double>, <2 x double>* %15
%17 = getelementptr inbounds i32, i32* %1, i64 6
%18 = load i32, i32* %17
%19 = icmp eq i32 %18, 0
br i1 %19, label %43, label %20
20: ; preds = %14
%21 = load double, double* %2
%22 = getelementptr inbounds double, double* %2, i64 1
%23 = load double, double* %22
%24 = getelementptr inbounds double, double* %2, i64 2
%25 = load double, double* %24
%26 = getelementptr inbounds double, double* %2, i64 3
%27 = load double, double* %26
%28 = getelementptr inbounds double, double* %2, i64 4
%29 = load double, double* %28
%30 = insertelement <2 x double> poison, double %23, i64 0
%31 = insertelement <2 x double> %30, double %29, i64 1
%32 = shufflevector <2 x double> %16, <2 x double> undef, <2 x i32> zeroinitializer
%33 = insertelement <2 x double> poison, double %21, i64 0
%34 = insertelement <2 x double> %33, double %27, i64 1
%35 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %31, <2 x double> %32, <2 x double> %34)
%36 = getelementptr inbounds double, double* %2, i64 5
%37 = load double, double* %36
%38 = insertelement <2 x double> poison, double %25, i64 0
%39 = insertelement <2 x double> %38, double %37, i64 1
%40 = shufflevector <2 x double> %16, <2 x double> undef, <2 x i32> <i32 1, i32 1>
%41 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %39, <2 x double> %40, <2 x double> %35)
%42 = getelementptr inbounds double, double* %2, i64 6
br label %43
43: ; preds = %20, %14
%44 = phi double* [ %42, %20 ], [ %2, %14 ]
%45 = phi <2 x double> [ %41, %20 ], [ %16, %14 ]
%46 = icmp eq i32 %0, 0
br i1 %46, label %52, label %47
47: ; preds = %43
%48 = getelementptr inbounds i32, i32* %1, i64 4
%49 = load i32, i32* %48
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds double, double* %44, i64 %50
br label %52
52: ; preds = %47, %43
%53 = phi double* [ %51, %47 ], [ %44, %43 ]
%54 = load double, double* %53
%55 = getelementptr inbounds double, double* %53, i64 1
%56 = load double, double* %55
%57 = getelementptr inbounds double, double* %53, i64 4
%58 = load double, double* %57
%59 = getelementptr inbounds double, double* %53, i64 7
%60 = load double, double* %59
%61 = getelementptr inbounds double, double* %53, i64 12
%62 = load double, double* %61
%63 = getelementptr inbounds double, double* %53, i64 17
%64 = load double, double* %63
%65 = getelementptr inbounds double, double* %53, i64 24
%66 = load double, double* %65
%67 = extractelement <2 x double> %45, i64 0
%68 = tail call double @llvm.fmuladd.f64(double %67, double %66, double %64)
%69 = tail call double @llvm.fmuladd.f64(double %67, double %68, double %62)
%70 = tail call double @llvm.fmuladd.f64(double %67, double %69, double %60)
%71 = tail call double @llvm.fmuladd.f64(double %67, double %70, double %58)
%72 = tail call double @llvm.fmuladd.f64(double %67, double %71, double %56)
%73 = tail call double @llvm.fmuladd.f64(double %67, double %72, double %54)
store double %73, double* %5
%74 = icmp eq i32 %3, 1
br i1 %74, label %159, label %75
75: ; preds = %52
%76 = getelementptr inbounds double, double* %53, i64 2
%77 = load double, double* %76
%78 = getelementptr inbounds double, double* %53, i64 6
%79 = load double, double* %78
%80 = getelementptr inbounds double, double* %53, i64 10
%81 = load double, double* %80
%82 = getelementptr inbounds double, double* %53, i64 16
%83 = load double, double* %82
%84 = getelementptr inbounds double, double* %53, i64 22
%85 = load double, double* %84
%86 = getelementptr inbounds double, double* %53, i64 30
%87 = load double, double* %86
%88 = extractelement <2 x double> %45, i64 1
%89 = tail call double @llvm.fmuladd.f64(double %88, double %87, double %85)
%90 = tail call double @llvm.fmuladd.f64(double %88, double %89, double %83)
%91 = tail call double @llvm.fmuladd.f64(double %88, double %90, double %81)
%92 = tail call double @llvm.fmuladd.f64(double %88, double %91, double %79)
%93 = tail call double @llvm.fmuladd.f64(double %88, double %92, double %77)
%94 = getelementptr inbounds double, double* %53, i64 5
%95 = load double, double* %94
%96 = getelementptr inbounds double, double* %53, i64 9
%97 = load double, double* %96
%98 = getelementptr inbounds double, double* %53, i64 15
%99 = load double, double* %98
%100 = getelementptr inbounds double, double* %53, i64 21
%101 = load double, double* %100
%102 = getelementptr inbounds double, double* %53, i64 29
%103 = load double, double* %102
%104 = tail call double @llvm.fmuladd.f64(double %88, double %103, double %101)
%105 = tail call double @llvm.fmuladd.f64(double %88, double %104, double %99)
%106 = tail call double @llvm.fmuladd.f64(double %88, double %105, double %97)
%107 = tail call double @llvm.fmuladd.f64(double %88, double %106, double %95)
%108 = getelementptr inbounds double, double* %53, i64 8
%109 = load double, double* %108
%110 = getelementptr inbounds double, double* %53, i64 14
%111 = load double, double* %110
%112 = getelementptr inbounds double, double* %53, i64 20
%113 = load double, double* %112
%114 = getelementptr inbounds double, double* %53, i64 28
%115 = load double, double* %114
%116 = tail call double @llvm.fmuladd.f64(double %88, double %115, double %113)
%117 = tail call double @llvm.fmuladd.f64(double %88, double %116, double %111)
%118 = tail call double @llvm.fmuladd.f64(double %88, double %117, double %109)
%119 = getelementptr inbounds double, double* %53, i64 13
%120 = load double, double* %119
%121 = getelementptr inbounds double, double* %53, i64 19
%122 = load double, double* %121
%123 = getelementptr inbounds double, double* %53, i64 27
%124 = load double, double* %123
%125 = tail call double @llvm.fmuladd.f64(double %88, double %124, double %122)
%126 = tail call double @llvm.fmuladd.f64(double %88, double %125, double %120)
%127 = getelementptr inbounds double, double* %53, i64 18
%128 = load double, double* %127
%129 = getelementptr inbounds double, double* %53, i64 26
%130 = load double, double* %129
%131 = tail call double @llvm.fmuladd.f64(double %88, double %130, double %128)
%132 = getelementptr inbounds double, double* %53, i64 25
%133 = load double, double* %132
%134 = tail call double @llvm.fmuladd.f64(double %67, double %133, double %131)
%135 = tail call double @llvm.fmuladd.f64(double %67, double %134, double %126)
%136 = tail call double @llvm.fmuladd.f64(double %67, double %135, double %118)
%137 = tail call double @llvm.fmuladd.f64(double %67, double %136, double %107)
%138 = fmul double %67, %137
%139 = fmul double %88, %138
%140 = tail call double @llvm.fmuladd.f64(double %88, double %93, double %139)
%141 = fadd double %73, %140
store double %141, double* %5
%142 = getelementptr inbounds i32, i32* %1, i64 7
%143 = load i32, i32* %142
%144 = icmp eq i32 %143, 0
br i1 %144, label %159, label %145
145: ; preds = %75
%146 = fmul double %88, %88
%147 = tail call double @llvm.fmuladd.f64(double %67, double %67, double %146)
%148 = tail call double @sqrt(double %147)
%149 = getelementptr inbounds double, double* %53, i64 3
%150 = load double, double* %149
%151 = getelementptr inbounds double, double* %53, i64 11
%152 = load double, double* %151
%153 = getelementptr inbounds double, double* %53, i64 23
%154 = load double, double* %153
%155 = tail call double @llvm.fmuladd.f64(double %147, double %154, double %152)
%156 = tail call double @llvm.fmuladd.f64(double %147, double %155, double %150)
%157 = load double, double* %5
%158 = tail call double @llvm.fmuladd.f64(double %148, double %156, double %157)
store double %158, double* %5
br label %159
159: ; preds = %75, %145, %52, %6
%160 = phi i32 [ 1, %6 ], [ 0, %52 ], [ 0, %145 ], [ 0, %75 ]
ret i32 %160
}