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

```asm
<solve>:
  endbr64
  push   %r15
  push   %r14
  mov    %r9d,%r14d
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  mov    %rdx,%rbx
  mov    %rbx,%r9
  sub    $0x38,%rsp
  mov    0x70(%rsp),%r10d
  mov    0x78(%rsp),%r15d
  mov    %rcx,0x18(%rsp)
  mov    %r8,0x28(%rsp)
  mov    %rsi,%r8
  mov    %r14d,%esi
  lea    0x1(%r10),%edx
  mov    %r15d,%ecx
  mov    %edx,0x14(%rsp)
  call   <dsvd@plt>
  movslq 0x70(%rsp),%r8
  movsd  D6(%rip),%xmm0
  comisd 0x0(%r13,%r8,8),%xmm0
  lea    0x0(,%r8,8),%rax
  mov    %r8,0x8(%rsp)
  mov    %rax,0x20(%rsp)
  mov    $0x1,%eax
  jbe    L117
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L117:
  lea    0x0(,%r15,8),%edi
  movslq %r15d,%rbp
  call   <malloc@plt>
  mov    0x70(%rsp),%r10d
  mov    0x8(%rsp),%r8
  mov    0x14(%rsp),%edx
  mov    0x18(%rsp),%r11
  mov    %rax,%rdi
  test   %r10d,%r10d
  js     L115
  mov    %rax,%rsi
  lea    -0x1(%r14),%eax
  shl    $0x3,%rbp
  xor    %r15d,%r15d
  lea    0x8(%r11,%rax,8),%r9
  pxor   %xmm2,%xmm2
  cs nopw 0x0(%rax,%rax,1)
L9:
  movq   $0x0,(%rsi)
  mov    %r11,%rax
  mov    %r12,%rcx
  movapd %xmm2,%xmm1
  test   %r14d,%r14d
  jle    L35
  cs nopw 0x0(%rax,%rax,1)
L67:
  movsd  (%rcx),%xmm0
  mulsd  (%rax),%xmm0
  add    $0x8,%rax
  add    %rbp,%rcx
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi)
  cmp    %r9,%rax
  jne    L67
L35:
  lea    0x1(%r15),%eax
  add    $0x8,%rsi
  add    $0x8,%r12
  cmp    %r15d,%r10d
  je     L66
  mov    %eax,%r15d
  jmp    L9
  nopw   0x0(%rax,%rax,1)
L66:
  lea    0x8(%r13),%rax
  cmp    %rax,%rdi
  je     L114
  test   %r10d,%r10d
  je     L114
  mov    %edx,%ecx
  xor    %eax,%eax
  shr    %ecx
  shl    $0x4,%rcx
  nopl   0x0(%rax,%rax,1)
L89:
  movupd (%rdi,%rax,1),%xmm0
  movupd 0x0(%r13,%rax,1),%xmm3
  divpd  %xmm3,%xmm0
  movups %xmm0,(%rdi,%rax,1)
  add    $0x10,%rax
  cmp    %rcx,%rax
  jne    L89
  mov    %edx,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%edx
  je     L104
  cltq
  lea    (%rdi,%rax,8),%rdx
  movsd  (%rdx),%xmm0
  divsd  0x0(%r13,%rax,8),%xmm0
  movsd  %xmm0,(%rdx)
L104:
  mov    0x28(%rsp),%rdx
  mov    0x20(%rsp),%rsi
  lea    0x8(,%r8,8),%rcx
  add    $0x8,%rsi
  lea    0x8(%rdx,%r8,8),%r9
  nopw   0x0(%rax,%rax,1)
L96:
  movq   $0x0,(%rdx)
  xor    %eax,%eax
  movapd %xmm2,%xmm1
  nopl   (%rax)
L33:
  movsd  (%rbx,%rax,1),%xmm0
  mulsd  (%rdi,%rax,1),%xmm0
  add    $0x8,%rax
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%rdx)
  cmp    %rcx,%rax
  jne    L33
  add    $0x8,%rdx
  add    %rsi,%rbx
  cmp    %rdx,%r9
  jne    L96
L115:
  call   <free@plt>
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L114:
  lea    0x8(,%r8,8),%rdx
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L62:
  movsd  (%rdi,%rax,1),%xmm0
  divsd  0x0(%r13,%rax,1),%xmm0
  movsd  %xmm0,(%rdi,%rax,1)
  add    $0x8,%rax
  cmp    %rax,%rdx
  jne    L62
  jmp    L104
```

tool_calls: name: read_data
arguments: data_label: D6
type_infered: byte[8]

tool: {"D6": [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;
}
```