#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 */
double sqrt(double);
double mahalanobis_distance(const double *u, const double *v,
                            const double *covinv, double *dimbuf1,
                            double *dimbuf2, int n) {
  int i, j;
  double s;
  const double *covrow = covinv;
  for (i = 0; i < n; i++) {
    dimbuf1[i] = u[i] - v[i];
  }
  for (i = 0; i < n; i++) {
    covrow = covinv + (i * n);
    s = 0.0;
    for (j = 0; j < n; j++) {
      s += dimbuf1[j] * covrow[j];
    }
    dimbuf2[i] = s;
  }
  s = 0.0;
  for (i = 0; i < n; i++) {
    s += dimbuf1[i] * dimbuf2[i];
  }
  return sqrt(s);
}


x86 assembly (clang, -O0):
<mahalanobis_distance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1180 <mahalanobis_distance+0x70>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    113f <mahalanobis_distance+0x2f>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1221 <mahalanobis_distance+0x111>
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1201 <mahalanobis_distance+0xf1>
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%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    11bb <mahalanobis_distance+0xab>
movsd  -0x40(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1187 <mahalanobis_distance+0x77>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1276 <mahalanobis_distance+0x166>
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1230 <mahalanobis_distance+0x120>
movsd  -0x40(%rbp),%xmm0
call   1030 <sqrt@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mahalanobis_distance>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
xorpd  %xmm1,%xmm1
xorpd  %xmm0,%xmm0
test   %r9d,%r9d
jle    1467 <mahalanobis_distance+0x357>
mov    %r9d,%r10d
cmp    $0x4,%r9d
jae    11d3 <mahalanobis_distance+0xc3>
xor    %eax,%eax
mov    %rax,%r11
not    %r11
add    %r10,%r11
mov    %r10,%rbx
and    $0x3,%rbx
je     1169 <mahalanobis_distance+0x59>
nopl   0x0(%rax)
movsd  (%rdi,%rax,8),%xmm0
subsd  (%rsi,%rax,8),%xmm0
movsd  %xmm0,(%rcx,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rbx
jne    1150 <mahalanobis_distance+0x40>
cmp    $0x3,%r11
jb     12d7 <mahalanobis_distance+0x1c7>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rdi,%rax,8),%xmm0
subsd  (%rsi,%rax,8),%xmm0
movsd  %xmm0,(%rcx,%rax,8)
movsd  0x8(%rdi,%rax,8),%xmm0
subsd  0x8(%rsi,%rax,8),%xmm0
movsd  %xmm0,0x8(%rcx,%rax,8)
movsd  0x10(%rdi,%rax,8),%xmm0
subsd  0x10(%rsi,%rax,8),%xmm0
movsd  %xmm0,0x10(%rcx,%rax,8)
movsd  0x18(%rdi,%rax,8),%xmm0
subsd  0x18(%rsi,%rax,8),%xmm0
movsd  %xmm0,0x18(%rcx,%rax,8)
add    $0x4,%rax
cmp    %rax,%r10
jne    1180 <mahalanobis_distance+0x70>
jmp    12d7 <mahalanobis_distance+0x1c7>
lea    (%rcx,%r10,8),%rax
lea    (%rdi,%r10,8),%rbx
cmp    %rcx,%rbx
seta   %bpl
lea    (%rsi,%r10,8),%rbx
cmp    %rdi,%rax
seta   %r14b
cmp    %rcx,%rbx
seta   %bl
cmp    %rsi,%rax
seta   %r11b
xor    %eax,%eax
test   %r14b,%bpl
jne    113a <mahalanobis_distance+0x2a>
and    %r11b,%bl
jne    113a <mahalanobis_distance+0x2a>
mov    %r10d,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rbx
mov    %rbx,%r11
shr    $0x2,%r11
add    $0x1,%r11
test   %rbx,%rbx
je     148b <mahalanobis_distance+0x37b>
mov    %r11,%r14
and    $0xfffffffffffffffe,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movupd (%rdi,%rbx,8),%xmm0
movupd 0x10(%rdi,%rbx,8),%xmm2
movupd (%rsi,%rbx,8),%xmm3
subpd  %xmm3,%xmm0
movupd 0x10(%rsi,%rbx,8),%xmm3
subpd  %xmm3,%xmm2
movupd %xmm0,(%rcx,%rbx,8)
movupd %xmm2,0x10(%rcx,%rbx,8)
movupd 0x20(%rdi,%rbx,8),%xmm0
movupd 0x30(%rdi,%rbx,8),%xmm2
movupd 0x20(%rsi,%rbx,8),%xmm3
subpd  %xmm3,%xmm0
movupd 0x30(%rsi,%rbx,8),%xmm3
subpd  %xmm3,%xmm2
movupd %xmm0,0x20(%rcx,%rbx,8)
movupd %xmm2,0x30(%rcx,%rbx,8)
add    $0x8,%rbx
add    $0xfffffffffffffffe,%r14
jne    1240 <mahalanobis_distance+0x130>
test   $0x1,%r11b
je     12ce <mahalanobis_distance+0x1be>
movupd (%rdi,%rbx,8),%xmm0
movupd 0x10(%rdi,%rbx,8),%xmm2
movupd (%rsi,%rbx,8),%xmm3
subpd  %xmm3,%xmm0
movupd 0x10(%rsi,%rbx,8),%xmm3
subpd  %xmm3,%xmm2
movupd %xmm0,(%rcx,%rbx,8)
movupd %xmm2,0x10(%rcx,%rbx,8)
cmp    %r10,%rax
jne    113a <mahalanobis_distance+0x2a>
xorpd  %xmm0,%xmm0
test   %r9d,%r9d
jle    1467 <mahalanobis_distance+0x357>
lea    -0x1(%r10),%r11
mov    %r10d,%r13d
and    $0x3,%r13d
mov    %r10d,%r12d
and    $0xfffffffc,%r12d
lea    0x18(%rdx),%rax
lea    0x0(,%r10,8),%r14
xor    %r15d,%r15d
jmp    1329 <mahalanobis_distance+0x219>
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,(%r8,%r15,8)
add    $0x1,%r15
add    %r14,%rax
add    %r14,%rdx
cmp    %r10,%r15
je     13bc <mahalanobis_distance+0x2ac>
xorpd  %xmm0,%xmm0
xor    %ebx,%ebx
cmp    $0x3,%r11
jb     1387 <mahalanobis_distance+0x277>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rcx,%rbx,8),%xmm2
movsd  0x8(%rcx,%rbx,8),%xmm3
mulsd  -0x18(%rax,%rbx,8),%xmm2
mulsd  -0x10(%rax,%rbx,8),%xmm3
addsd  %xmm0,%xmm2
movsd  0x10(%rcx,%rbx,8),%xmm4
mulsd  -0x8(%rax,%rbx,8),%xmm4
addsd  %xmm2,%xmm3
movsd  0x18(%rcx,%rbx,8),%xmm0
mulsd  (%rax,%rbx,8),%xmm0
addsd  %xmm3,%xmm4
addsd  %xmm4,%xmm0
add    $0x4,%rbx
cmp    %rbx,%r12
jne    1340 <mahalanobis_distance+0x230>
test   %r13,%r13
je     1310 <mahalanobis_distance+0x200>
lea    (%rdx,%rbx,8),%rdi
lea    (%rcx,%rbx,8),%rbx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
movsd  (%rbx,%rsi,8),%xmm2
mulsd  (%rdi,%rsi,8),%xmm2
addsd  %xmm2,%xmm0
add    $0x1,%rsi
cmp    %rsi,%r13
jne    13a0 <mahalanobis_distance+0x290>
jmp    1310 <mahalanobis_distance+0x200>
test   %r9d,%r9d
jle    13d5 <mahalanobis_distance+0x2c5>
mov    %r10d,%eax
and    $0x3,%eax
cmp    $0x3,%r11
jae    13de <mahalanobis_distance+0x2ce>
xorpd  %xmm0,%xmm0
xor    %edx,%edx
jmp    143b <mahalanobis_distance+0x32b>
xorpd  %xmm0,%xmm0
jmp    1467 <mahalanobis_distance+0x357>
and    $0xfffffffc,%r10d
xorpd  %xmm0,%xmm0
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movsd  (%rcx,%rdx,8),%xmm2
movsd  0x8(%rcx,%rdx,8),%xmm3
mulsd  (%r8,%rdx,8),%xmm2
mulsd  0x8(%r8,%rdx,8),%xmm3
addsd  %xmm0,%xmm2
movsd  0x10(%rcx,%rdx,8),%xmm4
mulsd  0x10(%r8,%rdx,8),%xmm4
addsd  %xmm2,%xmm3
movsd  0x18(%rcx,%rdx,8),%xmm0
mulsd  0x18(%r8,%rdx,8),%xmm0
addsd  %xmm3,%xmm4
addsd  %xmm4,%xmm0
add    $0x4,%rdx
cmp    %rdx,%r10
jne    13f0 <mahalanobis_distance+0x2e0>
test   %rax,%rax
je     1467 <mahalanobis_distance+0x357>
lea    (%r8,%rdx,8),%rsi
lea    (%rcx,%rdx,8),%rcx
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movsd  (%rcx,%rdx,8),%xmm2
mulsd  (%rsi,%rdx,8),%xmm2
addsd  %xmm2,%xmm0
add    $0x1,%rdx
cmp    %rdx,%rax
jne    1450 <mahalanobis_distance+0x340>
ucomisd %xmm1,%xmm0
jb     147c <mahalanobis_distance+0x36c>
sqrtsd %xmm0,%xmm0
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <sqrt@plt>
xor    %ebx,%ebx
test   $0x1,%r11b
jne    12a5 <mahalanobis_distance+0x195>
jmp    12ce <mahalanobis_distance+0x1be>

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

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