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

```asm
<rq_pricing_roll_geske_whaley>:
  endbr64
  push   %r15
  push   %r14
  push   %rbx
  sub    $0x60,%rsp
  movsd  %xmm6,0x8(%rsp)
  movapd %xmm4,%xmm6
  xorpd  D25(%rip),%xmm6
  movsd  %xmm4,0x20(%rsp)
  movapd %xmm6,%xmm4
  movsd  %xmm0,0x10(%rsp)
  mulsd  %xmm2,%xmm4
  movsd  %xmm3,0x40(%rsp)
  movsd  %xmm1,0x28(%rsp)
  movsd  %xmm5,(%rsp)
  movsd  %xmm6,0x58(%rsp)
  movsd  %xmm2,0x50(%rsp)
  movapd %xmm4,%xmm0
  movq   %xmm4,%rbx
  call   <exp@plt>
  mulsd  (%rsp),%xmm0
  movsd  0x10(%rsp),%xmm7
  movsd  0x40(%rsp),%xmm6
  subsd  0x50(%rsp),%xmm6
  movapd %xmm7,%xmm1
  movsd  %xmm7,0x18(%rsp)
  movsd  %xmm6,0x10(%rsp)
  subsd  %xmm0,%xmm1
  movsd  0x58(%rsp),%xmm0
  mulsd  %xmm6,%xmm0
  movsd  %xmm1,0x48(%rsp)
  call   <exp@plt>
  movsd  0x28(%rsp),%xmm8
  xor    %esi,%esi
  movsd  0x8(%rsp),%xmm4
  movapd %xmm0,%xmm1
  movsd  0x18(%rsp),%xmm7
  movsd  0x20(%rsp),%xmm3
  movsd  D42(%rip),%xmm0
  subsd  %xmm1,%xmm0
  mulsd  %xmm8,%xmm0
  comisd (%rsp),%xmm0
  jae    L79
  movsd  0x10(%rsp),%xmm2
  movapd %xmm8,%xmm1
  movapd %xmm7,%xmm0
  mov    $0x1,%edi
  movsd  %xmm3,0x28(%rsp)
  movsd  %xmm8,0x20(%rsp)
  movsd  %xmm7,0x18(%rsp)
  call   <rq_pricing_blackscholes_gen@plt>
  movsd  0x18(%rsp),%xmm7
  pxor   %xmm6,%xmm6
  movsd  0x20(%rsp),%xmm8
  movsd  0x28(%rsp),%xmm3
  subsd  %xmm7,%xmm0
  subsd  (%rsp),%xmm0
  movapd %xmm8,%xmm1
  addsd  %xmm8,%xmm0
  comisd %xmm6,%xmm0
  ja     L38
  jmp    L25
  nopw   0x0(%rax,%rax,1)
L141:
  addsd  %xmm7,%xmm7
  movsd  0x8(%rsp),%xmm4
  movsd  0x10(%rsp),%xmm2
  xor    %esi,%esi
  mov    $0x1,%edi
  movsd  %xmm3,0x28(%rsp)
  movsd  %xmm1,0x20(%rsp)
  movapd %xmm7,%xmm0
  movsd  %xmm7,0x18(%rsp)
  call   <rq_pricing_blackscholes_gen@plt>
  movsd  0x18(%rsp),%xmm7
  pxor   %xmm4,%xmm4
  movsd  0x20(%rsp),%xmm1
  movsd  0x28(%rsp),%xmm3
  subsd  %xmm7,%xmm0
  subsd  (%rsp),%xmm0
  addsd  %xmm1,%xmm0
  comisd %xmm4,%xmm0
  jbe    L102
L38:
  movsd  D27(%rip),%xmm4
  comisd %xmm7,%xmm4
  ja     L141
L102:
  movapd %xmm1,%xmm8
L25:
  comisd D27(%rip),%xmm7
  ja     L94
  movsd  D106(%rip),%xmm5
  movsd  0x8(%rsp),%xmm4
  movapd %xmm8,%xmm1
  xor    %esi,%esi
  movsd  0x10(%rsp),%xmm2
  mov    $0x1,%edi
  movsd  %xmm7,0x30(%rsp)
  mulsd  %xmm7,%xmm5
  movsd  %xmm3,0x28(%rsp)
  movsd  %xmm8,0x20(%rsp)
  movapd %xmm5,%xmm0
  movsd  %xmm5,0x18(%rsp)
  call   <rq_pricing_blackscholes_gen@plt>
  movsd  0x18(%rsp),%xmm5
  pxor   %xmm6,%xmm6
  movsd  0x20(%rsp),%xmm8
  movsd  0x28(%rsp),%xmm3
  movsd  0x30(%rsp),%xmm7
  subsd  %xmm5,%xmm0
  subsd  (%rsp),%xmm0
  addsd  %xmm8,%xmm0
  movapd %xmm0,%xmm1
  andpd  D145(%rip),%xmm1
  comisd D44(%rip),%xmm1
  ja     L16
  jmp    L98
  nopl   0x0(%rax)
L34:
  pxor   %xmm2,%xmm2
  movsd  0x8(%rsp),%xmm4
  xor    %esi,%esi
  mov    $0x1,%edi
  cmpltsd %xmm2,%xmm0
  movsd  0x10(%rsp),%xmm2
  movsd  %xmm3,0x28(%rsp)
  movsd  %xmm8,0x20(%rsp)
  movapd %xmm0,%xmm1
  andpd  %xmm0,%xmm6
  andnpd %xmm5,%xmm1
  andpd  %xmm0,%xmm5
  andnpd %xmm7,%xmm0
  movapd %xmm0,%xmm7
  orpd   %xmm1,%xmm6
  movapd %xmm8,%xmm1
  orpd   %xmm5,%xmm7
  movsd  %xmm6,0x30(%rsp)
  movapd %xmm7,%xmm5
  movsd  %xmm7,0x38(%rsp)
  addsd  %xmm6,%xmm5
  mulsd  D106(%rip),%xmm5
  movapd %xmm5,%xmm0
  movsd  %xmm5,0x18(%rsp)
  call   <rq_pricing_blackscholes_gen@plt>
  movsd  0x18(%rsp),%xmm5
  movsd  0x20(%rsp),%xmm8
  movsd  0x28(%rsp),%xmm3
  subsd  %xmm5,%xmm0
  subsd  (%rsp),%xmm0
  addsd  %xmm8,%xmm0
  movapd %xmm0,%xmm1
  andpd  D145(%rip),%xmm1
  comisd D44(%rip),%xmm1
  jbe    L98
  movsd  0x30(%rsp),%xmm6
  movsd  0x38(%rsp),%xmm7
L16:
  movapd %xmm7,%xmm1
  subsd  %xmm6,%xmm1
  comisd D44(%rip),%xmm1
  ja     L34
L98:
  movsd  0x48(%rsp),%xmm0
  movsd  %xmm3,0x28(%rsp)
  movsd  %xmm5,0x20(%rsp)
  divsd  %xmm8,%xmm0
  movsd  %xmm8,0x18(%rsp)
  call   <log@plt>
  mov    $0x2,%edi
  movsd  %xmm0,0x10(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <pow@plt>
  pxor   %xmm1,%xmm1
  movsd  0x28(%rsp),%xmm3
  movsd  0x40(%rsp),%xmm4
  mov    %eax,%edx
  pxor   %xmm6,%xmm6
  movsd  0x18(%rsp),%xmm8
  movsd  0x20(%rsp),%xmm5
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  ucomisd %xmm4,%xmm6
  cvtsi2sd %eax,%xmm1
  addsd  %xmm3,%xmm1
  mulsd  %xmm4,%xmm1
  addsd  0x10(%rsp),%xmm1
  ja     L64
  sqrtsd %xmm4,%xmm4
  movsd  0x8(%rsp),%xmm0
  mulsd  %xmm4,%xmm0
  divsd  %xmm0,%xmm1
  movq   %xmm1,%r14
L40:
  movq   %r14,%xmm6
  movsd  %xmm3,0x20(%rsp)
  subsd  %xmm0,%xmm6
  movsd  0x48(%rsp),%xmm0
  movsd  %xmm8,0x18(%rsp)
  divsd  %xmm5,%xmm0
  movq   %xmm6,%r15
  call   <log@plt>
  mov    $0x2,%edi
  movsd  %xmm0,0x10(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <pow@plt>
  pxor   %xmm1,%xmm1
  movsd  0x20(%rsp),%xmm3
  movsd  0x50(%rsp),%xmm4
  mov    %eax,%edx
  pxor   %xmm6,%xmm6
  movsd  0x18(%rsp),%xmm8
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  ucomisd %xmm4,%xmm6
  cvtsi2sd %eax,%xmm1
  addsd  %xmm3,%xmm1
  mulsd  %xmm4,%xmm1
  addsd  0x10(%rsp),%xmm1
  ja     L9
  sqrtsd %xmm4,%xmm4
  movsd  0x8(%rsp),%xmm0
  mulsd  %xmm4,%xmm0
  divsd  %xmm0,%xmm1
L115:
  movapd %xmm1,%xmm4
  movsd  %xmm8,0x20(%rsp)
  subsd  %xmm0,%xmm4
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x18(%rsp)
  movsd  %xmm4,0x8(%rsp)
  call   <rq_pricing_cumul_norm_dist@plt>
  mulsd  0x48(%rsp),%xmm0
  pxor   %xmm5,%xmm5
  movsd  0x50(%rsp),%xmm3
  divsd  0x40(%rsp),%xmm3
  ucomisd %xmm3,%xmm5
  movsd  0x18(%rsp),%xmm1
  movsd  0x20(%rsp),%xmm8
  xorpd  D25(%rip),%xmm1
  movsd  %xmm0,0x10(%rsp)
  ja     L159
  sqrtsd %xmm3,%xmm3
  movq   %r14,%xmm0
  movapd %xmm3,%xmm5
  xorpd  D25(%rip),%xmm5
  movsd  %xmm3,0x18(%rsp)
  movapd %xmm5,%xmm2
  call   <rq_pricing_cumul_bivar_norm_dist@plt>
  mulsd  0x48(%rsp),%xmm0
  movsd  0x10(%rsp),%xmm2
  addsd  %xmm0,%xmm2
  movsd  0x58(%rsp),%xmm0
  mulsd  0x40(%rsp),%xmm0
  movq   %xmm2,%r14
  call   <exp@plt>
  movsd  0x20(%rsp),%xmm8
  movsd  0x18(%rsp),%xmm3
  mulsd  %xmm8,%xmm0
  movsd  %xmm0,0x10(%rsp)
L90:
  movapd %xmm3,%xmm2
  movsd  0x8(%rsp),%xmm1
  xorpd  D25(%rip),%xmm2
  movq   %r15,%xmm0
  xorpd  D25(%rip),%xmm1
  movsd  %xmm8,0x18(%rsp)
  call   <rq_pricing_cumul_bivar_norm_dist@plt>
  mulsd  0x10(%rsp),%xmm0
  movq   %r14,%xmm6
  subsd  %xmm0,%xmm6
  movq   %rbx,%xmm0
  movsd  %xmm6,0x10(%rsp)
  call   <exp@plt>
  movsd  0x18(%rsp),%xmm8
  subsd  (%rsp),%xmm8
  mulsd  %xmm0,%xmm8
  movsd  0x8(%rsp),%xmm0
  movsd  %xmm8,(%rsp)
  call   <rq_pricing_cumul_norm_dist@plt>
  mulsd  (%rsp),%xmm0
  movsd  0x10(%rsp),%xmm1
  add    $0x60,%rsp
  pop    %rbx
  pop    %r14
  pop    %r15
  subsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  ret
  nopl   (%rax)
L94:
  movsd  0x8(%rsp),%xmm4
  xor    %esi,%esi
L79:
  movsd  0x40(%rsp),%xmm2
  movsd  0x48(%rsp),%xmm0
  add    $0x60,%rsp
  movapd %xmm8,%xmm1
  pop    %rbx
  mov    $0x1,%edi
  pop    %r14
  pop    %r15
  jmp    10e0 <rq_pricing_blackscholes_gen@plt>
L64:
  movsd  0x40(%rsp),%xmm0
  movsd  %xmm3,0x28(%rsp)
  movsd  %xmm8,0x20(%rsp)
  movsd  %xmm5,0x18(%rsp)
  movsd  %xmm1,0x10(%rsp)
  call   <sqrt@plt>
  mulsd  0x8(%rsp),%xmm0
  movsd  0x10(%rsp),%xmm1
  divsd  %xmm0,%xmm1
  movsd  0x40(%rsp),%xmm0
  movq   %xmm1,%r14
  call   <sqrt@plt>
  movsd  0x28(%rsp),%xmm3
  mulsd  0x8(%rsp),%xmm0
  movsd  0x20(%rsp),%xmm8
  movsd  0x18(%rsp),%xmm5
  jmp    L40
L9:
  movsd  0x50(%rsp),%xmm0
  movsd  %xmm8,0x18(%rsp)
  movsd  %xmm1,0x10(%rsp)
  call   <sqrt@plt>
  mulsd  0x8(%rsp),%xmm0
  movsd  0x10(%rsp),%xmm1
  divsd  %xmm0,%xmm1
  movsd  0x50(%rsp),%xmm0
  movsd  %xmm1,0x10(%rsp)
  call   <sqrt@plt>
  movsd  0x18(%rsp),%xmm8
  mulsd  0x8(%rsp),%xmm0
  movsd  0x10(%rsp),%xmm1
  jmp    L115
L159:
  movapd %xmm3,%xmm0
  movsd  %xmm8,0x28(%rsp)
  movsd  %xmm3,0x20(%rsp)
  movsd  %xmm1,0x18(%rsp)
  call   <sqrt@plt>
  movsd  0x18(%rsp),%xmm1
  movapd %xmm0,%xmm2
  xorpd  D25(%rip),%xmm2
  movq   %r14,%xmm0
  call   <rq_pricing_cumul_bivar_norm_dist@plt>
  mulsd  0x48(%rsp),%xmm0
  addsd  0x10(%rsp),%xmm0
  movq   %xmm0,%r14
  movsd  0x58(%rsp),%xmm0
  mulsd  0x40(%rsp),%xmm0
  call   <exp@plt>
  movsd  0x28(%rsp),%xmm8
  movsd  0x20(%rsp),%xmm3
  mulsd  %xmm8,%xmm0
  movsd  %xmm8,0x18(%rsp)
  movsd  %xmm0,0x10(%rsp)
  movapd %xmm3,%xmm0
  call   <sqrt@plt>
  movsd  0x18(%rsp),%xmm8
  movapd %xmm0,%xmm3
  jmp    L90
```

