double pcapack_mahalanobis(int n, const double *restrict x,
                           const double *restrict y,
                           const double *restrict covinv) {
  int i;
  double mahal = 0.;
  double *work1, *work2;
  work1 = malloc(n * sizeof(*work1));
  work2 = malloc(n * sizeof(*work2));

  for (i = 0; i < n; i++)
    work1[i] = x[i] - y[i];
  dgemv_(&(char){'n'}, &n, &n, &(double){1.}, covinv, &n, work1, &(int){1},
         &(double){0.}, work2, &(int){1});
#pragma omp parallel for simd default(shared) reduction(+ : mahal)
  for (i = 0; i < n; i++)
    mahal += work1[i] * work2[i];
  mahal = sqrt(mahal);
  free(work1);
  free(work2);
  return mahal;
}


x86 assembly (clang, -O0):
<pcapack_mahalanobis>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x90,%rsp
mov    %edi,-0x14(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movslq -0x14(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x48(%rbp)
movslq -0x14(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11cf <pcapack_mahalanobis+0x8f>
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    118e <pcapack_mahalanobis+0x4e>
movb   $0x6e,-0x51(%rbp)
movsd  0xe25(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x30(%rbp),%r8
mov    -0x48(%rbp),%r14
movl   $0x1,-0x64(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x50(%rbp),%r10
movl   $0x1,-0x74(%rbp)
lea    -0x51(%rbp),%rdi
lea    -0x14(%rbp),%r9
lea    -0x60(%rbp),%rcx
lea    -0x64(%rbp),%rbx
lea    -0x70(%rbp),%r11
lea    -0x74(%rbp),%rax
mov    %r9,%rsi
mov    %r9,%rdx
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
mov    $0x0,%al
call   1050 <dgemv_@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    128c <pcapack_mahalanobis+0x14c>
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1246 <pcapack_mahalanobis+0x106>
movsd  -0x40(%rbp),%xmm0
call   1060 <sqrt@plt>
movsd  %xmm0,-0x40(%rbp)
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
movsd  -0x40(%rbp),%xmm0
add    $0x90,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<pcapack_mahalanobis>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rcx,0x10(%rsp)
mov    %rdx,%r12
mov    %rsi,%r13
mov    %edi,%r15d
mov    %edi,0xc(%rsp)
movslq %edi,%rax
mov    %rax,0x20(%rsp)
lea    0x0(,%rax,8),%rbp
mov    %rbp,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rbp,%rdi
call   1040 <malloc@plt>
mov    %rax,%r14
cmpl   $0x0,0x20(%rsp)
jle    129b <pcapack_mahalanobis+0x15b>
mov    %r15d,%eax
cmp    $0x4,%r15d
jae    11a1 <pcapack_mahalanobis+0x61>
xor    %ecx,%ecx
jmp    1280 <pcapack_mahalanobis+0x140>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rdx
mov    %rdx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
test   %rdx,%rdx
je     13f3 <pcapack_mahalanobis+0x2b3>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movupd 0x0(%r13,%rdx,8),%xmm0
movupd 0x10(%r13,%rdx,8),%xmm1
movupd (%r12,%rdx,8),%xmm2
subpd  %xmm2,%xmm0
movupd 0x10(%r12,%rdx,8),%xmm2
subpd  %xmm2,%xmm1
movupd %xmm0,(%rbx,%rdx,8)
movupd %xmm1,0x10(%rbx,%rdx,8)
movupd 0x20(%r13,%rdx,8),%xmm0
movupd 0x30(%r13,%rdx,8),%xmm1
movupd 0x20(%r12,%rdx,8),%xmm2
subpd  %xmm2,%xmm0
movupd 0x30(%r12,%rdx,8),%xmm2
subpd  %xmm2,%xmm1
movupd %xmm0,0x20(%rbx,%rdx,8)
movupd %xmm1,0x30(%rbx,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rdi
jne    11d0 <pcapack_mahalanobis+0x90>
test   $0x1,%sil
je     126c <pcapack_mahalanobis+0x12c>
movupd 0x0(%r13,%rdx,8),%xmm0
movupd 0x10(%r13,%rdx,8),%xmm1
movupd (%r12,%rdx,8),%xmm2
subpd  %xmm2,%xmm0
movupd 0x10(%r12,%rdx,8),%xmm2
subpd  %xmm2,%xmm1
movupd %xmm0,(%rbx,%rdx,8)
movupd %xmm1,0x10(%rbx,%rdx,8)
cmp    %rax,%rcx
je     129b <pcapack_mahalanobis+0x15b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rcx,8),%xmm0
subsd  (%r12,%rcx,8),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1280 <pcapack_mahalanobis+0x140>
movb   $0x6e,0xb(%rsp)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x30(%rsp)
movl   $0x1,0x1c(%rsp)
movq   $0x0,0x28(%rsp)
movl   $0x1,0x18(%rsp)
sub    $0x8,%rsp
lea    0x20(%rsp),%rbp
lea    0x30(%rsp),%r10
lea    0x24(%rsp),%r11
lea    0x13(%rsp),%rdi
lea    0x38(%rsp),%rcx
lea    0x14(%rsp),%rdx
mov    %rdx,%rsi
mov    0x18(%rsp),%r8
mov    %rdx,%r9
mov    $0x0,%eax
push   %rbp
push   %r14
push   %r10
push   %r11
push   %rbx
call   1050 <dgemv_@plt>
add    $0x30,%rsp
mov    0xc(%rsp),%ecx
xorpd  %xmm1,%xmm1
xorpd  %xmm0,%xmm0
test   %ecx,%ecx
jle    13b7 <pcapack_mahalanobis+0x277>
lea    -0x1(%rcx),%rdx
mov    %ecx,%eax
and    $0x3,%eax
cmp    $0x3,%rdx
jae    1336 <pcapack_mahalanobis+0x1f6>
xorpd  %xmm0,%xmm0
xor    %edx,%edx
jmp    138b <pcapack_mahalanobis+0x24b>
and    $0xfffffffc,%ecx
xorpd  %xmm0,%xmm0
xor    %edx,%edx
nop
movsd  (%rbx,%rdx,8),%xmm2
movsd  0x8(%rbx,%rdx,8),%xmm3
mulsd  (%r14,%rdx,8),%xmm2
mulsd  0x8(%r14,%rdx,8),%xmm3
addsd  %xmm0,%xmm2
movsd  0x10(%rbx,%rdx,8),%xmm4
mulsd  0x10(%r14,%rdx,8),%xmm4
addsd  %xmm2,%xmm3
movsd  0x18(%rbx,%rdx,8),%xmm0
mulsd  0x18(%r14,%rdx,8),%xmm0
addsd  %xmm3,%xmm4
addsd  %xmm4,%xmm0
add    $0x4,%rdx
cmp    %rdx,%rcx
jne    1340 <pcapack_mahalanobis+0x200>
test   %rax,%rax
je     13b7 <pcapack_mahalanobis+0x277>
lea    (%r14,%rdx,8),%rcx
lea    (%rbx,%rdx,8),%rdx
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
movsd  (%rdx,%rsi,8),%xmm2
mulsd  (%rcx,%rsi,8),%xmm2
addsd  %xmm2,%xmm0
add    $0x1,%rsi
cmp    %rsi,%rax
jne    13a0 <pcapack_mahalanobis+0x260>
ucomisd %xmm1,%xmm0
jb     13c3 <pcapack_mahalanobis+0x283>
sqrtsd %xmm0,%xmm0
jmp    13c8 <pcapack_mahalanobis+0x288>
call   1060 <sqrt@plt>
movsd  %xmm0,0x10(%rsp)
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
movsd  0x10(%rsp),%xmm0
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edx,%edx
test   $0x1,%sil
jne    123e <pcapack_mahalanobis+0xfe>
jmp    126c <pcapack_mahalanobis+0x12c>

LLVM IR (-O0):
define double @pcapack_mahalanobis(i32 %0, double* noalias %1, double* noalias %2, double* noalias %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca double
%11 = alloca double*
%12 = alloca double*
%13 = alloca i8
%14 = alloca double
%15 = alloca i32
%16 = alloca double
%17 = alloca i32
store i32 %0, i32* %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
store double 0.000000e+00, double* %10
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = mul i64 %19, 8
%21 = call i8* @malloc(i64 %20)
%22 = bitcast i8* %21 to double*
store double* %22, double** %11
%23 = load i32, i32* %5
%24 = sext i32 %23 to i64
%25 = mul i64 %24, 8
%26 = call i8* @malloc(i64 %25)
%27 = bitcast i8* %26 to double*
store double* %27, double** %12
store i32 0, i32* %9
br label %28
28: ; preds = %48, %4
%29 = load i32, i32* %9
%30 = load i32, i32* %5
%31 = icmp slt i32 %29, %30
br i1 %31, label %32, label %51
32: ; preds = %28
%33 = load double*, double** %6
%34 = load i32, i32* %9
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds double, double* %33, i64 %35
%37 = load double, double* %36
%38 = load double*, double** %7
%39 = load i32, i32* %9
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds double, double* %38, i64 %40
%42 = load double, double* %41
%43 = fsub double %37, %42
%44 = load double*, double** %11
%45 = load i32, i32* %9
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds double, double* %44, i64 %46
store double %43, double* %47
br label %48
48: ; preds = %32
%49 = load i32, i32* %9
%50 = add nsw i32 %49, 1
store i32 %50, i32* %9
br label %28
51: ; preds = %28
store i8 110, i8* %13
store double 1.000000e+00, double* %14
%52 = load double*, double** %8
%53 = load double*, double** %11
store i32 1, i32* %15
store double 0.000000e+00, double* %16
%54 = load double*, double** %12
store i32 1, i32* %17
%55 = call i32 (i8*, i32*, i32*, double*, double*, i32*, double*, i32*, double*, double*, i32*, ...) bitcast (i32 (...)* @dgemv_ to i32 (i8*, i32*, i32*, double*, double*, i32*, double*, i32*, double*, double*, i32*, ...)*)(i8* %13, i32* %5, i32* %5, double* %14, double* %52, i32* %5, double* %53, i32* %15, double* %16, double* %54, i32* %17)
store i32 0, i32* %9
br label %56
56: ; preds = %73, %51
%57 = load i32, i32* %9
%58 = load i32, i32* %5
%59 = icmp slt i32 %57, %58
br i1 %59, label %60, label %76
60: ; preds = %56
%61 = load double*, double** %11
%62 = load i32, i32* %9
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds double, double* %61, i64 %63
%65 = load double, double* %64
%66 = load double*, double** %12
%67 = load i32, i32* %9
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %66, i64 %68
%70 = load double, double* %69
%71 = load double, double* %10
%72 = call double @llvm.fmuladd.f64(double %65, double %70, double %71)
store double %72, double* %10
br label %73
73: ; preds = %60
%74 = load i32, i32* %9
%75 = add nsw i32 %74, 1
store i32 %75, i32* %9
br label %56
76: ; preds = %56
%77 = load double, double* %10
%78 = call double @sqrt(double %77)
store double %78, double* %10
%79 = load double*, double** %11
%80 = bitcast double* %79 to i8*
%81 = load double*, double** %12
%82 = bitcast double* %81 to i8*
%83 = load double, double* %10
ret double %83
}

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