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

```asm
<merton73>:
  endbr64
  push   %r15
  push   %r14
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,%ebx
  movsd  %xmm0,0x28(%rsp)
  movsd  %xmm1,0x18(%rsp)
  movsd  %xmm2,0x8(%rsp)
  movsd  %xmm3,0x20(%rsp)
  movq   %xmm4,%r14
  movsd  %xmm5,0x10(%rsp)
  ucomisd %xmm0,%xmm0
  mov    $0x0,%edi
  jp     L11
  movapd %xmm0,%xmm5
  mov    $0x0,%edi
  comisd D54(%rip),%xmm0
  jb     L11
  movsd  D104(%rip),%xmm0
  comisd %xmm5,%xmm0
  setae  %dil
  movzbl %dil,%edi
L11:
  mov    $0x0,%eax
  call   <assert@plt>
  movsd  0x18(%rsp),%xmm2
  ucomisd %xmm2,%xmm2
  mov    $0x0,%edi
  jp     L51
  mov    $0x0,%edi
  comisd D54(%rip),%xmm2
  jb     L51
  movsd  D104(%rip),%xmm0
  comisd %xmm2,%xmm0
  setae  %dil
  movzbl %dil,%edi
L51:
  mov    $0x0,%eax
  call   <assert@plt>
  movsd  0x8(%rsp),%xmm4
  ucomisd %xmm4,%xmm4
  mov    $0x0,%edi
  jp     L32
  mov    $0x0,%edi
  comisd D115(%rip),%xmm4
  jb     L32
  movsd  D7(%rip),%xmm0
  comisd %xmm4,%xmm0
  setae  %dil
  movzbl %dil,%edi
L32:
  mov    $0x0,%eax
  call   <assert@plt>
  movsd  0x20(%rsp),%xmm1
  ucomisd %xmm1,%xmm1
  mov    $0x0,%edi
  jp     L79
  mov    $0x0,%edi
  comisd D132(%rip),%xmm1
  jb     L79
  movsd  D112(%rip),%xmm0
  comisd %xmm1,%xmm0
  setae  %dil
  movzbl %dil,%edi
L79:
  mov    $0x0,%eax
  call   <assert@plt>
  movsd  0x10(%rsp),%xmm5
  ucomisd %xmm5,%xmm5
  mov    $0x0,%edi
  jp     L47
  mov    $0x0,%edi
  comisd D8(%rip),%xmm5
  jb     L47
  movsd  D150(%rip),%xmm0
  comisd %xmm5,%xmm0
  setae  %dil
  movzbl %dil,%edi
L47:
  mov    $0x0,%eax
  call   <assert@plt>
  movsd  0x28(%rsp),%xmm0
  divsd  0x18(%rsp),%xmm0
  call   <log@plt>
  movapd %xmm0,%xmm1
  movsd  0x10(%rsp),%xmm6
  movapd %xmm6,%xmm0
  mulsd  %xmm6,%xmm0
  mulsd  D52(%rip),%xmm0
  movsd  0x20(%rsp),%xmm2
  movq   %r14,%xmm3
  subsd  %xmm3,%xmm2
  addsd  %xmm2,%xmm0
  movsd  0x8(%rsp),%xmm7
  mulsd  %xmm7,%xmm0
  movapd %xmm0,%xmm3
  addsd  %xmm1,%xmm3
  movq   %xmm3,%r15
  pxor   %xmm0,%xmm0
  ucomisd %xmm7,%xmm0
  ja     L36
  sqrtsd %xmm7,%xmm7
  movapd %xmm7,%xmm0
  mulsd  %xmm7,%xmm6
  divsd  %xmm6,%xmm3
  movq   %xmm3,%r15
L20:
  mulsd  0x10(%rsp),%xmm0
  movq   %r15,%xmm4
  subsd  %xmm0,%xmm4
  movq   %xmm4,%rbp
  test   %ebx,%ebx
  je     L108
  movq   %r14,%xmm7
  xorpd  D28(%rip),%xmm7
  movapd %xmm7,%xmm0
  mulsd  0x8(%rsp),%xmm0
  call   <exp@plt>
  movapd %xmm0,%xmm1
  mulsd  0x28(%rsp),%xmm1
  movsd  %xmm1,0x10(%rsp)
  movq   %r15,%xmm0
  mov    $0x1,%eax
  call   <cnd@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movapd %xmm0,%xmm7
  mulsd  0x10(%rsp),%xmm7
  movq   %xmm7,%rbx
  movsd  0x20(%rsp),%xmm6
  xorpd  D28(%rip),%xmm6
  movapd %xmm6,%xmm0
  mulsd  0x8(%rsp),%xmm0
  call   <exp@plt>
  movapd %xmm0,%xmm2
  mulsd  0x18(%rsp),%xmm2
  movsd  %xmm2,0x8(%rsp)
  movq   %rbp,%xmm0
  mov    $0x1,%eax
  call   <cnd@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x8(%rsp),%xmm0
  movq   %rbx,%xmm4
  subsd  %xmm0,%xmm4
  movsd  %xmm4,0x8(%rsp)
L130:
  movsd  0x8(%rsp),%xmm3
  ucomisd %xmm3,%xmm3
  setnp  %dil
  movzbl %dil,%edi
  mov    $0x0,%eax
  call   <assert@plt>
  movsd  0x8(%rsp),%xmm0
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r14
  pop    %r15
  ret
L36:
  movsd  0x8(%rsp),%xmm0
  call   <sqrt@plt>
  mulsd  0x10(%rsp),%xmm0
  movq   %r15,%xmm4
  divsd  %xmm0,%xmm4
  movq   %xmm4,%r15
  movsd  0x8(%rsp),%xmm0
  call   <sqrt@plt>
  jmp    L20
L108:
  movsd  0x20(%rsp),%xmm0
  xorpd  D28(%rip),%xmm0
  mulsd  0x8(%rsp),%xmm0
  call   <exp@plt>
  mulsd  0x18(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsp)
  movq   %rbp,%xmm6
  xorpd  D28(%rip),%xmm6
  movapd %xmm6,%xmm0
  mov    $0x1,%eax
  call   <cnd@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movapd %xmm0,%xmm4
  mulsd  0x10(%rsp),%xmm4
  movq   %xmm4,%rbx
  movq   %r14,%xmm0
  xorpd  D28(%rip),%xmm0
  mulsd  0x8(%rsp),%xmm0
  call   <exp@plt>
  mulsd  0x28(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  movq   %r15,%xmm7
  xorpd  D28(%rip),%xmm7
  movapd %xmm7,%xmm0
  mov    $0x1,%eax
  call   <cnd@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x8(%rsp),%xmm0
  movq   %rbx,%xmm5
  subsd  %xmm0,%xmm5
  movsd  %xmm5,0x8(%rsp)
  jmp    L130
```

