user: Demonstrate the C code that generates the assembly output below:

```asm
<glbChiSpectrumTilt>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %edi,%ebx
  mov    %esi,%r14d
  mov    %rcx,%r15
  mov    %r8,0x38(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  call   <glbGetNumberOfBins@plt>
  mov    %r14d,%esi
  mov    %ebx,%edi
  call   <glbGetRuleRatePtr@plt>
  mov    %rax,%rbp
  mov    %r14d,%esi
  mov    %ebx,%edi
  call   <glbGetSignalFitRatePtr@plt>
  mov    %rax,%r12
  mov    %r14d,0x8(%rsp)
  mov    %r14d,%esi
  mov    %ebx,%edi
  call   <glbGetBGFitRatePtr@plt>
  mov    %rax,%r13
  mov    %ebx,%edi
  call   <glbGetBinCentersListPtr@plt>
  mov    %rax,%r14
  lea    0x60(%rsp),%rdx
  lea    0x58(%rsp),%rsi
  mov    %ebx,%edi
  call   <glbGetEminEmax@plt>
  movsd  0x60(%rsp),%xmm0
  addsd  0x58(%rsp),%xmm0
  mulsd  D2(%rip),%xmm0
  movsd  %xmm0,0x20(%rsp)
  lea    0x44(%rsp),%rcx
  lea    0x40(%rsp),%rdx
  mov    0x8(%rsp),%esi
  mov    %ebx,%edi
  call   <glbGetEnergyWindowBins@plt>
  lea    0x50(%rsp),%rcx
  lea    0x48(%rsp),%rdx
  mov    0x8(%rsp),%esi
  mov    %ebx,%edi
  call   <glbGetBGCenters@plt>
  movsd  D8(%rip),%xmm1
  movapd %xmm1,%xmm4
  addsd  (%r15),%xmm4
  movsd  %xmm4,0x28(%rsp)
  movsd  0x60(%rsp),%xmm0
  subsd  0x58(%rsp),%xmm0
  movsd  0x8(%r15),%xmm2
  divsd  %xmm0,%xmm2
  movsd  %xmm2,0x30(%rsp)
  addsd  0x10(%r15),%xmm1
  mulsd  0x48(%rsp),%xmm1
  movsd  %xmm1,0x10(%rsp)
  movsd  0x18(%r15),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x18(%rsp)
  mov    0x40(%rsp),%ebx
  cmp    0x44(%rsp),%ebx
  jg     L35
  movslq %ebx,%rbx
  pxor   %xmm6,%xmm6
  movsd  %xmm6,0x8(%rsp)
L31:
  movsd  (%r12,%rbx,8),%xmm1
  movsd  (%r14,%rbx,8),%xmm0
  subsd  0x20(%rsp),%xmm0
  movsd  0x0(%r13,%rbx,8),%xmm3
  movsd  0x30(%rsp),%xmm2
  mulsd  %xmm0,%xmm2
  mulsd  %xmm1,%xmm2
  mulsd  0x28(%rsp),%xmm1
  addsd  %xmm1,%xmm2
  movsd  0x10(%rsp),%xmm1
  mulsd  %xmm3,%xmm1
  addsd  %xmm1,%xmm2
  mulsd  0x18(%rsp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm3,%xmm1
  movsd  0x0(%rbp,%rbx,8),%xmm0
  addsd  %xmm2,%xmm1
  call   <glb_likelihood@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  add    $0x1,%rbx
  cmp    %ebx,0x44(%rsp)
  jge    L31
L32:
  mov    0x38(%rsp),%r14
  movsd  (%r14),%xmm2
  pxor   %xmm1,%xmm1
  movsd  (%r15),%xmm0
  call   <glb_prior@plt>
  mov    %rax,%rbx
  movsd  0x8(%r15),%xmm0
  movsd  0x8(%r14),%xmm2
  pxor   %xmm1,%xmm1
  call   <glb_prior@plt>
  add    %rax,%rbx
  movsd  0x10(%r14),%xmm2
  movsd  0x48(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm0
  call   <glb_prior@plt>
  add    %rax,%rbx
  movsd  0x18(%r14),%xmm2
  movsd  0x50(%rsp),%xmm1
  movsd  0x18(%rsp),%xmm0
  call   <glb_prior@plt>
  add    %rax,%rbx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rbx,%xmm0
  addsd  0x8(%rsp),%xmm0
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L35:
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x8(%rsp)
  jmp    L32
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D2
type: f64
name: parse_data
arguments: tag: D8
type: f64

tool: D2: 0.5

tool: D8: 1

assistant: ```c
double glbChiSpectrumTilt(int exp, int rule, int n_params, double *x, double *errors, void *user_data) {
  int n_bins = glbGetNumberOfBins(exp);
  double *true_rates = glbGetRuleRatePtr(exp, rule);
  double *signal_fit_rates = glbGetSignalFitRatePtr(exp, rule);
  double *bg_fit_rates = glbGetBGFitRatePtr(exp, rule);
  double *bin_centers = glbGetBinCentersListPtr(exp);
  double signal_norm, signal_tilt;
  double bg_norm_center, bg_tilt_center;
  double bg_norm, bg_tilt;
  int ew_low, ew_high;
  double emin, emax, ecenter;
  double fit_rate, true_rate;
  double chi2 = 0.0;
  int i;
  glbGetEminEmax(exp, &emin, &emax);
  ecenter = 0.5 * (emax + emin);
  glbGetEnergyWindowBins(exp, rule, &ew_low, &ew_high);
  glbGetBGCenters(exp, rule, &bg_norm_center, &bg_tilt_center);
  signal_norm = 1.0 + x[0];
  signal_tilt = x[1] / (emax - emin);
  bg_norm = bg_norm_center * (1.0 + x[2]);
  bg_tilt = x[3] / (emax - emin);
  for (i = ew_low; i <= ew_high; i++) {
    fit_rate = signal_norm * signal_fit_rates[i] + signal_tilt * (bin_centers[i] - ecenter) * signal_fit_rates[i] + bg_norm * bg_fit_rates[i] + bg_tilt * (bin_centers[i] - ecenter) * bg_fit_rates[i];
    chi2 += glb_likelihood(true_rates[i], fit_rate);
  }
  chi2 += glb_prior(x[0], 0.0, errors[0]) + glb_prior(x[1], 0.0, errors[1]) + glb_prior(bg_norm, bg_norm_center, errors[2]) + glb_prior(bg_tilt, bg_tilt_center, errors[3]);
  return chi2;
}
```