tool_calls: name: parse_data
arguments: tag: D25
type: byte[16]
name: parse_data
arguments: tag: D42
type: f64
name: parse_data
arguments: tag: D27
type: f64[2]
name: parse_data
arguments: tag: D106
type: f64
name: parse_data
arguments: tag: D145
type: qword[2]
name: parse_data
arguments: tag: D44
type: f64

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

tool: D42: 1

tool: {"D27": [100000000.0,0.5]}

tool: D106: 0.5

tool: {"D145": [0x7fffffffffffffff,0x0000000000000000]}

tool: D44: 1e-05

assistant: ```c
double rq_pricing_roll_geske_whaley(double S, double X, double t1, double tau_e, double r, double d, double v) {
  double Sx = S - d * exp(-r * t1);
  double I;
  double a1;
  double a2;
  double b1;
  double b2;
  double high_S;
  double low_S;
  double epsilon = 0.00001;
  double ci;
  double infinity = 100000000;
  if (d <= X * (1.0 - exp(-r * (tau_e - t1))))
    return rq_pricing_blackscholes_gen(1, Sx, X, tau_e, r, 0, v);
  ci = rq_pricing_blackscholes_gen(1, S, X, tau_e - t1, r, 0, v);
  high_S = S;
  while ((ci - high_S - d + X) > 0 && high_S < infinity) {
    high_S = high_S * 2;
    ci = rq_pricing_blackscholes_gen(1, high_S, X, tau_e - t1, r, 0, v);
  }
  if (high_S > infinity)
    return rq_pricing_blackscholes_gen(1, Sx, X, tau_e, r, 0, v);
  low_S = 0;
  I = high_S * 0.5;
  ci = rq_pricing_blackscholes_gen(1, I, X, tau_e - t1, r, 0, v);
  while (fabs(ci - I - d + X) > epsilon && high_S - low_S > epsilon) {
    if ((ci - I - d + X) < 0)
      high_S = I;
    else
      low_S = I;
    I = (high_S + low_S) / 2;
    ci = rq_pricing_blackscholes_gen(1, I, X, tau_e - t1, r, 0, v);
  }
  a1 = (log(Sx / X) + (r + pow(v, 2) / 2) * tau_e) / (v * sqrt(tau_e));
  a2 = a1 - v * sqrt(tau_e);
  b1 = (log(Sx / I) + (r + pow(v, 2) / 2) * t1) / (v * sqrt(t1));
  b2 = b1 - v * sqrt(t1);
  return Sx * rq_pricing_cumul_norm_dist(b1) + Sx * rq_pricing_cumul_bivar_norm_dist(a1, -b1, -sqrt(t1 / tau_e)) - X * exp(-r * tau_e) * rq_pricing_cumul_bivar_norm_dist(a2, -b2, -sqrt(t1 / tau_e)) - (X - d) * exp(-r * t1) * rq_pricing_cumul_norm_dist(b2);
}
```