tool_calls: name: read_data
arguments: data_label: D54
type: f64[2]
name: read_data
arguments: data_label: D104
type: f64
name: read_data
arguments: data_label: D115
type: byte[16]
name: read_data
arguments: data_label: D7
type: f64
name: read_data
arguments: data_label: D132
type: f64
name: read_data
arguments: data_label: D112
type: f64
name: read_data
arguments: data_label: D8
type: f64[2]
name: read_data
arguments: data_label: D150
type: f64
name: read_data
arguments: data_label: D52
type: byte[8]
name: read_data
arguments: data_label: D28
type: byte[16]

tool: {"D54": [1e-6,1000000000000.0]}

tool: D104: 1000000000000

tool: {"D115": [0xce,0xd2,0x29,0x9c,0x17,0x96,0x25,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x34,0x40]}

tool: D7: 20

tool: D132: 0

tool: D112: 1000

tool: {"D8": [1e-7,100.99999]}

tool: D150: 100.99999

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

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

assistant: ```c
double merton73(int fCall, double S, double X, double T, double r, double q, double v) {
  double d1, d2, result;
  assert(((S) == (S)) && (S) >= 0.000001 && (S) <= 1000000000000.0);
  assert(((X) == (X)) && (X) >= 0.000001 && (X) <= 1000000000000.0);
  assert(((T) == (T)) && (T) >= (1.0 / (253.0 * 24.0)) && (T) <= (20.0));
  assert(((r) == (r)) && (r) >= 0.0 && (r) <= 1000.0);
  assert(((v) == (v)) && (v) >= 0.0000001 && v <= 100.99999);
  d1 = (log(S / X) + (r - q + ((v) * (v)) / 2.0) * T) / (v * sqrt(T));
  d2 = d1 - v * sqrt(T);
  if (fCall)
    result = S * exp(-q * T) * cnd(d1) - X * exp(-r * T) * cnd(d2);
  else
    result = X * exp(-r * T) * cnd(-d2) - S * exp(-q * T) * cnd(-d1);
  assert(((result) == (result)));
  return result;
}
```