user: 请从给定的汇编指令推导出C源代码：

```asm
<regress_ch>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%r12
  mov    %rdx,0x28(%rsp)
  mov    %ecx,%ebp
  mov    %r8d,%r14d
  lea    0x1(%r8),%r13d
  mov    %r13d,%ecx
  mov    $0x1,%edx
  mov    %r13d,%esi
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <matrix@plt>
  mov    %eax,%r15d
  cltq
  mov    %rax,0x8(%rsp)
  mov    %r13d,%esi
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <vector@plt>
  cltq
  mov    %rax,0x10(%rsp)
  mov    %r13d,%esi
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <vector@plt>
  mov    %eax,0x4(%rsp)
  cltq
  mov    %rax,0x18(%rsp)
  test   %r13d,%r13d
  jle    L102
  movslq %r15d,%r11
  add    $0x8,%r11
  mov    %r14d,%r15d
  add    $0x2,%r15
  lea    -0x1(%rbp),%eax
  mov    %rax,0x20(%rsp)
  lea    0x10(%rbx,%rax,8),%rdi
  mov    $0x4,%esi
  mov    $0x1,%r10d
  add    $0x1,%r14d
  jmp    L58
L111:
  mov    (%rax),%rdx
  movss  (%rdx,%rcx,1),%xmm0
  mulss  (%rdx,%rsi,1),%xmm0
  addss  %xmm0,%xmm1
  add    $0x8,%rax
  cmp    %rdi,%rax
  jne    L111
L60:
  mov    (%r9),%rax
  movss  %xmm1,(%rax,%rcx,1)
  add    $0x4,%rcx
  cmp    %r8,%rcx
  je     L72
L90:
  lea    0x8(%rbx),%rax
  pxor   %xmm1,%xmm1
  test   %ebp,%ebp
  jg     L111
  jmp    L60
L72:
  add    $0x1,%r10
  add    $0x8,%r11
  add    $0x4,%rsi
  cmp    %r15,%r10
  je     L138
L58:
  cmp    %r10d,%r13d
  jl     L72
  mov    %r11,%r9
  mov    %r14d,%eax
  sub    %r10d,%eax
  lea    0x1(%r10,%rax,1),%r8
  shl    $0x2,%r8
  mov    %rsi,%rcx
  jmp    L90
L138:
  shl    $0x2,%r15
  mov    $0x4,%ecx
  mov    0x20(%rsp),%rsi
  add    $0x2,%rsi
  movslq 0x4(%rsp),%rdi
  jmp    L18
L15:
  mov    (%rbx,%rax,8),%rdx
  movss  (%rdx,%rcx,1),%xmm0
  mulss  (%r12,%rax,4),%xmm0
  addss  %xmm0,%xmm1
  add    $0x1,%rax
  cmp    %rax,%rsi
  jne    L15
L130:
  movss  %xmm1,(%rdi,%rcx,1)
  add    $0x4,%rcx
  cmp    %r15,%rcx
  je     L102
L18:
  mov    $0x1,%eax
  pxor   %xmm1,%xmm1
  test   %ebp,%ebp
  jg     L15
  jmp    L130
L102:
  mov    0x10(%rsp),%r14
  mov    %r14,%rdx
  mov    %r13d,%esi
  mov    0x8(%rsp),%rbx
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <choldc_e@plt>
  mov    0x28(%rsp),%r8
  mov    0x18(%rsp),%r15
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %r13d,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <cholsl@plt>
  mov    %r13d,%r8d
  mov    $0x1,%ecx
  mov    %r13d,%edx
  mov    $0x1,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <free_matrix@plt>
  mov    %r13d,%edx
  mov    $0x1,%esi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <free_vector@plt>
  mov    %r13d,%edx
  mov    $0x1,%esi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <free_vector@plt>
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void regress_ch(data, b, a, ndata, ivar) float **data, *a, *b;
int ndata, ivar;
{
  int p = ivar + 1, j, i, k;
  float **d, sum, *diag, *atb;
  d = matrix(1, p, 1, p);
  diag = vector(1, p);
  atb = vector(1, p);
  for (i = 1; i <= p; i++)
    for (j = i; j <= p; j++) {
      sum = 0;
      for (k = 1; k <= ndata; k++)
        sum += data[k][j] * data[k][i];
      d[i][j] = sum;
    }
  for (i = 1; i <= p; i++) {
    sum = 0;
    for (k = 1; k <= ndata; k++)
      sum += data[k][i] * b[k];
    atb[i] = sum;
  }
  choldc_e(d, p, diag);
  cholsl(d, p, diag, atb, a);
  free_matrix(d, 1, p, 1, p);
  free_vector(diag, 1, p);
  free_vector(atb, 1, p);
}
```