user: Translate the below assembly code into C programming language:

```asm
<glbChiSpectrumOnly>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %edi,-0x64(%rbp)
  mov    %esi,-0x68(%rbp)
  mov    %edx,-0x6c(%rbp)
  mov    %rcx,-0x78(%rbp)
  mov    %r8,-0x80(%rbp)
  mov    %r9,-0x88(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x68(%rbp),%edx
  mov    -0x64(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <glbGetRuleRatePtr@plt>
  mov    %rax,-0x30(%rbp)
  mov    -0x68(%rbp),%edx
  mov    -0x64(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <glbGetSignalFitRatePtr@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x68(%rbp),%edx
  mov    -0x64(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <glbGetBGFitRatePtr@plt>
  mov    %rax,-0x20(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x78(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D9(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  lea    -0x50(%rbp),%rcx
  lea    -0x54(%rbp),%rdx
  mov    -0x68(%rbp),%esi
  mov    -0x64(%rbp),%eax
  mov    %eax,%edi
  call   <glbGetEnergyWindowBins@plt>
  lea    -0x40(%rbp),%rcx
  lea    -0x48(%rbp),%rdx
  mov    -0x68(%rbp),%esi
  mov    -0x64(%rbp),%eax
  mov    %eax,%edi
  call   <glbGetBGCenters@plt>
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
  jmp    L23
L26:
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x18(%rbp),%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movsd  -0x48(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  -0x10(%rbp),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <glb_likelihood@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  movsd  -0x38(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  addl   $0x1,-0x4c(%rbp)
L23:
  mov    -0x50(%rbp),%eax
  cmp    %eax,-0x4c(%rbp)
  jle    L26
  movsd  -0x38(%rbp),%xmm0
  movq   %xmm0,%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L16
  call   <__stack_chk_fail@plt>
L16:
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D9
type: f64

tool: D9: 1

assistant: ```c
double glbChiSpectrumOnly(int exp, int rule, int n_params, double *x, double *errors, void *user_data) {
  double *true_rates = glbGetRuleRatePtr(exp, rule);
  double *signal_fit_rates = glbGetSignalFitRatePtr(exp, rule);
  double *bg_fit_rates = glbGetBGFitRatePtr(exp, rule);
  double signal_norm;
  double bg_norm_center, bg_tilt_center;
  int ew_low, ew_high;
  double fit_rate, true_rate;
  double chi2 = 0.0;
  int i;
  signal_norm = 1.0 + x[0];
  glbGetEnergyWindowBins(exp, rule, &ew_low, &ew_high);
  glbGetBGCenters(exp, rule, &bg_norm_center, &bg_tilt_center);
  for (i = ew_low; i <= ew_high; i++) {
    fit_rate = signal_norm * signal_fit_rates[i] + bg_norm_center * bg_fit_rates[i];
    chi2 += glb_likelihood(true_rates[i], fit_rate);
  }
  return chi2;
}
```