#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 fabs(double);
double sqrt(double);
void liregression(double x[], double y[], int n, double a[], double dt[]) {
  int i;
  double ax, ay, e, f, q, u, p, umax, umin, yy;
  for (i = 0, ax = ay = 0.0; i < n; i++) {
    ax += x[i];
    ay += y[i];
  }
  ax /= n;
  ay /= n;
  for (i = 0, e = f = 0.0; i < n; i++) {
    q = x[i] - ax;
    e += q * q;
    f += q * (y[i] - ay);
  }
  a[1] = f / e;
  a[0] = ay - a[1] * ax;
  q = p = u = 0.0;
  umax = 0.0;
  umin = 1.0e+30;
  for (i = 0; i < n; i++) {
    yy = a[1] * x[i] + a[0];
    q += (y[i] - yy) * (y[i] - yy);
    p += (yy - ay) * (yy - ay);
    e = fabs(y[i] - yy);
    u += e;
    umax = e > umax ? e : umax;
    umin = e < umin ? e : umin;
  }
  u /= n;
  dt[0] = q;
  dt[1] = sqrt(q / n);
  dt[2] = p;
  dt[3] = umax;
  dt[4] = umin;
  dt[5] = u;
  return;
}


x86 assembly (clang, -O0):
<liregression>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    118d <liregression+0x7d>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1145 <liregression+0x35>
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x2c(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1240 <liregression+0x130>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
subsd  -0x40(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11ca <liregression+0xba>
movsd  -0x50(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x40(%rbp),%xmm1
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  -0x38(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xd4b(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    140f <liregression+0x2ff>
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x80(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
subsd  -0x80(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x80(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
subsd  -0x40(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x80(%rbp),%xmm0
movaps 0xca3(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x48(%rbp),%xmm0
ucomisd -0x70(%rbp),%xmm0
jbe    13a7 <liregression+0x297>
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    13b4 <liregression+0x2a4>
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    13e7 <liregression+0x2d7>
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    13f4 <liregression+0x2e4>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12c1 <liregression+0x1b1>
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x58(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x68(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x70(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x78(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x60(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x28(%rax)
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<liregression>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %r8,%r14
test   %edx,%edx
jle    113a <liregression+0x2a>
mov    %edx,%r9d
lea    -0x1(%r9),%r8
mov    %r9d,%r10d
and    $0x3,%r10d
cmp    $0x3,%r8
jae    1144 <liregression+0x34>
xorpd  %xmm0,%xmm0
xor    %ebx,%ebx
jmp    119b <liregression+0x8b>
cvtsi2sd %edx,%xmm8
jmp    1332 <liregression+0x222>
mov    %r9d,%eax
and    $0xfffffffc,%eax
xorpd  %xmm1,%xmm1
xor    %ebx,%ebx
movsd  (%rsi,%rbx,8),%xmm2
movsd  0x8(%rsi,%rbx,8),%xmm3
movsd  0x10(%rsi,%rbx,8),%xmm4
movsd  0x18(%rsi,%rbx,8),%xmm0
movhpd (%rdi,%rbx,8),%xmm2
addpd  %xmm1,%xmm2
movhpd 0x8(%rdi,%rbx,8),%xmm3
addpd  %xmm2,%xmm3
movhpd 0x10(%rdi,%rbx,8),%xmm4
movhpd 0x18(%rdi,%rbx,8),%xmm0
addpd  %xmm3,%xmm4
addpd  %xmm4,%xmm0
add    $0x4,%rbx
movapd %xmm0,%xmm1
cmp    %rbx,%rax
jne    1150 <liregression+0x40>
test   %r10,%r10
je     11c8 <liregression+0xb8>
lea    (%rsi,%rbx,8),%r11
lea    (%rdi,%rbx,8),%rbx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movsd  (%r11,%rax,8),%xmm1
movhpd (%rbx,%rax,8),%xmm1
addpd  %xmm1,%xmm0
add    $0x1,%rax
cmp    %rax,%r10
jne    11b0 <liregression+0xa0>
cvtsi2sd %edx,%xmm8
test   %edx,%edx
jle    1332 <liregression+0x222>
movapd %xmm8,%xmm2
unpcklpd %xmm8,%xmm2
divpd  %xmm2,%xmm0
test   %r8,%r8
je     13d1 <liregression+0x2c1>
mov    %r9d,%ebx
and    $0xfffffffe,%ebx
xorpd  %xmm2,%xmm2
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movsd  (%rsi,%rax,8),%xmm3
movsd  0x8(%rsi,%rax,8),%xmm4
movhpd (%rdi,%rax,8),%xmm3
subpd  %xmm0,%xmm3
movapd %xmm3,%xmm5
unpckhpd %xmm3,%xmm5
mulpd  %xmm3,%xmm5
addpd  %xmm2,%xmm5
movhpd 0x8(%rdi,%rax,8),%xmm4
subpd  %xmm0,%xmm4
movapd %xmm4,%xmm2
unpckhpd %xmm4,%xmm2
mulpd  %xmm4,%xmm2
addpd  %xmm5,%xmm2
add    $0x2,%rax
cmp    %rax,%rbx
jne    1200 <liregression+0xf0>
test   $0x1,%r9b
je     126b <liregression+0x15b>
movsd  (%rsi,%rax,8),%xmm3
movhpd (%rdi,%rax,8),%xmm3
subpd  %xmm0,%xmm3
movapd %xmm3,%xmm4
unpckhpd %xmm3,%xmm4
mulpd  %xmm3,%xmm4
addpd  %xmm4,%xmm2
movapd %xmm2,%xmm3
unpckhpd %xmm2,%xmm3
divsd  %xmm3,%xmm2
movsd  %xmm2,0x8(%rcx)
movapd %xmm0,%xmm4
unpckhpd %xmm0,%xmm4
mulsd  %xmm2,%xmm4
movapd %xmm0,%xmm10
subsd  %xmm4,%xmm10
movsd  %xmm10,(%rcx)
test   %edx,%edx
jle    133e <liregression+0x22e>
unpcklpd %xmm0,%xmm11
xorpd  %xmm6,%xmm6
xorpd  %xmm3,%xmm3
movsd  0xd6c(%rip),%xmm4
xor    %eax,%eax
movapd 0xd51(%rip),%xmm9
xorpd  %xmm12,%xmm12
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movapd %xmm6,%xmm5
movapd %xmm3,%xmm0
movapd %xmm4,%xmm1
movsd  (%rdi,%rax,8),%xmm6
mulsd  %xmm2,%xmm6
addsd  %xmm10,%xmm6
movsd  (%rsi,%rax,8),%xmm4
unpcklpd %xmm6,%xmm4
shufpd $0x2,%xmm11,%xmm6
subpd  %xmm6,%xmm4
movapd %xmm4,%xmm7
mulpd  %xmm4,%xmm7
movapd %xmm7,%xmm6
addpd  %xmm5,%xmm6
andpd  %xmm9,%xmm4
addsd  %xmm4,%xmm12
movapd %xmm4,%xmm3
maxsd  %xmm0,%xmm3
minsd  %xmm1,%xmm4
add    $0x1,%rax
cmp    %rax,%r9
jne    12d0 <liregression+0x1c0>
addpd  %xmm5,%xmm7
jmp    1353 <liregression+0x243>
movapd 0xcc6(%rip),%xmm0
movupd %xmm0,(%rcx)
xorpd  %xmm7,%xmm7
movsd  0xcd6(%rip),%xmm4
xorpd  %xmm12,%xmm12
xorpd  %xmm3,%xmm3
divsd  %xmm8,%xmm12
movlpd %xmm7,(%r14)
movapd %xmm7,%xmm0
divsd  %xmm8,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1376 <liregression+0x266>
sqrtsd %xmm0,%xmm0
jmp    13ab <liregression+0x29b>
movapd %xmm4,0x30(%rsp)
movapd %xmm12,0x20(%rsp)
movapd %xmm7,0x10(%rsp)
movapd %xmm3,(%rsp)
call   1030 <sqrt@plt>
movapd (%rsp),%xmm3
movapd 0x10(%rsp),%xmm7
movapd 0x20(%rsp),%xmm12
movapd 0x30(%rsp),%xmm4
movsd  %xmm0,0x8(%r14)
movhpd %xmm7,0x10(%r14)
movsd  %xmm3,0x18(%r14)
movsd  %xmm4,0x20(%r14)
movsd  %xmm12,0x28(%r14)
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret
xorpd  %xmm2,%xmm2
xor    %eax,%eax
test   $0x1,%r9b
jne    124d <liregression+0x13d>
jmp    126b <liregression+0x15b>

LLVM IR (-O0):
define void @liregression(double* %0, double* %1, i32 %2, double* %3, double* %4) {
%6 = alloca double*
%7 = alloca double*
%8 = alloca i32
%9 = alloca double*
%10 = alloca double*
%11 = alloca i32
%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
store double* %0, double** %6
store double* %1, double** %7
store i32 %2, i32* %8
store double* %3, double** %9
store double* %4, double** %10
store i32 0, i32* %11
store double 0.000000e+00, double* %13
store double 0.000000e+00, double* %12
br label %22
22: ; preds = %41, %5
%23 = load i32, i32* %11
%24 = load i32, i32* %8
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %44
26: ; preds = %22
%27 = load double*, double** %6
%28 = load i32, i32* %11
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds double, double* %27, i64 %29
%31 = load double, double* %30
%32 = load double, double* %12
%33 = fadd double %32, %31
store double %33, double* %12
%34 = load double*, double** %7
%35 = load i32, i32* %11
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds double, double* %34, i64 %36
%38 = load double, double* %37
%39 = load double, double* %13
%40 = fadd double %39, %38
store double %40, double* %13
br label %41
41: ; preds = %26
%42 = load i32, i32* %11
%43 = add nsw i32 %42, 1
store i32 %43, i32* %11
br label %22
44: ; preds = %22
%45 = load i32, i32* %8
%46 = sitofp i32 %45 to double
%47 = load double, double* %12
%48 = fdiv double %47, %46
store double %48, double* %12
%49 = load i32, i32* %8
%50 = sitofp i32 %49 to double
%51 = load double, double* %13
%52 = fdiv double %51, %50
store double %52, double* %13
store i32 0, i32* %11
store double 0.000000e+00, double* %15
store double 0.000000e+00, double* %14
br label %53
53: ; preds = %79, %44
%54 = load i32, i32* %11
%55 = load i32, i32* %8
%56 = icmp slt i32 %54, %55
br i1 %56, label %57, label %82
57: ; preds = %53
%58 = load double*, double** %6
%59 = load i32, i32* %11
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds double, double* %58, i64 %60
%62 = load double, double* %61
%63 = load double, double* %12
%64 = fsub double %62, %63
store double %64, double* %16
%65 = load double, double* %16
%66 = load double, double* %16
%67 = load double, double* %14
%68 = call double @llvm.fmuladd.f64(double %65, double %66, double %67)
store double %68, double* %14
%69 = load double, double* %16
%70 = load double*, double** %7
%71 = load i32, i32* %11
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds double, double* %70, i64 %72
%74 = load double, double* %73
%75 = load double, double* %13
%76 = fsub double %74, %75
%77 = load double, double* %15
%78 = call double @llvm.fmuladd.f64(double %69, double %76, double %77)
store double %78, double* %15
br label %79
79: ; preds = %57
%80 = load i32, i32* %11
%81 = add nsw i32 %80, 1
store i32 %81, i32* %11
br label %53
82: ; preds = %53
%83 = load double, double* %15
%84 = load double, double* %14
%85 = fdiv double %83, %84
%86 = load double*, double** %9
%87 = getelementptr inbounds double, double* %86, i64 1
store double %85, double* %87
%88 = load double, double* %13
%89 = load double*, double** %9
%90 = getelementptr inbounds double, double* %89, i64 1
%91 = load double, double* %90
%92 = load double, double* %12
%93 = fneg double %91
%94 = call double @llvm.fmuladd.f64(double %93, double %92, double %88)
%95 = load double*, double** %9
%96 = getelementptr inbounds double, double* %95, i64 0
store double %94, double* %96
store double 0.000000e+00, double* %17
store double 0.000000e+00, double* %18
store double 0.000000e+00, double* %16
store double 0.000000e+00, double* %19
store double 1.000000e+30, double* %20
store i32 0, i32* %11
br label %97
97: ; preds = %167, %82
%98 = load i32, i32* %11
%99 = load i32, i32* %8
%100 = icmp slt i32 %98, %99
br i1 %100, label %101, label %170
101: ; preds = %97
%102 = load double*, double** %9
%103 = getelementptr inbounds double, double* %102, i64 1
%104 = load double, double* %103
%105 = load double*, double** %6
%106 = load i32, i32* %11
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds double, double* %105, i64 %107
%109 = load double, double* %108
%110 = load double*, double** %9
%111 = getelementptr inbounds double, double* %110, i64 0
%112 = load double, double* %111
%113 = call double @llvm.fmuladd.f64(double %104, double %109, double %112)
store double %113, double* %21
%114 = load double*, double** %7
%115 = load i32, i32* %11
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds double, double* %114, i64 %116
%118 = load double, double* %117
%119 = load double, double* %21
%120 = fsub double %118, %119
%121 = load double*, double** %7
%122 = load i32, i32* %11
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds double, double* %121, i64 %123
%125 = load double, double* %124
%126 = load double, double* %21
%127 = fsub double %125, %126
%128 = load double, double* %16
%129 = call double @llvm.fmuladd.f64(double %120, double %127, double %128)
store double %129, double* %16
%130 = load double, double* %21
%131 = load double, double* %13
%132 = fsub double %130, %131
%133 = load double, double* %21
%134 = load double, double* %13
%135 = fsub double %133, %134
%136 = load double, double* %18
%137 = call double @llvm.fmuladd.f64(double %132, double %135, double %136)
store double %137, double* %18
%138 = load double*, double** %7
%139 = load i32, i32* %11
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds double, double* %138, i64 %140
%142 = load double, double* %141
%143 = load double, double* %21
%144 = fsub double %142, %143
%145 = call double @llvm.fabs.f64(double %144)
store double %145, double* %14
%146 = load double, double* %14
%147 = load double, double* %17
%148 = fadd double %147, %146
store double %148, double* %17
%149 = load double, double* %14
%150 = load double, double* %19
%151 = fcmp ogt double %149, %150
br i1 %151, label %152, label %154
152: ; preds = %101
%153 = load double, double* %14
br label %156
154: ; preds = %101
%155 = load double, double* %19
br label %156
156: ; preds = %154, %152
%157 = phi double [ %153, %152 ], [ %155, %154 ]
store double %157, double* %19
%158 = load double, double* %14
%159 = load double, double* %20
%160 = fcmp olt double %158, %159
br i1 %160, label %161, label %163
161: ; preds = %156
%162 = load double, double* %14
br label %165
163: ; preds = %156
%164 = load double, double* %20
br label %165
165: ; preds = %163, %161
%166 = phi double [ %162, %161 ], [ %164, %163 ]
store double %166, double* %20
br label %167
167: ; preds = %165
%168 = load i32, i32* %11
%169 = add nsw i32 %168, 1
store i32 %169, i32* %11
br label %97
170: ; preds = %97
%171 = load i32, i32* %8
%172 = sitofp i32 %171 to double
%173 = load double, double* %17
%174 = fdiv double %173, %172
store double %174, double* %17
%175 = load double, double* %16
%176 = load double*, double** %10
%177 = getelementptr inbounds double, double* %176, i64 0
store double %175, double* %177
%178 = load double, double* %16
%179 = load i32, i32* %8
%180 = sitofp i32 %179 to double
%181 = fdiv double %178, %180
%182 = call double @sqrt(double %181)
%183 = load double*, double** %10
%184 = getelementptr inbounds double, double* %183, i64 1
store double %182, double* %184
%185 = load double, double* %18
%186 = load double*, double** %10
%187 = getelementptr inbounds double, double* %186, i64 2
store double %185, double* %187
%188 = load double, double* %19
%189 = load double*, double** %10
%190 = getelementptr inbounds double, double* %189, i64 3
store double %188, double* %190
%191 = load double, double* %20
%192 = load double*, double** %10
%193 = getelementptr inbounds double, double* %192, i64 4
store double %191, double* %193
%194 = load double, double* %17
%195 = load double*, double** %10
%196 = getelementptr inbounds double, double* %195, i64 5
store double %194, double* %196
ret void
}

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