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

```asm
<rq_pricing_lookback>:
  endbr64
  movapd %xmm4,%xmm7
  sub    $0x78,%rsp
  mulsd  %xmm4,%xmm7
  movsd  %xmm0,0x8(%rsp)
  pxor   %xmm0,%xmm0
  ucomisd %xmm5,%xmm0
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm3,0x18(%rsp)
  movsd  %xmm6,0x20(%rsp)
  movsd  %xmm7,(%rsp)
  ja     L9
  movapd %xmm5,%xmm7
  sqrtsd %xmm7,%xmm7
  movsd  %xmm7,0x28(%rsp)
L4:
  movsd  0x8(%rsp),%xmm3
  movsd  %xmm1,0x68(%rsp)
  movsd  %xmm5,0x40(%rsp)
  divsd  %xmm1,%xmm3
  movsd  %xmm4,0x38(%rsp)
  movapd %xmm3,%xmm0
  movsd  %xmm3,0x30(%rsp)
  call   <log@plt>
  movsd  (%rsp),%xmm7
  mulsd  D30(%rip),%xmm7
  movsd  0x10(%rsp),%xmm6
  subsd  0x18(%rsp),%xmm6
  movsd  0x40(%rsp),%xmm5
  movsd  0x38(%rsp),%xmm4
  mulsd  0x28(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  movsd  %xmm6,0x60(%rsp)
  movapd %xmm7,%xmm2
  movsd  %xmm7,0x28(%rsp)
  addsd  %xmm6,%xmm2
  movsd  %xmm4,0x38(%rsp)
  mulsd  %xmm5,%xmm2
  addsd  %xmm0,%xmm2
  movapd %xmm3,%xmm0
  divsd  %xmm4,%xmm2
  movapd %xmm2,%xmm8
  movsd  %xmm2,0x58(%rsp)
  subsd  %xmm4,%xmm8
  movsd  %xmm8,0x50(%rsp)
  call   <log@plt>
  movsd  0x18(%rsp),%xmm4
  subsd  0x10(%rsp),%xmm4
  movapd %xmm0,%xmm7
  movsd  0x20(%rsp),%xmm0
  movsd  0x40(%rsp),%xmm5
  mulsd  0x28(%rsp),%xmm5
  movsd  0x30(%rsp),%xmm3
  mulsd  %xmm4,%xmm0
  movsd  0x38(%rsp),%xmm4
  addsd  %xmm7,%xmm0
  addsd  %xmm0,%xmm5
  movapd %xmm3,%xmm0
  divsd  %xmm4,%xmm5
  movsd  %xmm5,0x48(%rsp)
  call   <log@plt>
  movsd  0x60(%rsp),%xmm6
  movsd  0x18(%rsp),%xmm4
  movapd %xmm0,%xmm3
  xorpd  D6(%rip),%xmm4
  movapd %xmm6,%xmm0
  subsd  0x28(%rsp),%xmm0
  movsd  %xmm6,0x40(%rsp)
  addsd  %xmm0,%xmm0
  mulsd  %xmm3,%xmm0
  movsd  0x20(%rsp),%xmm3
  mulsd  %xmm4,%xmm3
  movapd %xmm0,%xmm2
  divsd  (%rsp),%xmm2
  movsd  %xmm2,0x38(%rsp)
  movapd %xmm3,%xmm0
  movsd  %xmm3,0x30(%rsp)
  call   <exp@plt>
  movsd  0x8(%rsp),%xmm4
  movsd  0x58(%rsp),%xmm2
  mulsd  %xmm0,%xmm4
  movapd %xmm2,%xmm0
  movsd  %xmm2,0x28(%rsp)
  movsd  %xmm4,0x18(%rsp)
  call   <rq_pricing_cumul_norm_dist@plt>
  movsd  0x18(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm3
  mulsd  %xmm0,%xmm4
  movapd %xmm3,%xmm0
  movsd  %xmm4,0x18(%rsp)
  call   <exp@plt>
  movsd  0x40(%rsp),%xmm6
  movsd  (%rsp),%xmm3
  mulsd  0x8(%rsp),%xmm0
  movsd  0x28(%rsp),%xmm2
  addsd  %xmm6,%xmm6
  xorpd  D6(%rip),%xmm2
  divsd  %xmm6,%xmm3
  movapd %xmm0,%xmm1
  movapd %xmm2,%xmm0
  mulsd  %xmm3,%xmm1
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm1,(%rsp)
  call   <rq_pricing_cumul_norm_dist@plt>
  mulsd  (%rsp),%xmm0
  movsd  0x18(%rsp),%xmm4
  subsd  %xmm0,%xmm4
  movsd  0x10(%rsp),%xmm0
  xorpd  D6(%rip),%xmm0
  mulsd  0x20(%rsp),%xmm0
  movsd  %xmm4,0x18(%rsp)
  call   <exp@plt>
  movsd  0x68(%rsp),%xmm1
  movsd  0x50(%rsp),%xmm8
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rsp)
  movapd %xmm8,%xmm0
  call   <rq_pricing_cumul_norm_dist@plt>
  movsd  0x38(%rsp),%xmm7
  movsd  %xmm0,0x10(%rsp)
  movapd %xmm7,%xmm0
  call   <exp@plt>
  movsd  0x8(%rsp),%xmm3
  movsd  0x48(%rsp),%xmm5
  xorpd  D6(%rip),%xmm5
  mulsd  %xmm0,%xmm3
  movapd %xmm5,%xmm0
  movsd  %xmm3,0x8(%rsp)
  call   <rq_pricing_cumul_norm_dist@plt>
  movsd  0x8(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm1
  movsd  0x18(%rsp),%xmm2
  mulsd  %xmm0,%xmm3
  movsd  (%rsp),%xmm0
  add    $0x78,%rsp
  subsd  %xmm3,%xmm1
  mulsd  %xmm1,%xmm0
  subsd  %xmm0,%xmm2
  movapd %xmm2,%xmm0
  ret
L9:
  movapd %xmm5,%xmm0
  movsd  %xmm4,0x40(%rsp)
  movsd  %xmm1,0x38(%rsp)
  movsd  %xmm5,0x30(%rsp)
  call   <sqrt@plt>
  movsd  0x40(%rsp),%xmm4
  movsd  0x38(%rsp),%xmm1
  movsd  0x30(%rsp),%xmm5
  movsd  %xmm0,0x28(%rsp)
  jmp    L4
```

