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

```asm
<solve>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    %r9d,-0x4c(%rbp)
  mov    0x10(%rbp),%eax
  lea    0x1(%rax),%edi
  mov    -0x38(%rbp),%r8
  mov    -0x30(%rbp),%rcx
  mov    0x18(%rbp),%edx
  mov    -0x4c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  mov    %r8,%r9
  mov    %rcx,%r8
  mov    %edx,%ecx
  mov    %edi,%edx
  mov    %rax,%rdi
  call   <dsvd@plt>
  mov    0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  D2(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L83
  mov    $0x1,%eax
  jmp    L81
L83:
  mov    0x18(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L32
L39:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x18(%rbp)
  jmp    L104
L30:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x18(%rbp),%eax
  imul   0x18(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x18(%rbp)
L104:
  mov    -0x18(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L30
  addl   $0x1,-0x1c(%rbp)
L32:
  mov    -0x1c(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jle    L39
  movl   $0x0,-0x14(%rbp)
  jmp    L26
L27:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x14(%rbp)
L26:
  mov    -0x14(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jle    L27
  movl   $0x0,-0x10(%rbp)
  jmp    L89
L12:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x0,-0xc(%rbp)
  jmp    L1
L82:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    0x10(%rbp),%eax
  add    $0x1,%eax
  imul   -0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0xc(%rbp)
L1:
  mov    -0xc(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jle    L82
  addl   $0x1,-0x10(%rbp)
L89:
  mov    -0x10(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jle    L12
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
L81:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D2
type_guessed: byte[8]

tool: {"D2": [0xfc,0xa9,0xf1,0xd2,0x4d,0x62,0x50,0x3f]}

assistant: ```c
int solve(double *As, double *w, double *v, const double *b, double *coeff, int wd, int s, int S) {
  dsvd(As, wd, s + 1, S, w, v);
  if (w[s] < 1e-3)
    return 1;
  double *tmp = malloc(S * sizeof(double));
  for (int i = 0; i <= s; i++) {
    tmp[i] = 0.0;
    for (int j = 0; j < wd; j++)
      tmp[i] += As[j * S + i] * b[j];
  }
  for (int i = 0; i <= s; i++)
    tmp[i] /= w[i];
  for (int j = 0; j <= s; j++) {
    coeff[j] = 0.0;
    for (int i = 0; i <= s; i++)
      coeff[j] += v[j * (s + 1) + i] * tmp[i];
  }
  free(tmp);
  return 0;
}
```