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

```asm
<rq_pricing_swaption>:
  endbr64
  push   %r15
  movq   %xmm5,%r15
  push   %r14
  movq   %xmm0,%r14
  push   %rbx
  mov    %edi,%ebx
  sub    $0x40,%rsp
  movsd  %xmm2,0x8(%rsp)
  divsd  %xmm3,%xmm2
  movsd  %xmm1,0x28(%rsp)
  movsd  %xmm4,0x20(%rsp)
  movsd  %xmm6,0x10(%rsp)
  movsd  %xmm3,0x18(%rsp)
  movapd %xmm2,%xmm0
  call   <log@plt>
  movsd  0x10(%rsp),%xmm6
  movsd  0x20(%rsp),%xmm4
  movsd  0x28(%rsp),%xmm1
  movapd %xmm6,%xmm2
  mulsd  %xmm6,%xmm2
  mulsd  D0(%rip),%xmm2
  mulsd  %xmm4,%xmm2
  addsd  %xmm0,%xmm2
  pxor   %xmm0,%xmm0
  ucomisd %xmm4,%xmm0
  ja     L7
  movapd %xmm4,%xmm0
  sqrtsd %xmm0,%xmm0
  mulsd  %xmm0,%xmm6
  divsd  %xmm6,%xmm2
L26:
  movsd  0x8(%rsp),%xmm3
  movapd %xmm2,%xmm5
  movq   %r15,%xmm7
  movq   %r14,%xmm0
  subsd  %xmm6,%xmm5
  mulsd  %xmm1,%xmm0
  movsd  %xmm4,0x38(%rsp)
  movsd  %xmm2,0x30(%rsp)
  movsd  %xmm5,0x28(%rsp)
  divsd  %xmm1,%xmm3
  addsd  D23(%rip),%xmm3
  cvttsd2si %xmm3,%edi
  movq   D13(%rip),%xmm3
  xorpd  %xmm3,%xmm7
  movsd  %xmm7,0x10(%rsp)
  test   %bx,%bx
  je     L16
  call   <pow@plt>
  pxor   %xmm0,%xmm0
  movsd  0x38(%rsp),%xmm4
  mov    %eax,%r8d
  mov    $0xffffffff,%eax
  cltd
  idiv   %r8d
  add    $0x1,%eax
  cvtsi2sd %eax,%xmm0
  movapd %xmm0,%xmm5
  movsd  0x10(%rsp),%xmm0
  divsd  0x8(%rsp),%xmm5
  movsd  %xmm5,0x20(%rsp)
  mulsd  %xmm4,%xmm0
  call   <exp@plt>
  pxor   %xmm0,%xmm0
  movsd  0x30(%rsp),%xmm2
  cvtsi2sd %eax,%xmm0
  mulsd  0x20(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsp)
  movapd %xmm2,%xmm0
  call   <rq_pricing_cumul_norm_dist@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  0x28(%rsp),%xmm5
  mulsd  %xmm0,%xmm1
  movapd %xmm5,%xmm0
  movsd  %xmm1,0x8(%rsp)
  call   <rq_pricing_cumul_norm_dist@plt>
  movsd  0x18(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm1
  mulsd  %xmm0,%xmm2
  movsd  0x10(%rsp),%xmm0
  add    $0x40,%rsp
  pop    %rbx
  pop    %r14
  pop    %r15
  subsd  %xmm2,%xmm1
  mulsd  %xmm1,%xmm0
  ret
L16:
  call   <pow@plt>
  movsd  0x38(%rsp),%xmm4
  movsd  0x10(%rsp),%xmm5
  pxor   %xmm0,%xmm0
  mov    %eax,%r8d
  mov    $0xffffffff,%eax
  mulsd  %xmm4,%xmm5
  cltd
  idiv   %r8d
  add    $0x1,%eax
  cvtsi2sd %eax,%xmm0
  divsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x20(%rsp)
  movapd %xmm5,%xmm0
  call   <exp@plt>
  pxor   %xmm0,%xmm0
  movsd  0x20(%rsp),%xmm4
  movsd  0x28(%rsp),%xmm5
  cvtsi2sd %eax,%xmm0
  movq   D13(%rip),%xmm3
  xorpd  %xmm3,%xmm5
  mulsd  %xmm0,%xmm4
  movapd %xmm5,%xmm0
  movsd  %xmm4,0x10(%rsp)
  call   <rq_pricing_cumul_norm_dist@plt>
  movsd  0x18(%rsp),%xmm1
  movsd  0x30(%rsp),%xmm2
  movq   D13(%rip),%xmm3
  mulsd  %xmm0,%xmm1
  movapd %xmm2,%xmm0
  xorpd  %xmm3,%xmm0
  movsd  %xmm1,0x18(%rsp)
  call   <rq_pricing_cumul_norm_dist@plt>
  movsd  0x8(%rsp),%xmm2
  movsd  0x18(%rsp),%xmm1
  mulsd  %xmm0,%xmm2
  movsd  0x10(%rsp),%xmm0
  add    $0x40,%rsp
  pop    %rbx
  pop    %r14
  pop    %r15
  subsd  %xmm2,%xmm1
  mulsd  %xmm1,%xmm0
  ret
L7:
  movapd %xmm4,%xmm0
  movsd  %xmm1,0x30(%rsp)
  movsd  %xmm6,0x28(%rsp)
  movsd  %xmm2,0x20(%rsp)
  movsd  %xmm4,0x10(%rsp)
  call   <sqrt@plt>
  movsd  0x28(%rsp),%xmm6
  movsd  0x20(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm4
  mulsd  %xmm6,%xmm0
  divsd  %xmm0,%xmm2
  movapd %xmm4,%xmm0
  movsd  %xmm2,0x20(%rsp)
  call   <sqrt@plt>
  movsd  0x28(%rsp),%xmm6
  movsd  0x30(%rsp),%xmm1
  movsd  0x20(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm4
  mulsd  %xmm0,%xmm6
  jmp    L26
```

tool_calls: name: retrieve_data
arguments: data_label: D0
data_type: f32[2]
name: retrieve_data
arguments: data_label: D23
data_type: f32[2]
name: retrieve_data
arguments: data_label: D13
data_type: f32[2]

tool: {"D0": [0.0,1.75]}

tool: {"D23": [0.0,1.875]}

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

assistant: ```c
double rq_pricing_swaption(short call, double t1, double m, double F, double X, double T, double r, double v) {
  double d1;
  double d2;
  double ret = 0.0;
  d1 = (log(F / X) + (v * v) / 2 * T) / (v * sqrt(T));
  d2 = d1 - v * sqrt(T);
  if (call)
    ret = ((1 - 1 / pow((1 + F / m), (t1 * m))) / F) * exp(-r * T) * (F * rq_pricing_cumul_norm_dist(d1) - X * rq_pricing_cumul_norm_dist(d2));
  else
    ret = ((1 - 1 / pow((1 + F / m), (t1 * m))) / F) * exp(-r * T) * (X * rq_pricing_cumul_norm_dist(-d2) - F * rq_pricing_cumul_norm_dist(-d1));
  return ret;
}
```