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

```asm
<coreGTRCATSECONDARY>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %esi,%edi
  shl    $0x7,%edi
  sub    $0x1f8,%rsp
  mov    0x230(%rsp),%rax
  mov    %rdx,0x30(%rsp)
  lea    0x60(%rsp),%r15
  lea    0xe0(%rsp),%r14
  mov    %rcx,0x10(%rsp)
  mov    %rax,0x58(%rsp)
  mov    0x238(%rsp),%rax
  mov    %r8d,0x8(%rsp)
  mov    %rax,0x18(%rsp)
  mov    0x240(%rsp),%rax
  mov    %r9,0x50(%rsp)
  mov    %rax,0x20(%rsp)
  movsd  %xmm0,(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x1e8(%rsp)
  xor    %eax,%eax
  call   <rax_malloc@plt>
  movsd  (%rsp),%xmm0
  lea    0x160(%rsp),%rdx
  mov    %rax,0x48(%rsp)
  mov    $0x8,%eax
  nopl   0x0(%rax)
L84:
  movsd  -0x8(%rbx,%rax,1),%xmm1
  movapd %xmm1,%xmm2
  movsd  %xmm1,(%r14,%rax,1)
  mulsd  %xmm1,%xmm2
  mulsd  %xmm0,%xmm1
  movsd  %xmm2,(%r15,%rax,1)
  movsd  %xmm1,(%rdx,%rax,1)
  add    $0x8,%rax
  cmp    $0x80,%rax
  jne    L84
  test   %r12d,%r12d
  jle    L31
  mov    0x48(%rsp),%rbx
  mov    %r14,0x28(%rsp)
  xor    %r13d,%r13d
  shl    $0x4,%r12d
  lea    0x168(%rsp),%rax
  mov    0x30(%rsp),%rbp
  mov    %r12d,(%rsp)
  lea    0x80(%rdx),%r12
  mov    %r15,0x38(%rsp)
  sub    %rdx,%rbx
  mov    %rax,%r15
  nopl   0x0(%rax,%rax,1)
L77:
  mov    %r15,%r14
  nopl   0x0(%rax,%rax,1)
L81:
  movsd  (%r14),%xmm0
  mulsd  0x0(%rbp),%xmm0
  call   <exp@plt>
  movsd  %xmm0,(%rbx,%r14,1)
  add    $0x8,%r14
  cmp    %r14,%r12
  jne    L81
  add    $0x8,%rbp
  add    $0x10,%r13d
  sub    $0xffffffffffffff80,%rbx
  cmp    %r13d,(%rsp)
  jne    L77
  mov    0x28(%rsp),%r14
  mov    0x38(%rsp),%r15
L31:
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  jle    L85
  mov    0x10(%rsp),%r12
  sub    $0x1,%eax
  mov    0x20(%rsp),%rbp
  pxor   %xmm5,%xmm5
  mov    0x18(%rsp),%r13
  movapd %xmm5,%xmm6
  movapd %xmm5,%xmm7
  lea    0x4(%r12,%rax,4),%rax
  mov    %r12,%rdi
  mov    %rbp,%r12
  mov    %rax,0x38(%rsp)
  mov    0x48(%rsp),%rax
  mov    %r13,%rbp
  mov    %rdi,%r13
  lea    0x80(%rax),%rbx
  mov    %rbx,0x40(%rsp)
  mov    %rax,%rbx
  cs nopw 0x0(%rax,%rax,1)
L20:
  pxor   %xmm1,%xmm1
  movslq 0x0(%r13),%rax
  mov    0x30(%rsp),%rcx
  movapd %xmm5,%xmm2
  cvtsi2sdl (%r12),%xmm1
  mov    0x40(%rsp),%rsi
  movsd  0x0(%rbp),%xmm3
  movsd  (%rcx,%rax,8),%xmm0
  mov    %rax,%rdx
  shl    $0x4,%edx
  movslq %edx,%rdx
  movapd %xmm1,%xmm8
  lea    0x8(%rbx,%rdx,8),%rax
  shl    $0x3,%rdx
  mulsd  %xmm0,%xmm8
  lea    (%rsi,%rdx,1),%rdi
  neg    %rdx
  mulsd  %xmm0,%xmm0
  sub    %rbx,%rdx
  lea    0x0(%rbp,%rdx,1),%rsi
  lea    (%r14,%rdx,1),%rcx
  add    %r15,%rdx
  mulsd  %xmm1,%xmm0
  movapd %xmm5,%xmm1
  movsd  %xmm0,(%rsp)
  nopl   0x0(%rax)
L7:
  movsd  (%rax),%xmm0
  mulsd  (%rsi,%rax,1),%xmm0
  movsd  (%rcx,%rax,1),%xmm4
  addsd  %xmm0,%xmm3
  mulsd  %xmm0,%xmm4
  mulsd  (%rdx,%rax,1),%xmm0
  add    $0x8,%rax
  addsd  %xmm4,%xmm1
  addsd  %xmm0,%xmm2
  cmp    %rax,%rdi
  jne    L7
  movapd %xmm3,%xmm0
  movsd  %xmm2,0x28(%rsp)
  add    $0x4,%r13
  add    $0x4,%r12
  movsd  %xmm1,0x20(%rsp)
  sub    $0xffffffffffffff80,%rbp
  movsd  %xmm6,0x18(%rsp)
  movsd  %xmm7,0x10(%rsp)
  movsd  %xmm8,0x8(%rsp)
  call   <FABS@plt>
  movsd  0x20(%rsp),%xmm1
  cmp    %r13,0x38(%rsp)
  pxor   %xmm5,%xmm5
  movapd %xmm0,%xmm3
  movsd  D9(%rip),%xmm0
  movsd  0x8(%rsp),%xmm8
  movsd  0x28(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm7
  divsd  %xmm3,%xmm0
  movapd %xmm8,%xmm3
  movsd  0x18(%rsp),%xmm6
  mulsd  %xmm0,%xmm1
  mulsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm3
  mulsd  %xmm1,%xmm1
  addsd  %xmm3,%xmm7
  subsd  %xmm1,%xmm0
  mulsd  (%rsp),%xmm0
  addsd  %xmm0,%xmm6
  jne    L20
L46:
  mov    0x50(%rsp),%rax
  movsd  %xmm7,(%rax)
  mov    0x58(%rsp),%rax
  movsd  %xmm6,(%rax)
  mov    0x1e8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L60
  mov    0x48(%rsp),%rdi
  add    $0x1f8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <rax_free@plt>
L85:
  pxor   %xmm6,%xmm6
  movapd %xmm6,%xmm7
  jmp    L46
L60:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D9
datatype: f64

tool: D9: 1

assistant: ```c
void coreGTRCATSECONDARY(double *EIGN, double lz, int numberOfCategories, double *rptr, int *cptr, int upper, volatile double *ext_dlnLdlz, volatile double *ext_d2lnLdlz2, double *sumtable, int *wgt) {
  int i, l;
  double *d1, *d_start, *sum;
  double e[16], s[16], dd[16];
  double tmp;
  double inv_Li, dlnLidlz, d2lnLidlz2;
  double dlnLdlz = 0.0;
  double d2lnLdlz2 = 0.0;
  d1 = d_start = (double *)rax_malloc(numberOfCategories * 16 * sizeof(double));
  for (l = 1; l < 16; l++) {
    e[l] = EIGN[l - 1] * EIGN[l - 1];
    s[l] = EIGN[l - 1];
    dd[l] = s[l] * lz;
  }
  for (i = 0; i < numberOfCategories; i++) {
    for (l = 1; l < 16; l++)
      d1[16 * i + l] = exp(dd[l] * rptr[i]);
  }
  for (i = 0; i < upper; i++) {
    double r = rptr[cptr[i]], wr1 = r * wgt[i], wr2 = r * r * wgt[i];
    d1 = &d_start[16 * cptr[i]];
    sum = &sumtable[16 * i];
    inv_Li = sum[0];
    dlnLidlz = 0.0;
    d2lnLidlz2 = 0.0;
    for (l = 1; l < 16; l++) {
      inv_Li += (tmp = d1[l] * sum[l]);
      dlnLidlz += tmp * s[l];
      d2lnLidlz2 += tmp * e[l];
    }
    inv_Li = 1.0 / FABS(inv_Li);
    dlnLidlz *= inv_Li;
    d2lnLidlz2 *= inv_Li;
    dlnLdlz += wr1 * dlnLidlz;
    d2lnLdlz2 += wr2 * (d2lnLidlz2 - dlnLidlz * dlnLidlz);
  }
  *ext_dlnLdlz = dlnLdlz;
  *ext_d2lnLdlz2 = d2lnLdlz2;
  rax_free(d_start);
}
```