user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<linreg>:
  endbr64
  pxor   %xmm5,%xmm5
  sub    $0x18,%rsp
  pxor   %xmm3,%xmm3
  movsd  (%rsi),%xmm1
  cvtsi2sd %edx,%xmm5
  movq   $0x0,(%r8)
  test   %edx,%edx
  jle    L104
  mov    %edx,%r10d
  xor    %eax,%eax
  movapd %xmm3,%xmm7
  movslq %edx,%rdx
  movapd %xmm3,%xmm2
  movapd %xmm3,%xmm4
  nopl   0x0(%rax,%rax,1)
L61:
  movsd  (%rsi,%rax,8),%xmm0
  addsd  (%rdi,%rax,8),%xmm4
  add    $0x1,%rax
  movapd %xmm0,%xmm6
  addsd  %xmm0,%xmm2
  maxsd  %xmm7,%xmm0
  minsd  %xmm1,%xmm6
  movapd %xmm0,%xmm7
  movapd %xmm6,%xmm1
  cmp    %rdx,%rax
  jne    L61
  movapd %xmm2,%xmm6
  movapd %xmm4,%xmm8
  mov    0x28(%rsp),%rax
  movapd %xmm3,%xmm7
  divsd  %xmm5,%xmm6
  divsd  %xmm5,%xmm8
  movsd  %xmm6,(%rax)
  mov    0x20(%rsp),%rax
  movsd  %xmm1,(%r9)
  movsd  %xmm0,(%rax)
  movsd  (%r8),%xmm1
  xor    %eax,%eax
  nop
L60:
  movsd  (%rdi,%rax,8),%xmm0
  subsd  %xmm8,%xmm0
  movapd %xmm0,%xmm9
  mulsd  %xmm0,%xmm9
  mulsd  (%rsi,%rax,8),%xmm0
  add    $0x1,%rax
  addsd  %xmm9,%xmm7
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%r8)
  cmp    %rdx,%rax
  jne    L60
  divsd  %xmm7,%xmm1
  movsd  %xmm1,(%r8)
  mulsd  %xmm4,%xmm1
  subsd  %xmm1,%xmm2
  divsd  %xmm5,%xmm2
  movsd  %xmm2,(%rcx)
  cmp    $0x1,%r10d
  je     L20
  mov    %r10d,%edx
  movapd %xmm8,%xmm10
  movapd %xmm6,%xmm9
  xor    %eax,%eax
  unpcklpd %xmm10,%xmm10
  shr    %edx
  unpcklpd %xmm9,%xmm9
  movapd %xmm3,%xmm4
  shl    $0x4,%rdx
  movapd %xmm3,%xmm7
  movapd %xmm3,%xmm5
  xchg   %ax,%ax
L35:
  movupd (%rsi,%rax,1),%xmm0
  movupd (%rdi,%rax,1),%xmm1
  add    $0x10,%rax
  subpd  %xmm9,%xmm0
  subpd  %xmm10,%xmm1
  movapd %xmm0,%xmm2
  mulpd  %xmm1,%xmm2
  mulpd  %xmm1,%xmm1
  mulpd  %xmm0,%xmm0
  addsd  %xmm2,%xmm5
  unpckhpd %xmm2,%xmm2
  addsd  %xmm2,%xmm5
  movapd %xmm1,%xmm2
  unpckhpd %xmm1,%xmm1
  addsd  %xmm7,%xmm2
  movapd %xmm1,%xmm7
  movapd %xmm0,%xmm1
  addsd  %xmm4,%xmm1
  unpckhpd %xmm0,%xmm0
  movapd %xmm0,%xmm4
  addsd  %xmm2,%xmm7
  addsd  %xmm1,%xmm4
  cmp    %rax,%rdx
  jne    L35
  mov    %r10d,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%r10d
  je     L31
L14:
  cltq
  movsd  (%rsi,%rax,8),%xmm1
  movsd  (%rdi,%rax,8),%xmm2
  subsd  %xmm6,%xmm1
  subsd  %xmm8,%xmm2
  movapd %xmm1,%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm1
  mulsd  %xmm2,%xmm2
  addsd  %xmm0,%xmm5
  addsd  %xmm1,%xmm4
  addsd  %xmm2,%xmm7
L31:
  ucomisd %xmm7,%xmm3
  ja     L5
L15:
  sqrtsd %xmm7,%xmm7
L74:
  ucomisd %xmm4,%xmm3
  ja     L26
  sqrtsd %xmm4,%xmm4
L16:
  mulsd  %xmm4,%xmm7
  mov    0x30(%rsp),%rax
  divsd  %xmm7,%xmm5
  movsd  %xmm5,(%rax)
  add    $0x18,%rsp
  ret
L104:
  movapd %xmm3,%xmm0
  mov    0x28(%rsp),%rax
  movapd %xmm3,%xmm4
  movapd %xmm3,%xmm7
  divsd  %xmm5,%xmm0
  movsd  %xmm0,(%rax)
  mov    0x20(%rsp),%rax
  movsd  %xmm1,(%r9)
  movapd %xmm3,%xmm1
  movq   $0x0,(%rax)
  movsd  (%r8),%xmm0
  divsd  %xmm3,%xmm0
  movsd  %xmm0,(%r8)
  mulsd  %xmm3,%xmm0
  subsd  %xmm0,%xmm1
  divsd  %xmm5,%xmm1
  movapd %xmm3,%xmm5
  movsd  %xmm1,(%rcx)
  jmp    L15
L20:
  movapd %xmm3,%xmm4
  movapd %xmm3,%xmm7
  movapd %xmm3,%xmm5
  xor    %eax,%eax
  jmp    L14
L5:
  movapd %xmm7,%xmm0
  movsd  %xmm5,0x8(%rsp)
  movsd  %xmm4,(%rsp)
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm5
  movsd  (%rsp),%xmm4
  pxor   %xmm3,%xmm3
  movapd %xmm0,%xmm7
  jmp    L74
L26:
  movapd %xmm4,%xmm0
  movsd  %xmm5,0x8(%rsp)
  movsd  %xmm7,(%rsp)
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm5
  movsd  (%rsp),%xmm7
  movapd %xmm0,%xmm4
  jmp    L16
```

assistant: ```c
void linreg(double *x, double *y, int nitems, double *a, double *b, double *minp, double *maxp, double *meanp, double *r) {
  double sx = 0.0;
  double sy = 0.0;
  double st2 = 0.0;
  double min = y[0];
  double max = 0.0;
  double ss, meanx, meany, t;
  double errx, erry, prodsum, sqerrx, sqerry;
  int i;
  *b = 0.0;
  for (i = 0; i < nitems; i++) {
    sx += x[i];
    sy += y[i];
    if (y[i] < min)
      min = y[i];
    if (y[i] > max)
      max = y[i];
  }
  ss = nitems;
  meanx = sx / ss;
  meany = *meanp = sy / ss;
  *minp = min;
  *maxp = max;
  for (i = 0; i < nitems; i++) {
    t = x[i] - meanx;
    st2 += t * t;
    *b += t * y[i];
  }
  *b /= st2;
  *a = (sy - sx * (*b)) / ss;
  prodsum = 0.0;
  sqerrx = 0.0;
  sqerry = 0.0;
  for (i = 0; i < nitems; i++) {
    errx = x[i] - meanx;
    erry = y[i] - meany;
    prodsum += errx * erry;
    sqerrx += errx * errx;
    sqerry += erry * erry;
  }
  *r = prodsum / (sqrt(sqerrx) * sqrt(sqerry));
}
```