user: What is the c source code of the assembly code below?

```asm
<svd_lsq>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r13
  mov    %esi,%ebx
  mov    %esi,(%rsp)
  mov    %edx,%r15d
  mov    %rcx,%rbp
  mov    %r8,0x10(%rsp)
  mov    %r9,%r14
  mov    %esi,%edi
  lea    (%rsi,%rdx,1),%esi
  mov    $0x8,%edx
  call   <alloc2d@plt>
  mov    %rax,%rcx
  mov    %rax,0x8(%rsp)
  mov    %ebx,%edi
  movslq %ebx,%rax
  lea    (%rcx,%rax,8),%rbx
  cmp    %r15d,%edi
  mov    %edi,%r11d
  cmovg  %r15d,%r11d
  mov    %r11d,%r12d
  mov    0x10(%rsp),%rsi
  test   %rsi,%rsi
  je     L31
  test   %r15d,%r15d
  jle    L286
  mov    %rbp,%r9
  mov    %rsi,%r8
  mov    %r13,%rcx
  lea    -0x1(%r15),%eax
  lea    0x8(%rsi,%rax,8),%r10
  mov    %edi,%r11d
  lea    -0x1(%rdi),%eax
  lea    0x8(,%rax,8),%rdi
  jmp    L205
L154:
  add    $0x8,%r9
  add    $0x8,%r8
  add    $0x8,%rcx
  cmp    %r10,%r8
  je     L161
L205:
  mov    %r8,%rsi
  movsd  (%r9),%xmm0
  divsd  (%r8),%xmm0
  movsd  %xmm0,(%r9)
  test   %r11d,%r11d
  jle    L154
  mov    $0x0,%eax
L14:
  mov    %rax,%rdx
  add    (%rcx),%rdx
  movsd  (%rdx),%xmm0
  divsd  (%rsi),%xmm0
  movsd  %xmm0,(%rdx)
  add    $0x8,%rax
  cmp    %rdi,%rax
  jne    L14
  jmp    L154
L232:
  mov    %rax,%rdx
  add    (%rcx),%rdx
  movsd  (%rdx),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,(%rdx)
L110:
  add    $0x8,%rax
  cmp    %rsi,%rax
  je     L296
L41:
  movsd  (%r14,%rax,1),%xmm0
  ucomisd %xmm2,%xmm0
  jp     L232
  ucomisd %xmm3,%xmm0
  jne    L232
  mov    (%rcx),%rdx
  movq   $0x0,(%rdx,%rax,1)
  jmp    L110
L296:
  add    $0x8,%rcx
  cmp    %rdi,%rcx
  je     L281
L282:
  mov    $0x0,%eax
  test   %r12d,%r12d
  jg     L41
  jmp    L296
L281:
  mov    (%rsp),%r14d
  shl    $0x3,%r14
  mov    $0x0,%r10d
  mov    %r15d,%r11d
  mov    %rbp,(%rsp)
  mov    0x8(%rsp),%rbp
L90:
  mov    0x0(%rbp,%r10,1),%rdi
  test   %r15d,%r15d
  jle    L213
  mov    $0x0,%r9d
L0:
  mov    0x0(%r13,%r9,8),%rcx
  mov    %r10,%rdx
  add    (%rbx,%r9,8),%rdx
  test   %r12d,%r12d
  jle    L102
  mov    $0x0,%eax
L152:
  movsd  (%rdi,%rax,8),%xmm0
  mulsd  (%rcx,%rax,8),%xmm0
  addsd  (%rdx),%xmm0
  movsd  %xmm0,(%rdx)
  mov    %rax,%rsi
  add    $0x1,%rax
  cmp    %r8,%rsi
  jne    L152
L102:
  add    $0x1,%r9
  cmp    %r9,%r11
  jne    L0
L213:
  add    $0x8,%r10
  cmp    %r14,%r10
  jne    L90
  mov    (%rsp),%rbp
  mov    0x60(%rsp),%rdi
  mov    0x18(%rsp),%rcx
  lea    0x8(%rdi,%rcx,1),%r9
  mov    $0x0,%esi
  mov    %r15d,%r8d
L239:
  mov    %rdi,%rdx
  movq   $0x0,(%rdi)
  test   %r15d,%r15d
  jle    L157
  mov    $0x0,%eax
L264:
  mov    (%rbx,%rax,8),%rcx
  movsd  (%rcx,%rsi,1),%xmm0
  mulsd  0x0(%rbp,%rax,8),%xmm0
  addsd  (%rdx),%xmm0
  movsd  %xmm0,(%rdx)
  add    $0x1,%rax
  cmp    %r8,%rax
  jne    L264
L157:
  add    $0x8,%rdi
  add    $0x8,%rsi
  cmp    %r9,%rdi
  jne    L239
  cmpq   $0x0,0x10(%rsp)
  je     L193
  test   %r15d,%r15d
  jle    L193
L82:
  mov    %r15d,%r15d
  mov    $0x0,%eax
  mov    0x10(%rsp),%rdx
L81:
  movsd  0x0(%rbp,%rax,8),%xmm0
  mulsd  (%rdx,%rax,8),%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %r15,%rax
  jne    L81
L193:
  mov    0x8(%rsp),%rdi
  call   <free2d@plt>
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L286:
  mov    0x8(%rsp),%r8
  mov    %r14,%rcx
  mov    %r15d,%edx
  mov    (%rsp),%esi
  mov    %r13,%rdi
  call   <svd@plt>
  cmpl   $0x0,(%rsp)
  jg     L214
  jmp    L193
L161:
  mov    0x8(%rsp),%r8
  mov    %r14,%rcx
  mov    %r15d,%edx
  mov    (%rsp),%esi
  mov    %r13,%rdi
  call   <svd@plt>
  cmpl   $0x0,(%rsp)
  jle    L82
L214:
  mov    0x8(%rsp),%rdi
  mov    %rdi,%rcx
  mov    (%rsp),%eax
  lea    -0x1(%rax),%eax
  shl    $0x3,%rax
  mov    %rax,0x18(%rsp)
  lea    0x8(%rdi,%rax,1),%rdi
  lea    -0x1(%r12),%r8d
  lea    0x8(,%r8,8),%rsi
  pxor   %xmm2,%xmm2
  movapd %xmm2,%xmm3
  jmp    L282
L31:
  mov    0x8(%rsp),%r8
  mov    %r14,%rcx
  mov    %r15d,%edx
  mov    (%rsp),%esi
  mov    %r13,%rdi
  call   <svd@plt>
  cmpl   $0x0,(%rsp)
  jg     L214
  jmp    L193
```

