user: Converte this assembly snippet into its equivalent C code:

```asm
<coreGTRGAMMASECONDARYINVAR_7>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x498,%rsp
  mov    %rdi,-0x448(%rbp)
  mov    %rsi,-0x450(%rbp)
  mov    %rdx,-0x458(%rbp)
  mov    %ecx,-0x45c(%rbp)
  mov    %r8,-0x468(%rbp)
  mov    %r9,-0x470(%rbp)
  movsd  %xmm0,-0x480(%rbp)
  movsd  %xmm1,-0x490(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x478(%rbp)
  mov    0x18(%rbp),%rax
  mov    %rax,-0x488(%rbp)
  mov    0x20(%rbp),%rax
  mov    %rax,-0x498(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x430(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x428(%rbp)
  movsd  D24(%rip),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x490(%rbp),%xmm1
  movsd  D21(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x408(%rbp)
  movl   $0x0,-0x43c(%rbp)
  jmp    L50
L36:
  mov    -0x43c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x488(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x490(%rbp),%xmm0
  mov    -0x43c(%rbp),%eax
  cltq
  movsd  %xmm0,-0x3e0(%rbp,%rax,8)
  addl   $0x1,-0x43c(%rbp)
L50:
  cmpl   $0x6,-0x43c(%rbp)
  jle    L36
  movl   $0x0,-0x43c(%rbp)
  jmp    L137
L45:
  mov    -0x43c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x448(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x3f0(%rbp)
  movsd  -0x3f0(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x3e8(%rbp)
  movl   $0x1,-0x438(%rbp)
  jmp    L83
L79:
  mov    -0x438(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x450(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x3f0(%rbp),%xmm0
  mulsd  -0x480(%rbp),%xmm0
  movq   %xmm0,%rdx
  mov    -0x43c(%rbp),%ecx
  mov    %ecx,%eax
  shl    $0x3,%eax
  sub    %ecx,%eax
  mov    %eax,%esi
  mov    -0x438(%rbp),%eax
  add    %esi,%eax
  lea    0x0(,%rax,4),%ebx
  movq   %rdx,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  movslq %ebx,%rdx
  mov    %rax,-0x3a0(%rbp,%rdx,8)
  mov    -0x438(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x450(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x43c(%rbp),%edx
  mov    %edx,%eax
  shl    $0x3,%eax
  sub    %edx,%eax
  mov    %eax,%ecx
  mov    -0x438(%rbp),%eax
  add    %ecx,%eax
  shl    $0x2,%eax
  add    $0x1,%eax
  mulsd  -0x3f0(%rbp),%xmm0
  cltq
  movsd  %xmm0,-0x3a0(%rbp,%rax,8)
  mov    -0x438(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x450(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x438(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x450(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x43c(%rbp),%edx
  mov    %edx,%eax
  shl    $0x3,%eax
  sub    %edx,%eax
  mov    %eax,%ecx
  mov    -0x438(%rbp),%eax
  add    %ecx,%eax
  shl    $0x2,%eax
  add    $0x2,%eax
  mulsd  -0x3e8(%rbp),%xmm0
  cltq
  movsd  %xmm0,-0x3a0(%rbp,%rax,8)
  addl   $0x1,-0x438(%rbp)
L83:
  cmpl   $0x6,-0x438(%rbp)
  jle    L79
  addl   $0x1,-0x43c(%rbp)
L137:
  cmpl   $0x3,-0x43c(%rbp)
  jle    L45
  movl   $0x0,-0x43c(%rbp)
  jmp    L71
L118:
  mov    -0x43c(%rbp),%eax
  imul   $0x1c,%eax,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x458(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x400(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x420(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x418(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x410(%rbp)
  movl   $0x0,-0x434(%rbp)
  jmp    L97
L127:
  mov    -0x434(%rbp),%edx
  mov    %edx,%eax
  shl    $0x3,%eax
  sub    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x400(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x420(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x420(%rbp)
  movl   $0x1,-0x438(%rbp)
  jmp    L110
L68:
  mov    -0x434(%rbp),%edx
  mov    %edx,%eax
  shl    $0x3,%eax
  sub    %edx,%eax
  mov    %eax,%ecx
  mov    -0x438(%rbp),%eax
  add    %ecx,%eax
  shl    $0x2,%eax
  cltq
  movsd  -0x3a0(%rbp,%rax,8),%xmm1
  mov    -0x434(%rbp),%edx
  mov    %edx,%eax
  shl    $0x3,%eax
  sub    %edx,%eax
  mov    %eax,%ecx
  mov    -0x438(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x400(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x3f8(%rbp)
  movsd  -0x3f8(%rbp),%xmm0
  movsd  -0x420(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x420(%rbp)
  mov    -0x434(%rbp),%edx
  mov    %edx,%eax
  shl    $0x3,%eax
  sub    %edx,%eax
  mov    %eax,%ecx
  mov    -0x438(%rbp),%eax
  add    %ecx,%eax
  shl    $0x2,%eax
  add    $0x1,%eax
  cltq
  movsd  -0x3a0(%rbp,%rax,8),%xmm0
  mulsd  -0x3f8(%rbp),%xmm0
  movsd  -0x418(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x418(%rbp)
  mov    -0x434(%rbp),%edx
  mov    %edx,%eax
  shl    $0x3,%eax
  sub    %edx,%eax
  mov    %eax,%ecx
  mov    -0x438(%rbp),%eax
  add    %ecx,%eax
  shl    $0x2,%eax
  add    $0x2,%eax
  cltq
  movsd  -0x3a0(%rbp,%rax,8),%xmm0
  mulsd  -0x3f8(%rbp),%xmm0
  movsd  -0x410(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x410(%rbp)
  addl   $0x1,-0x438(%rbp)
L110:
  cmpl   $0x6,-0x438(%rbp)
  jle    L68
  addl   $0x1,-0x434(%rbp)
L97:
  cmpl   $0x3,-0x434(%rbp)
  jle    L127
  mov    -0x420(%rbp),%rax
  movq   %rax,%xmm0
  call   <FABS@plt>
  movsd  -0x408(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x420(%rbp)
  mov    -0x43c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x498(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0x6,%eax
  jg     L34
  mov    -0x43c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x498(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  movsd  -0x3e0(%rbp,%rax,8),%xmm0
  movsd  -0x420(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x420(%rbp)
L34:
  movsd  D24(%rip),%xmm0
  divsd  -0x420(%rbp),%xmm0
  movsd  %xmm0,-0x420(%rbp)
  movsd  -0x418(%rbp),%xmm0
  mulsd  -0x420(%rbp),%xmm0
  movsd  %xmm0,-0x418(%rbp)
  movsd  -0x410(%rbp),%xmm0
  mulsd  -0x420(%rbp),%xmm0
  movsd  %xmm0,-0x410(%rbp)
  movsd  -0x418(%rbp),%xmm0
  mulsd  -0x408(%rbp),%xmm0
  movsd  %xmm0,-0x418(%rbp)
  movsd  -0x410(%rbp),%xmm0
  mulsd  -0x408(%rbp),%xmm0
  movsd  %xmm0,-0x410(%rbp)
  mov    -0x43c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x468(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  -0x418(%rbp),%xmm0
  movsd  -0x430(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x430(%rbp)
  mov    -0x43c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x468(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0x418(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  movsd  -0x410(%rbp),%xmm0
  subsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x428(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x428(%rbp)
  addl   $0x1,-0x43c(%rbp)
L71:
  mov    -0x43c(%rbp),%eax
  cmp    -0x45c(%rbp),%eax
  jl     L118
  mov    -0x470(%rbp),%rax
  movsd  -0x430(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x478(%rbp),%rax
  movsd  -0x428(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L78
  call   <__stack_chk_fail@plt>
L78:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D24
datatype: f64
name: extract_symbolic_data
arguments: data_label: D21
datatype: f64

tool: D24: 1

tool: D21: 0.25

assistant: ```c
void coreGTRGAMMASECONDARYINVAR_7(double *gammaRates, double *EIGN, double *sumtable, int upper, int *wrptr, volatile double *ext_dlnLdlz, volatile double *ext_d2lnLdlz2, double lz, double *frequencies, double propInvar, int *iptr) {
  double *sum, diagptable[112];
  int i, l, j;
  double dlnLdlz = 0;
  double d2lnLdlz2 = 0;
  double ki, kisqr;
  double freqs[7];
  double scaler = 0.25 * (1.0 - propInvar);
  double tmp;
  double inv_Li, dlnLidlz, d2lnLidlz2;
  for (i = 0; i < 7; i++)
    freqs[i] = frequencies[i] * propInvar;
  for (i = 0; i < 4; i++) {
    ki = gammaRates[i];
    kisqr = ki * ki;
    for (l = 1; l < 7; l++) {
      diagptable[i * 28 + l * 4] = exp(EIGN[l - 1] * ki * lz);
      diagptable[i * 28 + l * 4 + 1] = EIGN[l - 1] * ki;
      diagptable[i * 28 + l * 4 + 2] = EIGN[l - 1] * EIGN[l - 1] * kisqr;
    }
  }
  for (i = 0; i < upper; i++) {
    sum = &sumtable[i * 28];
    inv_Li = 0.0;
    dlnLidlz = 0.0;
    d2lnLidlz2 = 0.0;
    for (j = 0; j < 4; j++) {
      inv_Li += sum[j * 7];
      for (l = 1; l < 7; l++) {
        inv_Li += (tmp = diagptable[j * 28 + l * 4] * sum[j * 7 + l]);
        dlnLidlz += tmp * diagptable[j * 28 + l * 4 + 1];
        d2lnLidlz2 += tmp * diagptable[j * 28 + l * 4 + 2];
      }
    }
    inv_Li = FABS(inv_Li) * scaler;
    if (iptr[i] < 7)
      inv_Li += freqs[iptr[i]];
    inv_Li = 1.0 / inv_Li;
    dlnLidlz *= inv_Li;
    d2lnLidlz2 *= inv_Li;
    dlnLidlz *= scaler;
    d2lnLidlz2 *= scaler;
    dlnLdlz += wrptr[i] * dlnLidlz;
    d2lnLdlz2 += wrptr[i] * (d2lnLidlz2 - dlnLidlz * dlnLidlz);
  }
  *ext_dlnLdlz = dlnLdlz;
  *ext_d2lnLdlz2 = d2lnLdlz2;
}
```