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

```asm
<linetrend>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%r12
  mov    %edx,%r13d
  mov    %rcx,%rbp
  test   %edx,%edx
  jle    L72
  lea    0x1(%rdx),%edx
  mov    $0x1,%eax
  pxor   %xmm1,%xmm1
  movss  %xmm1,0x4(%rsp)
  movss  %xmm1,0x8(%rsp)
  movss  %xmm1,(%rsp)
L39:
  movss  (%rbx,%rax,4),%xmm0
  movss  (%rsp),%xmm7
  addss  %xmm0,%xmm7
  movss  %xmm7,(%rsp)
  mulss  %xmm0,%xmm0
  addss  0x4(%rsp),%xmm0
  movss  %xmm0,0x4(%rsp)
  movss  (%r12,%rax,4),%xmm0
  movss  0x8(%rsp),%xmm6
  addss  %xmm0,%xmm6
  movss  %xmm6,0x8(%rsp)
  mulss  %xmm0,%xmm0
  addss  %xmm0,%xmm1
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L39
L5:
  pxor   %xmm3,%xmm3
  cvtsi2ss %r13d,%xmm3
  movss  %xmm3,0x18(%rsp)
  movss  (%rsp),%xmm4
  divss  %xmm3,%xmm4
  movss  %xmm4,0xc(%rsp)
  movss  0x8(%rsp),%xmm7
  divss  %xmm3,%xmm7
  movss  %xmm7,0x10(%rsp)
  movss  0x4(%rsp),%xmm0
  divss  %xmm3,%xmm0
  movaps %xmm4,%xmm2
  mulss  %xmm4,%xmm2
  subss  %xmm2,%xmm0
  divss  %xmm3,%xmm1
  movaps %xmm7,%xmm2
  mulss  %xmm7,%xmm2
  subss  %xmm2,%xmm1
  movaps %xmm1,%xmm2
  movss  %xmm1,0x14(%rsp)
  pxor   %xmm1,%xmm1
  comiss %xmm0,%xmm1
  jae    L2
  comiss %xmm2,%xmm1
  jb     L59
L2:
  pxor   %xmm2,%xmm2
  movaps %xmm2,%xmm3
  movaps %xmm2,%xmm0
L89:
  movss  %xmm2,0x4(%rbp)
  movss  %xmm3,0x8(%rbp)
  movss  %xmm0,0xc(%rbp)
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L72:
  pxor   %xmm1,%xmm1
  movss  %xmm1,0x4(%rsp)
  movss  %xmm1,0x8(%rsp)
  movss  %xmm1,(%rsp)
  jmp    L5
L59:
  ucomiss %xmm0,%xmm1
  ja     L63
  sqrtss %xmm0,%xmm0
  movss  %xmm0,0x1c(%rsp)
L86:
  pxor   %xmm0,%xmm0
  movss  0x14(%rsp),%xmm2
  ucomiss %xmm2,%xmm0
  ja     L33
  sqrtss %xmm2,%xmm2
  movaps %xmm2,%xmm6
L4:
  test   %r13d,%r13d
  jle    L123
  lea    0x1(%r13),%edx
  mov    $0x1,%eax
  pxor   %xmm3,%xmm3
  movaps %xmm3,%xmm2
L22:
  movss  (%rbx,%rax,4),%xmm0
  movss  (%r12,%rax,4),%xmm4
  movaps %xmm0,%xmm1
  subss  0xc(%rsp),%xmm1
  movaps %xmm4,%xmm5
  subss  0x10(%rsp),%xmm5
  mulss  %xmm5,%xmm1
  addss  %xmm1,%xmm2
  mulss  %xmm4,%xmm0
  addss  %xmm0,%xmm3
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L22
L46:
  sub    $0x1,%r13d
  pxor   %xmm0,%xmm0
  cvtsi2ss %r13d,%xmm0
  divss  %xmm0,%xmm2
  movss  0x1c(%rsp),%xmm0
  mulss  %xmm6,%xmm0
  divss  %xmm0,%xmm2
  movss  0x8(%rsp),%xmm0
  movss  (%rsp),%xmm4
  mulss  %xmm4,%xmm0
  movss  0x18(%rsp),%xmm6
  divss  %xmm6,%xmm0
  subss  %xmm0,%xmm3
  movaps %xmm4,%xmm0
  mulss  %xmm4,%xmm0
  divss  %xmm6,%xmm0
  movss  0x4(%rsp),%xmm1
  subss  %xmm0,%xmm1
  divss  %xmm1,%xmm3
  movss  0xc(%rsp),%xmm1
  mulss  %xmm3,%xmm1
  movss  0x10(%rsp),%xmm0
  subss  %xmm1,%xmm0
  jmp    L89
L63:
  call   <sqrtf@plt>
  movss  %xmm0,0x1c(%rsp)
  jmp    L86
L33:
  movss  0x14(%rsp),%xmm0
  call   <sqrtf@plt>
  movaps %xmm0,%xmm6
  jmp    L4
L123:
  pxor   %xmm3,%xmm3
  movaps %xmm3,%xmm2
  jmp    L46
```

assistant: ```c
void linetrend(float *x, float *y, int n, float *res) {
  float mean_x, mean_y, std_x, std_y;
  float sum_x, sum_y, sum_x2, sum_y2;
  float cov, sum_xy;
  int i;
  sum_x = 0;
  sum_y = 0;
  sum_x2 = 0;
  sum_y2 = 0;
  for (i = 1; i <= n; i++) {
    sum_x += x[i];
    sum_x2 += (x[i] * x[i]);
    sum_y += y[i];
    sum_y2 += (y[i] * y[i]);
  }
  mean_x = sum_x / n;
  mean_y = sum_y / n;
  std_x = sum_x2 / n - mean_x * mean_x;
  std_y = sum_y2 / n - mean_y * mean_y;
  if ((std_x <= 0) | (std_y <= 0)) {
    res[1] = 0;
    res[2] = 0;
    res[3] = 0;
  } else {
    std_x = sqrt(std_x);
    std_y = sqrt(std_y);
    cov = 0;
    sum_xy = 0;
    for (i = 1; i <= n; i++) {
      cov += (x[i] - mean_x) * (y[i] - mean_y);
      sum_xy += (x[i] * y[i]);
    }
    cov = cov / (n - 1);
    res[1] = cov / (std_x * std_y);
    res[2] = (sum_xy - sum_x * sum_y / n) / (sum_x2 - sum_x * sum_x / n);
    res[3] = mean_y - (res[2]) * mean_x;
  }
}
```