user: What would the C source look like for the assembly code provided here:

```asm
<c_fit_ols>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %rdx,-0x68(%rbp)
  mov    %rcx,-0x70(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movl   $0x0,-0x4c(%rbp)
  jmp    L2
L1:
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x48(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x40(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x38(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  addl   $0x1,-0x4c(%rbp)
L2:
  cmpl   $0x9,-0x4c(%rbp)
  jle    L1
  mov    -0x68(%rbp),%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x48(%rbp),%xmm0
  divsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x40(%rbp),%xmm0
  divsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x38(%rbp),%xmm0
  divsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x30(%rbp),%xmm0
  divsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x20(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  -0x18(%rbp),%xmm2
  movsd  -0x8(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  -0x20(%rbp),%xmm0
  movapd %xmm0,%xmm3
  mulsd  %xmm0,%xmm3
  movsd  -0x10(%rbp),%xmm0
  movapd %xmm0,%xmm2
  subsd  %xmm3,%xmm2
  mov    -0x70(%rbp),%rax
  add    $0x8,%rax
  divsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x70(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x20(%rbp),%xmm1
  movsd  -0x18(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  mov    -0x70(%rbp),%rax
  movsd  %xmm0,(%rax)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void c_fit_ols(double *x, double *y, int *n, double *beta) {
  double sumx = 0;
  double sumy = 0;
  double sumx2 = 0;
  double sumxy = 0;
  for (int i = 0; i < 10; i++) {
    sumx += x[i];
    sumy += y[i];
    sumx2 += x[i] * x[i];
    sumxy += x[i] * y[i];
  }
  double nd;
  nd = (double)*n;
  double xbar = sumx / nd;
  double ybar = sumy / nd;
  double x2bar = sumx2 / nd;
  double xybar = sumxy / nd;
  beta[1] = (xybar - xbar * ybar) / (x2bar - xbar * xbar);
  beta[0] = ybar - beta[1] * xbar;
}
```