user: Please show me the C implementation that matches the assembly code listed below:

```asm
<rq_pricing_average_rate_levy>:
  endbr64
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x68,%rsp
  movsd  %xmm5,0x40(%rsp)
  movapd %xmm3,%xmm5
  subsd  %xmm4,%xmm5
  movsd  %xmm0,0x28(%rsp)
  movsd  %xmm7,0x10(%rsp)
  movsd  %xmm1,0x30(%rsp)
  movsd  %xmm5,0x38(%rsp)
  subsd  %xmm3,%xmm5
  movsd  %xmm2,0x58(%rsp)
  movsd  %xmm6,0x8(%rsp)
  movapd %xmm5,%xmm0
  movsd  %xmm3,0x18(%rsp)
  mulsd  %xmm7,%xmm0
  call   <exp@plt>
  movsd  0x18(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm4
  xorpd  D14(%rip),%xmm3
  movsd  %xmm0,0x20(%rsp)
  mulsd  %xmm3,%xmm4
  movapd %xmm4,%xmm0
  movsd  %xmm4,0x18(%rsp)
  call   <exp@plt>
  movsd  0x38(%rsp),%xmm6
  movsd  0x8(%rsp),%xmm2
  movsd  0x28(%rsp),%xmm3
  movsd  0x40(%rsp),%xmm5
  mulsd  %xmm6,%xmm2
  movapd %xmm6,%xmm8
  movsd  0x20(%rsp),%xmm1
  mulsd  %xmm5,%xmm5
  addsd  %xmm6,%xmm8
  subsd  %xmm0,%xmm1
  divsd  %xmm2,%xmm3
  movsd  %xmm5,0x50(%rsp)
  movapd %xmm3,%xmm4
  movapd %xmm8,%xmm3
  addsd  %xmm5,%xmm3
  movsd  0x10(%rsp),%xmm5
  mulsd  %xmm1,%xmm4
  mulsd  %xmm3,%xmm5
  movsd  %xmm3,0x48(%rsp)
  movsd  %xmm4,0x20(%rsp)
  movapd %xmm5,%xmm0
  call   <exp@plt>
  movsd  0x38(%rsp),%xmm6
  movsd  0x10(%rsp),%xmm4
  movsd  %xmm0,0x40(%rsp)
  mulsd  %xmm6,%xmm4
  movapd %xmm4,%xmm0
  call   <exp@plt>
  movsd  0x40(%rsp),%xmm1
  subsd  D23(%rip),%xmm0
  subsd  D23(%rip),%xmm1
  movsd  0x38(%rsp),%xmm6
  movsd  0x48(%rsp),%xmm3
  movsd  0x50(%rsp),%xmm5
  divsd  %xmm6,%xmm0
  movsd  0x8(%rsp),%xmm7
  addsd  %xmm6,%xmm5
  movapd %xmm7,%xmm4
  mulsd  %xmm7,%xmm4
  divsd  %xmm3,%xmm1
  movsd  0x28(%rsp),%xmm3
  mulsd  %xmm3,%xmm3
  subsd  %xmm0,%xmm1
  movapd %xmm3,%xmm0
  addsd  %xmm3,%xmm0
  divsd  %xmm5,%xmm0
  mulsd  %xmm0,%xmm1
  divsd  %xmm4,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x28(%rsp)
  call   <log@plt>
  movsd  0x20(%rsp),%xmm0
  mov    %eax,%ebp
  call   <log@plt>
  pxor   %xmm0,%xmm0
  pxor   %xmm3,%xmm3
  movsd  0x8(%rsp),%xmm7
  cvtsi2sd %eax,%xmm0
  subsd  0x18(%rsp),%xmm0
  movsd  0x58(%rsp),%xmm2
  cvtsi2sd %ebp,%xmm3
  movsd  0x28(%rsp),%xmm1
  addsd  %xmm0,%xmm0
  subsd  %xmm0,%xmm3
  movapd %xmm7,%xmm0
  subsd  0x10(%rsp),%xmm0
  divsd  %xmm7,%xmm0
  mulsd  0x30(%rsp),%xmm0
  subsd  %xmm0,%xmm2
  pxor   %xmm0,%xmm0
  ucomisd %xmm3,%xmm0
  movsd  %xmm2,0x8(%rsp)
  ja     L0
  sqrtsd %xmm3,%xmm3
  movapd %xmm1,%xmm0
  movsd  %xmm3,0x10(%rsp)
  call   <log@plt>
  movsd  0x8(%rsp),%xmm0
  mov    %eax,%ebp
  call   <log@plt>
  movsd  0x10(%rsp),%xmm3
  pxor   %xmm1,%xmm1
  movsd  D23(%rip),%xmm0
  mov    %eax,%r8d
  mov    %ebp,%eax
  divsd  %xmm3,%xmm0
  shr    $0x1f,%eax
  add    %ebp,%eax
  sar    %eax
  sub    %r8d,%eax
  cvtsi2sd %eax,%xmm1
  mulsd  %xmm0,%xmm1
L26:
  movapd %xmm1,%xmm2
  subsd  %xmm3,%xmm2
  test   %bx,%bx
  je     L27
  movapd %xmm1,%xmm0
  movsd  %xmm2,0x10(%rsp)
  call   <rq_pricing_cumul_norm_dist@plt>
  mulsd  0x20(%rsp),%xmm0
  movq   %xmm0,%rbx
  movsd  0x18(%rsp),%xmm0
  call   <exp@plt>
  mulsd  0x8(%rsp),%xmm0
  movsd  0x10(%rsp),%xmm2
  movsd  %xmm0,0x8(%rsp)
  movapd %xmm2,%xmm0
  call   <rq_pricing_cumul_norm_dist@plt>
  movsd  0x8(%rsp),%xmm1
  add    $0x68,%rsp
  mulsd  %xmm0,%xmm1
  movq   %rbx,%xmm0
  pop    %rbx
  pop    %rbp
  subsd  %xmm1,%xmm0
  ret
  nop
L27:
  movapd %xmm1,%xmm0
  movsd  %xmm2,0x28(%rsp)
  call   <rq_pricing_cumul_norm_dist@plt>
  mulsd  0x20(%rsp),%xmm0
  movq   %xmm0,%rbx
  movsd  0x18(%rsp),%xmm0
  call   <exp@plt>
  movsd  0x8(%rsp),%xmm6
  movsd  0x28(%rsp),%xmm2
  mulsd  %xmm0,%xmm6
  movapd %xmm2,%xmm0
  movsd  %xmm6,0x10(%rsp)
  call   <rq_pricing_cumul_norm_dist@plt>
  movsd  %xmm0,0x28(%rsp)
  movsd  0x18(%rsp),%xmm0
  call   <exp@plt>
  movsd  0x10(%rsp),%xmm2
  mulsd  0x28(%rsp),%xmm2
  movapd %xmm0,%xmm1
  movq   %rbx,%xmm0
  mulsd  0x8(%rsp),%xmm1
  subsd  %xmm2,%xmm0
  subsd  0x20(%rsp),%xmm0
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  addsd  %xmm1,%xmm0
  ret
L0:
  movapd %xmm3,%xmm0
  movsd  %xmm3,0x28(%rsp)
  movsd  %xmm1,0x30(%rsp)
  call   <sqrt@plt>
  movsd  0x30(%rsp),%xmm1
  movsd  %xmm0,0x10(%rsp)
  movapd %xmm1,%xmm0
  call   <log@plt>
  movsd  0x8(%rsp),%xmm0
  mov    %eax,%ebp
  call   <log@plt>
  mov    $0x2,%ecx
  pxor   %xmm1,%xmm1
  movsd  D23(%rip),%xmm7
  mov    %eax,%r8d
  mov    %ebp,%eax
  divsd  0x10(%rsp),%xmm7
  movsd  0x28(%rsp),%xmm3
  cltd
  idiv   %ecx
  movapd %xmm3,%xmm0
  sub    %r8d,%eax
  cvtsi2sd %eax,%xmm1
  mulsd  %xmm7,%xmm1
  movsd  %xmm1,0x10(%rsp)
  call   <sqrt@plt>
  movsd  0x10(%rsp),%xmm1
  movapd %xmm0,%xmm3
  jmp    L26
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D14
datatype: f32[4]
name: extract_symbolic_data
arguments: data_label: D23
datatype: f64

tool: {"D14": [0.0,-0.0,0.0,0.0]}

tool: D23: 1

assistant: ```c
double rq_pricing_average_rate_levy(short call, double S, double SA, double X, double r, double rf, double v, double T, double T2) {
  double b = r - rf;
  double ret = 0.0;
  double SE = S / (T * b) * (exp((b - r) * T2) - exp(-r * T2));
  double m = 2 * (S * S) / (b + (v * v)) * ((exp((2 * b + (v * v)) * T2) - 1) / (2 * b + (v * v)) - (exp(b * T2) - 1) / b);
  double d = m / (T * T);
  double Sv = log(d) - 2 * (r * T2 + log(SE));
  double XStar = X - (T - T2) / T * SA;
  double d1 = 1 / sqrt(Sv) * (log(d) / 2 - log(XStar));
  double d2 = d1 - sqrt(Sv);
  if (call)
    ret = SE * rq_pricing_cumul_norm_dist(d1) - XStar * exp(-r * T2) * rq_pricing_cumul_norm_dist(d2);
  else
    ret = (SE * rq_pricing_cumul_norm_dist(d1) - XStar * exp(-r * T2) * rq_pricing_cumul_norm_dist(d2)) - SE + XStar * exp(-r * T2);
  return ret;
}
```