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

```asm
<wwghts>:
  endbr64
  push   %r15
  pxor   %xmm4,%xmm4
  push   %r14
  cvtss2sd %xmm0,%xmm4
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x98,%rsp
  movsd  D121(%rip),%xmm7
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  movsd  %xmm4,0x10(%rsp)
  divsd  %xmm4,%xmm7
  movsd  %xmm7,0x18(%rsp)
  test   %esi,%esi
  jle    L41
  movslq %esi,%rdx
  lea    0x4(%rdi),%r15
  xor    %esi,%esi
  shl    $0x2,%rdx
  mov    %r15,%rdi
  call   <memset@plt>
  lea    0x30(%rsp),%rdi
  mov    $0x4,%esi
  pxor   %xmm0,%xmm0
  call   *%rbp
  cmp    $0x3,%ebx
  jle    L21
  movsd  0x18(%rsp),%xmm7
  lea    -0x3(%rbx),%eax
  lea    -0x2(%rbx),%r14d
  pxor   %xmm12,%xmm12
  mov    %eax,0x24(%rsp)
  mov    $0x1,%r13d
  lea    0x60(%rsp),%r12
  sub    $0x1,%ebx
  movapd %xmm7,%xmm4
  mulsd  %xmm7,%xmm4
  movsd  %xmm4,0x28(%rsp)
  jmp    L97
  nopl   (%rax)
L92:
  movapd %xmm12,%xmm0
  mov    %r12,%rdi
  add    $0x1,%r13d
  add    $0x4,%r15
  movsd  %xmm3,0x8(%rsp)
  mov    $0x4,%esi
  movsd  %xmm12,(%rsp)
  call   *%rbp
  movsd  0x70(%rsp),%xmm7
  subsd  0x40(%rsp),%xmm7
  movsd  0x28(%rsp),%xmm3
  movsd  0x18(%rsp),%xmm5
  movsd  0x80(%rsp),%xmm14
  movsd  0x78(%rsp),%xmm6
  mulsd  %xmm5,%xmm7
  subsd  0x48(%rsp),%xmm6
  mov    D45(%rip),%rax
  mulsd  %xmm3,%xmm5
  movapd %xmm14,%xmm4
  subsd  0x50(%rsp),%xmm4
  movsd  D87(%rip),%xmm13
  movq   %rax,%xmm8
  movsd  0x68(%rsp),%xmm10
  movsd  D21(%rip),%xmm15
  mulsd  %xmm3,%xmm6
  movsd  0x8(%rsp),%xmm3
  mov    D35(%rip),%rax
  movapd %xmm10,%xmm9
  subsd  0x38(%rsp),%xmm9
  addsd  %xmm3,%xmm13
  movapd %xmm3,%xmm0
  movapd %xmm3,%xmm1
  mulsd  %xmm5,%xmm4
  addsd  %xmm8,%xmm1
  movq   %rax,%xmm11
  movsd  D121(%rip),%xmm5
  mulsd  %xmm8,%xmm0
  addsd  %xmm3,%xmm5
  movapd %xmm5,%xmm2
  mulsd  %xmm13,%xmm2
  addsd  %xmm0,%xmm15
  mulsd  %xmm3,%xmm15
  addsd  D51(%rip),%xmm15
  mulsd  %xmm1,%xmm2
  mulsd  %xmm7,%xmm15
  mulsd  %xmm9,%xmm2
  subsd  %xmm15,%xmm2
  movapd %xmm13,%xmm15
  mulsd  %xmm8,%xmm15
  mulsd  %xmm6,%xmm15
  addsd  %xmm15,%xmm2
  pxor   %xmm15,%xmm15
  cvtss2sd -0x4(%r15),%xmm15
  subsd  %xmm4,%xmm2
  divsd  %xmm11,%xmm2
  addsd  %xmm15,%xmm2
  movsd  D178(%rip),%xmm15
  addsd  %xmm0,%xmm15
  cvtsd2ss %xmm2,%xmm2
  movss  %xmm2,-0x4(%r15)
  movapd %xmm3,%xmm2
  xorpd  D31(%rip),%xmm2
  mulsd  %xmm13,%xmm2
  mulsd  %xmm3,%xmm15
  mulsd  %xmm1,%xmm2
  addsd  %xmm11,%xmm15
  mulsd  %xmm7,%xmm15
  mulsd  %xmm9,%xmm2
  addsd  %xmm15,%xmm2
  movsd  D136(%rip),%xmm15
  addsd  %xmm0,%xmm15
  mulsd  %xmm6,%xmm15
  subsd  %xmm15,%xmm2
  pxor   %xmm15,%xmm15
  cvtss2sd (%r15),%xmm15
  addsd  %xmm4,%xmm2
  mulsd  D40(%rip),%xmm2
  addsd  %xmm15,%xmm2
  movsd  D99(%rip),%xmm15
  addsd  %xmm0,%xmm15
  cvtsd2ss %xmm2,%xmm2
  movss  %xmm2,(%r15)
  movapd %xmm5,%xmm2
  mulsd  %xmm3,%xmm2
  mulsd  %xmm3,%xmm15
  mulsd  %xmm8,%xmm5
  mulsd  %xmm2,%xmm1
  addsd  %xmm8,%xmm15
  mulsd  %xmm6,%xmm5
  mulsd  %xmm7,%xmm15
  mulsd  %xmm9,%xmm1
  subsd  %xmm15,%xmm1
  movsd  D101(%rip),%xmm15
  addsd  %xmm0,%xmm15
  addsd  %xmm11,%xmm0
  mulsd  %xmm3,%xmm0
  addsd  D87(%rip),%xmm0
  mulsd  %xmm6,%xmm15
  mulsd  %xmm0,%xmm7
  movapd %xmm2,%xmm0
  xorpd  D31(%rip),%xmm0
  mulsd  %xmm13,%xmm0
  addsd  %xmm15,%xmm1
  pxor   %xmm15,%xmm15
  cvtss2sd 0x4(%r15),%xmm15
  subsd  %xmm4,%xmm1
  mulsd  D40(%rip),%xmm1
  mulsd  %xmm9,%xmm0
  addsd  %xmm15,%xmm1
  addsd  %xmm7,%xmm0
  cvtsd2ss %xmm1,%xmm1
  movss  %xmm1,0x4(%r15)
  pxor   %xmm1,%xmm1
  cvtss2sd 0x8(%r15),%xmm1
  movsd  0x78(%rsp),%xmm6
  movsd  (%rsp),%xmm12
  movsd  %xmm10,0x38(%rsp)
  subsd  %xmm5,%xmm0
  movsd  %xmm14,0x50(%rsp)
  movsd  %xmm6,0x48(%rsp)
  addsd  %xmm4,%xmm0
  movsd  0x70(%rsp),%xmm4
  movsd  %xmm4,0x40(%rsp)
  divsd  %xmm11,%xmm0
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x8(%r15)
  cmp    %r14d,%r13d
  je     L95
L97:
  lea    -0x1(%r13),%edx
  pxor   %xmm3,%xmm3
  addsd  0x10(%rsp),%xmm12
  cvtsi2sd %edx,%xmm3
  cmp    %r13d,0x24(%rsp)
  jne    L92
  pxor   %xmm12,%xmm12
  cvtsi2sd %ebx,%xmm12
  mulsd  0x10(%rsp),%xmm12
  jmp    L92
L41:
  lea    0x30(%rsp),%rdi
  mov    $0x4,%esi
  pxor   %xmm0,%xmm0
  call   *%rdx
L21:
  cmp    $0x3,%ebx
  je     L85
  cmp    $0x2,%ebx
  je     L66
L95:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L37
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L85:
  movsd  0x10(%rsp),%xmm0
  lea    0x60(%rsp),%rdi
  mov    $0x3,%esi
  addsd  %xmm0,%xmm0
  call   *%rbp
  movsd  0x18(%rsp),%xmm7
  movapd 0x70(%rsp),%xmm0
  subpd  0x40(%rsp),%xmm0
  movsd  0x78(%rsp),%xmm2
  movapd %xmm7,%xmm5
  movapd %xmm7,%xmm1
  movapd D87(%rip),%xmm3
  mulsd  %xmm7,%xmm5
  unpcklpd %xmm5,%xmm1
  mulpd  %xmm1,%xmm0
  movapd %xmm2,%xmm1
  subsd  0x48(%rsp),%xmm1
  movsd  0x68(%rsp),%xmm2
  subsd  0x38(%rsp),%xmm2
  mulsd  %xmm5,%xmm1
  movsd  D27(%rip),%xmm5
  mulsd  %xmm0,%xmm5
  movapd %xmm0,%xmm4
  mulpd  %xmm0,%xmm3
  unpckhpd %xmm0,%xmm0
  subsd  %xmm4,%xmm0
  mulsd  D40(%rip),%xmm0
  subsd  %xmm5,%xmm2
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0xc(%r12)
  unpcklpd %xmm2,%xmm1
  movapd %xmm3,%xmm2
  addpd  %xmm1,%xmm2
  subpd  %xmm1,%xmm3
  movapd %xmm2,%xmm1
  shufpd $0x1,%xmm3,%xmm1
  cvtpd2ps %xmm1,%xmm1
  movlps %xmm1,0x4(%r12)
  jmp    L95
L66:
  movsd  0x10(%rsp),%xmm0
  lea    0x60(%rsp),%rdi
  mov    $0x2,%esi
  call   *%rbp
  movsd  0x70(%rsp),%xmm1
  subsd  0x40(%rsp),%xmm1
  pxor   %xmm2,%xmm2
  mulsd  0x18(%rsp),%xmm1
  movsd  0x68(%rsp),%xmm0
  subsd  0x38(%rsp),%xmm0
  cvtsd2ss %xmm1,%xmm2
  cvtss2sd %xmm2,%xmm2
  subsd  %xmm2,%xmm0
  unpcklpd %xmm1,%xmm0
  cvtpd2ps %xmm0,%xmm0
  movlps %xmm0,0x4(%r12)
  jmp    L95
L37:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D121
type_guessed: f64
name: read_data
arguments: data_tag: D45
type_guessed: f64
name: read_data
arguments: data_tag: D87
type_guessed: f64[2]
name: read_data
arguments: data_tag: D21
type_guessed: f64
name: read_data
arguments: data_tag: D35
type_guessed: f64
name: read_data
arguments: data_tag: D51
type_guessed: f64
name: read_data
arguments: data_tag: D178
type_guessed: f64
name: read_data
arguments: data_tag: D31
type_guessed: f32[4]
name: read_data
arguments: data_tag: D136
type_guessed: f64
name: read_data
arguments: data_tag: D40
type_guessed: f64
name: read_data
arguments: data_tag: D99
type_guessed: f64
name: read_data
arguments: data_tag: D101
type_guessed: f64
name: read_data
arguments: data_tag: D27
type_guessed: f64

tool: D121: 1

tool: D45: 3

tool: {"D87": [2.0,0.5]}

tool: D21: 12

tool: D35: 6

tool: D51: 11

tool: D178: 10

tool: {"D31": [0.0,-0.0,0.0,0.0]}

tool: D136: 5

tool: D40: 0.5

tool: D99: 8

tool: D101: 4

tool: D27: 1.5

assistant: ```c
void wwghts(float wghts[], int n, float h, void (*kermom)(double[], double, int)) {
  int j, k;
  double wold[5], wnew[5], w[5], hh, hi, c, fac, a, b;
  hh = h;
  hi = 1.0 / hh;
  for (j = 1; j <= n; j++)
    wghts[j] = 0.0;
  (*kermom)(wold, 0.0, 4);
  if (n >= 4) {
    b = 0.0;
    for (j = 1; j <= n - 3; j++) {
      c = j - 1;
      a = b;
      b = a + hh;
      if (j == n - 3)
        b = (n - 1) * hh;
      (*kermom)(wnew, b, 4);
      for (fac = 1.0, k = 1; k <= 4; k++, fac *= hi)
        w[k] = (wnew[k] - wold[k]) * fac;
      wghts[j] += (((c + 1.0) * (c + 2.0) * (c + 3.0) * w[1] - (11.0 + c * (12.0 + c * 3.0)) * w[2] + 3.0 * (c + 2.0) * w[3] - w[4]) / 6.0);
      wghts[j + 1] += ((-c * (c + 2.0) * (c + 3.0) * w[1] + (6.0 + c * (10.0 + c * 3.0)) * w[2] - (3.0 * c + 5.0) * w[3] + w[4]) * 0.5);
      wghts[j + 2] += ((c * (c + 1.0) * (c + 3.0) * w[1] - (3.0 + c * (8.0 + c * 3.0)) * w[2] + (3.0 * c + 4.0) * w[3] - w[4]) * 0.5);
      wghts[j + 3] += ((-c * (c + 1.0) * (c + 2.0) * w[1] + (2.0 + c * (6.0 + c * 3.0)) * w[2] - 3.0 * (c + 1.0) * w[3] + w[4]) / 6.0);
      for (k = 1; k <= 4; k++)
        wold[k] = wnew[k];
    }
  } else if (n == 3) {
    (*kermom)(wnew, hh + hh, 3);
    w[1] = wnew[1] - wold[1];
    w[2] = hi * (wnew[2] - wold[2]);
    w[3] = hi * hi * (wnew[3] - wold[3]);
    wghts[1] = w[1] - 1.5 * w[2] + 0.5 * w[3];
    wghts[2] = 2.0 * w[2] - w[3];
    wghts[3] = 0.5 * (w[3] - w[2]);
  } else if (n == 2) {
    (*kermom)(wnew, hh, 2);
    wghts[1] = wnew[1] - wold[1] - (wghts[2] = hi * (wnew[2] - wold[2]));
  }
}
```