user: 请将以下的汇编代码转换成C语言代码：

```asm
<glbChiNoSysTotalRates>:
  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,-0x18(%rbp)
  lea    -0x58(%rbp),%rcx
  lea    -0x5c(%rbp),%rdx
  mov    -0x68(%rbp),%esi
  mov    -0x64(%rbp),%eax
  mov    %eax,%edi
  call   <glbGetEnergyWindowBins@plt>
  lea    -0x48(%rbp),%rcx
  lea    -0x50(%rbp),%rdx
  mov    -0x68(%rbp),%esi
  mov    -0x64(%rbp),%eax
  mov    %eax,%edi
  call   <glbGetBGCenters@plt>
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x5c(%rbp),%eax
  mov    %eax,-0x54(%rbp)
  jmp    L4
L2:
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movsd  -0x50(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x40(%rbp),%xmm0
  addsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x38(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  addl   $0x1,-0x54(%rbp)
L4:
  mov    -0x58(%rbp),%eax
  cmp    %eax,-0x54(%rbp)
  jle    L2
  movsd  -0x40(%rbp),%xmm0
  mov    -0x38(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <glb_likelihood@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L23
  call   <__stack_chk_fail@plt>
L23:
  movq   %rax,%xmm0
  leave
  ret
```

assistant: ```c
double glbChiNoSysTotalRates(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 bg_norm_center, bg_tilt_center;
  int ew_low, ew_high;
  double fit_rate, true_rate;
  double total_fit_rate, total_true_rate;
  double chi2 = 0.0;
  int i;
  glbGetEnergyWindowBins(exp, rule, &ew_low, &ew_high);
  glbGetBGCenters(exp, rule, &bg_norm_center, &bg_tilt_center);
  total_fit_rate = 0.0;
  total_true_rate = 0.0;
  for (i = ew_low; i <= ew_high; i++) {
    fit_rate = (signal_fit_rates[i] + bg_norm_center * bg_fit_rates[i]);
    total_fit_rate += fit_rate;
    total_true_rate += true_rates[i];
  }
  chi2 = glb_likelihood(total_true_rate, total_fit_rate);
  return chi2;
}
```