tool_calls: name: parse_data
arguments: tag: D30
type_guessed: byte[8]
name: parse_data
arguments: tag: D6
type_guessed: byte[16]

tool: {"D30": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

tool: {"D6": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
double rq_pricing_lookback(short call, double S, double Smin, double r_dom, double r_for, double sigma, double tau_e, double tau_d) {
  double sigma_sqr = sigma * sigma;
  double tau_e_sqrt = sqrt(tau_e);
  double a1 = (log(S / Smin) + (r_dom - r_for + sigma_sqr / 2.0) * tau_e) / (sigma * tau_e_sqrt);
  double a2 = a1 - sigma * tau_e_sqrt;
  double a3 = (log(S / Smin) + ((-r_dom + r_for) * tau_d) + ((sigma_sqr / 2.0) * tau_e)) / (sigma * tau_e_sqrt);
  double Y1 = 2.0 * (r_dom - r_for - sigma_sqr / 2.0) * log(S / Smin) / sigma_sqr;
  return S * exp(-r_for * tau_d) * rq_pricing_cumul_norm_dist(a1) - S * exp(-r_for * tau_d) * (sigma_sqr / (2.0 * (r_dom - r_for))) * rq_pricing_cumul_norm_dist(-a1) - Smin * exp(-r_dom * tau_d) * (rq_pricing_cumul_norm_dist(a2) - (sigma_sqr / (2 * (r_dom - r_for))) * exp(Y1) * rq_pricing_cumul_norm_dist(-a3));
}
```