assistant: ```c
void svd_lsq(double **A, int ni, int nj, double *z, double *std, double *w, double *sol) {
  double **V = alloc2d(ni, ni + nj, sizeof(double));
  double **B = &V[ni];
  int nijmin = (ni < nj) ? ni : nj;
  int i, j, ii;
  if (std != NULL)
    for (j = 0; j < nj; ++j) {
      z[j] /= std[j];
      for (i = 0; i < ni; ++i)
        A[j][i] /= std[j];
    }
  svd(A, ni, nj, w, V);
  for (j = 0; j < ni; ++j)
    for (i = 0; i < nijmin; ++i)
      if (w[i] != 0.0)
        V[j][i] /= w[i];
      else
        V[j][i] = 0.0;
  for (i = 0; i < ni; ++i) {
    double *v = V[i];
    for (j = 0; j < nj; ++j) {
      double *a = A[j];
      double *b = &B[j][i];
      for (ii = 0; ii < nijmin; ++ii)
        *b += v[ii] * a[ii];
    }
  }
  for (i = 0; i < ni; ++i) {
    sol[i] = 0.0;
    for (j = 0; j < nj; ++j)
      sol[i] += B[j][i] * z[j];
  }
  if (std != NULL)
    for (j = 0; j < nj; ++j)
      z[j] *= std[j];
  free2d(V);
}
```