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

```asm
<coreGTRGAMMAINVAR_BINARY>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x148,%rsp
  movsd  %xmm0,-0x108(%rbp)
  mov    %rdi,-0x110(%rbp)
  mov    %rsi,-0x118(%rbp)
  mov    %rdx,-0x120(%rbp)
  mov    %rcx,-0x128(%rbp)
  mov    %r8,-0x130(%rbp)
  mov    %r9,-0x138(%rbp)
  movsd  %xmm1,-0x150(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x140(%rbp)
  mov    0x18(%rbp),%rax
  mov    %rax,-0x148(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xf0(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xe8(%rbp)
  movsd  D5(%rip),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x108(%rbp),%xmm1
  movsd  D25(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0xc8(%rbp)
  mov    -0x110(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  -0x108(%rbp),%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  mov    -0x110(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x108(%rbp),%xmm0
  movsd  %xmm0,-0x98(%rbp)
  movl   $0x0,-0xf8(%rbp)
  jmp    L23
L10:
  mov    -0xf8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x118(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  mov    -0x120(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  -0xb0(%rbp),%xmm0
  mulsd  -0x150(%rbp),%xmm0
  movq   %xmm0,%rdx
  mov    -0xf8(%rbp),%ecx
  mov    %ecx,%eax
  add    %eax,%eax
  lea    (%rax,%rcx,1),%ebx
  movq   %rdx,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  movslq %ebx,%rdx
  mov    %rax,-0x80(%rbp,%rdx,8)
  mov    -0x120(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0xf8(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    $0x1,%eax
  mulsd  -0xb0(%rbp),%xmm0
  cltq
  movsd  %xmm0,-0x80(%rbp,%rax,8)
  mov    -0x120(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x120(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0xf8(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    $0x2,%eax
  mulsd  -0xa8(%rbp),%xmm0
  cltq
  movsd  %xmm0,-0x80(%rbp,%rax,8)
  addl   $0x1,-0xf8(%rbp)
L23:
  cmpl   $0x3,-0xf8(%rbp)
  jle    L10
  movl   $0x0,-0xf8(%rbp)
  jmp    L58
L46:
  mov    -0xf8(%rbp),%eax
  shl    $0x3,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x128(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0xc0(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xd0(%rbp)
  movl   $0x0,-0xf4(%rbp)
  jmp    L28
L4:
  mov    -0xf4(%rbp),%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xc0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0xe0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  mov    -0xf4(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  movsd  -0x80(%rbp,%rax,8),%xmm1
  mov    -0xf4(%rbp),%eax
  add    %eax,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0xc0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  movsd  -0xe0(%rbp),%xmm0
  addsd  -0xb8(%rbp),%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  mov    -0xf4(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    $0x1,%eax
  cltq
  movsd  -0x80(%rbp,%rax,8),%xmm0
  mulsd  -0xb8(%rbp),%xmm0
  movsd  -0xd8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  mov    -0xf4(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    $0x2,%eax
  cltq
  movsd  -0x80(%rbp,%rax,8),%xmm0
  mulsd  -0xb8(%rbp),%xmm0
  movsd  -0xd0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xd0(%rbp)
  addl   $0x1,-0xf4(%rbp)
L28:
  cmpl   $0x3,-0xf4(%rbp)
  jle    L4
  mov    -0xe0(%rbp),%rax
  movq   %rax,%xmm0
  call   <FABS@plt>
  movsd  -0xc8(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  mov    -0xf8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x140(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0x1,%eax
  jg     L70
  mov    -0xf8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x140(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  movsd  -0xa0(%rbp,%rax,8),%xmm0
  movsd  -0xe0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xe0(%rbp)
L70:
  movsd  D5(%rip),%xmm0
  divsd  -0xe0(%rbp),%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  movsd  -0xd8(%rbp),%xmm0
  mulsd  -0xe0(%rbp),%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  movsd  -0xd0(%rbp),%xmm0
  mulsd  -0xe0(%rbp),%xmm0
  movsd  %xmm0,-0xd0(%rbp)
  movsd  -0xd8(%rbp),%xmm0
  mulsd  -0xc8(%rbp),%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  movsd  -0xd0(%rbp),%xmm0
  mulsd  -0xc8(%rbp),%xmm0
  movsd  %xmm0,-0xd0(%rbp)
  mov    -0xf8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x148(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  -0xd8(%rbp),%xmm0
  movsd  -0xf0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xf0(%rbp)
  mov    -0xf8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x148(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0xd8(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  movsd  -0xd0(%rbp),%xmm0
  subsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0xe8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xe8(%rbp)
  addl   $0x1,-0xf8(%rbp)
L58:
  mov    -0xf8(%rbp),%eax
  cmp    0x20(%rbp),%eax
  jl     L46
  mov    -0x130(%rbp),%rax
  movsd  -0xf0(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x138(%rbp),%rax
  movsd  -0xe8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L21
  call   <__stack_chk_fail@plt>
L21:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D5
type_infered: f64
name: extract_symbolic_data
arguments: label: D25
type_infered: f64

tool: D5: 1

tool: D25: 0.25

assistant: ```c
void coreGTRGAMMAINVAR_BINARY(double propInvar, double *frequencies, double *gammaRates, double *EIGN, double *sumtable, volatile double *ext_dlnLdlz, volatile double *ext_d2lnLdlz2, int *iptr, int *wrptr, int upper, double lz) {
  double *sum, diagptable[12];
  int i, j;
  double dlnLdlz = 0;
  double d2lnLdlz2 = 0;
  double ki, kisqr;
  double freqs[4];
  double scaler = 0.25 * (1.0 - propInvar);
  double tmp_1;
  double inv_Li, dlnLidlz, d2lnLidlz2;
  freqs[0] = frequencies[0] * propInvar;
  freqs[1] = frequencies[1] * propInvar;
  for (i = 0; i < 4; i++) {
    ki = gammaRates[i];
    kisqr = ki * ki;
    diagptable[i * 3] = exp(EIGN[0] * ki * lz);
    diagptable[i * 3 + 1] = EIGN[0] * ki;
    diagptable[i * 3 + 2] = EIGN[0] * EIGN[0] * kisqr;
  }
  for (i = 0; i < upper; i++) {
    sum = &(sumtable[i * 8]);
    inv_Li = 0.0;
    dlnLidlz = 0.0;
    d2lnLidlz2 = 0.0;
    for (j = 0; j < 4; j++) {
      inv_Li += sum[2 * j];
      tmp_1 = diagptable[3 * j] * sum[2 * j + 1];
      inv_Li += tmp_1;
      dlnLidlz += tmp_1 * diagptable[3 * j + 1];
      d2lnLidlz2 += tmp_1 * diagptable[3 * j + 2];
    }
    inv_Li = FABS(inv_Li) * scaler;
    if (iptr[i] < 2)
      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;
}
```