user: Please show me the C implementation that matches the assembly code listed below:

```asm
<lineal>:
  endbr64
  push   %r15
  pxor   %xmm5,%xmm5
  push   %r14
  cvtsi2sd %edx,%xmm5
  push   %r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  mov    %r8,%rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    0x90(%rsp),%rax
  mov    %edx,0x34(%rsp)
  mov    %r9,0x40(%rsp)
  mov    %rax,0x48(%rsp)
  test   %edx,%edx
  jle    L7
  mov    %rdi,%rbx
  mov    %rsi,%r14
  cmp    $0x1,%edx
  je     L27
  pxor   %xmm7,%xmm7
  shr    %edx
  xor    %eax,%eax
  movapd %xmm7,%xmm2
  shl    $0x4,%rdx
  movapd %xmm7,%xmm6
  movapd %xmm7,%xmm3
  movsd  %xmm7,0x38(%rsp)
  movapd %xmm7,%xmm4
  nop
L44:
  movupd (%rbx,%rax,1),%xmm0
  movapd %xmm0,%xmm1
  movapd %xmm0,%xmm7
  addsd  %xmm2,%xmm1
  unpckhpd %xmm7,%xmm7
  movapd %xmm7,%xmm2
  addsd  %xmm1,%xmm2
  movsd  (%r14,%rax,1),%xmm1
  addsd  %xmm4,%xmm1
  movsd  0x8(%r14,%rax,1),%xmm4
  addsd  %xmm1,%xmm4
  movupd (%r14,%rax,1),%xmm1
  add    $0x10,%rax
  mulpd  %xmm0,%xmm1
  mulpd  %xmm0,%xmm0
  addsd  %xmm1,%xmm3
  unpckhpd %xmm1,%xmm1
  addsd  %xmm1,%xmm3
  movapd %xmm0,%xmm1
  unpckhpd %xmm0,%xmm0
  addsd  %xmm6,%xmm1
  movapd %xmm0,%xmm6
  addsd  %xmm1,%xmm6
  cmp    %rdx,%rax
  jne    L44
  mov    0x34(%rsp),%ecx
  mov    %ecx,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%ecx
  je     L71
L50:
  cltq
  movsd  (%rbx,%rax,8),%xmm0
  movsd  (%r14,%rax,8),%xmm1
  addsd  %xmm0,%xmm2
  addsd  %xmm1,%xmm4
  mulsd  %xmm0,%xmm1
  mulsd  %xmm0,%xmm0
  addsd  %xmm1,%xmm3
  addsd  %xmm0,%xmm6
L71:
  movapd %xmm4,%xmm0
  movapd %xmm4,%xmm7
  xor    %eax,%eax
  movsd  %xmm4,0x8(%rsp)
  mulsd  %xmm5,%xmm3
  lea    D1(%rip),%rdi
  xor    %r15d,%r15d
  mulsd  %xmm2,%xmm0
  lea    D11(%rip),%r13
  mulsd  %xmm5,%xmm6
  divsd  %xmm5,%xmm7
  subsd  %xmm0,%xmm3
  movapd %xmm2,%xmm0
  mulsd  %xmm2,%xmm0
  subsd  %xmm0,%xmm6
  divsd  %xmm5,%xmm2
  movsd  %xmm7,0x20(%rsp)
  divsd  %xmm6,%xmm3
  mulsd  %xmm3,%xmm2
  movsd  %xmm3,(%r12)
  subsd  %xmm2,%xmm7
  movsd  %xmm7,0x0(%rbp)
  call   <printf@plt>
  movslq 0x34(%rsp),%rax
  movsd  0x38(%rsp),%xmm5
  movsd  0x8(%rsp),%xmm4
  mov    %rax,0x28(%rsp)
  movapd %xmm5,%xmm6
  nopl   (%rax)
L5:
  movsd  (%rbx,%r15,8),%xmm0
  movsd  (%r12),%xmm2
  mov    %r13,%rdi
  mov    $0x4,%eax
  movsd  (%r14,%r15,8),%xmm1
  movsd  %xmm4,0x18(%rsp)
  add    $0x1,%r15
  mulsd  %xmm0,%xmm2
  movapd %xmm1,%xmm3
  subsd  %xmm2,%xmm3
  movapd %xmm1,%xmm2
  subsd  0x0(%rbp),%xmm3
  subsd  0x20(%rsp),%xmm2
  mulsd  %xmm3,%xmm3
  mulsd  %xmm2,%xmm2
  addsd  %xmm3,%xmm6
  addsd  %xmm2,%xmm5
  movsd  %xmm6,0x8(%rsp)
  movsd  %xmm5,0x10(%rsp)
  call   <printf@plt>
  cmp    %r15,0x28(%rsp)
  movsd  0x8(%rsp),%xmm6
  movsd  0x10(%rsp),%xmm5
  movsd  0x18(%rsp),%xmm4
  jne    L5
L53:
  mov    0x34(%rsp),%ebx
  pxor   %xmm1,%xmm1
  movapd %xmm6,%xmm0
  movsd  0x38(%rsp),%xmm7
  sub    $0x2,%ebx
  cvtsi2sd %ebx,%xmm1
  divsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm7
  ja     L37
  sqrtsd %xmm0,%xmm0
L56:
  mov    0x40(%rsp),%rax
  movapd %xmm6,%xmm2
  movapd %xmm5,%xmm1
  lea    D23(%rip),%rdi
  movsd  %xmm0,(%rax)
  movapd %xmm5,%xmm0
  mov    0x48(%rsp),%rax
  subsd  %xmm6,%xmm0
  divsd  %xmm5,%xmm0
  movsd  %xmm0,(%rax)
  add    $0x58,%rsp
  movapd %xmm4,%xmm0
  mov    $0x3,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <printf@plt>
  nopl   (%rax)
L7:
  pxor   %xmm4,%xmm4
  lea    D1(%rip),%rdi
  xor    %eax,%eax
  movapd %xmm4,%xmm0
  movsd  %xmm4,0x38(%rsp)
  divsd  %xmm5,%xmm0
  mulsd  %xmm4,%xmm5
  divsd  %xmm5,%xmm5
  movsd  %xmm5,(%rcx)
  mulsd  %xmm0,%xmm5
  subsd  %xmm5,%xmm0
  movsd  %xmm0,(%r8)
  call   <printf@plt>
  movsd  0x38(%rsp),%xmm5
  movapd %xmm5,%xmm4
  movapd %xmm5,%xmm6
  jmp    L53
L27:
  pxor   %xmm4,%xmm4
  xor    %eax,%eax
  movapd %xmm4,%xmm2
  movsd  %xmm4,0x38(%rsp)
  movapd %xmm4,%xmm6
  movapd %xmm4,%xmm3
  jmp    L50
L37:
  movsd  %xmm4,0x18(%rsp)
  movsd  %xmm6,0x10(%rsp)
  movsd  %xmm5,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x18(%rsp),%xmm4
  movsd  0x10(%rsp),%xmm6
  movsd  0x8(%rsp),%xmm5
  jmp    L56
```

tool_calls: name: disassemble_data
arguments: label: D1
type_guessed: string
name: disassemble_data
arguments: label: D11
type_guessed: string
name: disassemble_data
arguments: label: D23
type_guessed: string

tool: D1: 
       Xi       |        Yi       |     (Yi-Ym)^2     |      (Yi-ao-a1X1)^2   |

tool: D11: 
    %8.4lf    |     %8.4lf    |     %8.4lf      |         %8.4lf      |

tool: D23: 
      sum       |     %8.4lf    |     %8.4lf      |         %8.4lf      |

assistant: ```c
void lineal(double *X, double *Y, int n, double *a1, double *a0, double *syx, double *r2) {
  double sumx = 0, sumy = 0, sumxy = 0, vad;
  double sumx2 = 0, st = 0, sr = 0, cdd;
  double xm, ym;
  int i;
  for (i = 0; i < n; i++) {
    sumx = sumx + X[i];
    sumy = sumy + Y[i];
    sumxy = sumxy + X[i] * Y[i];
    sumx2 = sumx2 + X[i] * X[i];
  }
  xm = sumx / n;
  ym = sumy / n;
  *a1 = (n * sumxy - sumx * sumy) / (n * sumx2 - sumx * sumx);
  *a0 = ym - *a1 * xm;
  printf("\n       Xi       |        Yi       |     (Yi-Ym)^2     |      (Yi-ao-a1X1)^2   |");
  for (i = 0; i < n; i++) {
    vad = (Y[i] - *a1 * X[i] - *a0) * (Y[i] - *a1 * X[i] - *a0);
    cdd = (Y[i] - ym) * (Y[i] - ym);
    st = st + cdd;
    sr = sr + vad;
    printf("\n    %8.4lf    |     %8.4lf    |     %8.4lf      |         %8.4lf      |", X[i], Y[i], cdd, vad);
  }
  *syx = sqrt(sr / (n - 2));
  *r2 = (st - sr) / st;
  printf("\n      sum       |     %8.4lf    |     %8.4lf      |         %8.4lf      |", sumy, st, sr);
}
```