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

```asm
<FixedStrikeLookback>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %edi,%r12d
  movsd  %xmm0,0x8(%rsp)
  movq   %xmm1,%rbp
  movsd  %xmm2,0x48(%rsp)
  movsd  %xmm3,0x18(%rsp)
  movsd  %xmm4,(%rsp)
  movq   %xmm5,%rbx
  movsd  %xmm6,0x10(%rsp)
  movsd  %xmm7,0x40(%rsp)
  pxor   %xmm0,%xmm0
  ucomisd %xmm4,%xmm0
  ja     L5
  sqrtsd %xmm4,%xmm4
  movsd  %xmm4,0x28(%rsp)
L29:
  movsd  0x40(%rsp),%xmm4
  movapd %xmm4,%xmm3
  mulsd  0x28(%rsp),%xmm3
  movsd  %xmm3,0x30(%rsp)
  movapd %xmm4,%xmm2
  mulsd  %xmm4,%xmm2
  movsd  %xmm2,0x38(%rsp)
  movq   %rbx,%xmm0
  xorpd  D23(%rip),%xmm0
  mulsd  (%rsp),%xmm0
  call   <exp@plt>
  movsd  %xmm0,0x20(%rsp)
  movsd  (%rsp),%xmm0
  mulsd  0x10(%rsp),%xmm0
  call   <exp@plt>
  movq   %xmm0,%r14
  movsd  0x10(%rsp),%xmm6
  movq   %rbx,%xmm7
  subsd  %xmm7,%xmm6
  movapd %xmm6,%xmm0
  mulsd  (%rsp),%xmm0
  call   <exp@plt>
  movq   %xmm0,%rbx
  test   %r12d,%r12d
  jne    L60
  movsd  0x8(%rsp),%xmm7
  divsd  0x18(%rsp),%xmm7
  movapd %xmm7,%xmm0
  movq   %xmm7,%r15
  call   <log@plt>
  movq   %xmm0,%r13
  movsd  0x38(%rsp),%xmm0
  mulsd  D113(%rip),%xmm0
  addsd  0x10(%rsp),%xmm0
  mulsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  movsd  0x8(%rsp),%xmm7
  movq   %rbp,%xmm6
  divsd  %xmm6,%xmm7
  movq   %xmm7,%r12
  movapd %xmm7,%xmm0
  call   <log@plt>
  movq   %rbp,%xmm1
  comisd 0x18(%rsp),%xmm1
  ja     L9
  addsd  (%rsp),%xmm0
  movapd %xmm0,%xmm5
  divsd  0x30(%rsp),%xmm5
  movsd  0x18(%rsp),%xmm0
  movq   %rbp,%xmm4
  subsd  %xmm4,%xmm0
  movapd %xmm0,%xmm6
  mulsd  0x20(%rsp),%xmm6
  movq   %xmm6,%r13
  movq   %rbx,%xmm7
  mulsd  0x8(%rsp),%xmm7
  movsd  %xmm7,0x18(%rsp)
  movsd  %xmm5,(%rsp)
  movapd %xmm5,%xmm6
  xorpd  D23(%rip),%xmm6
  movq   %xmm6,%rbx
  movapd %xmm6,%xmm0
  call   <cnd@plt>
  mulsd  0x18(%rsp),%xmm0
  movq   %r13,%xmm7
  subsd  %xmm0,%xmm7
  movsd  %xmm7,0x18(%rsp)
  movq   %rbp,%xmm4
  mulsd  0x20(%rsp),%xmm4
  movsd  %xmm4,0x48(%rsp)
  movsd  0x30(%rsp),%xmm1
  subsd  (%rsp),%xmm1
  movapd %xmm1,%xmm0
  call   <cnd@plt>
  mulsd  0x48(%rsp),%xmm0
  movapd %xmm0,%xmm1
  addsd  0x18(%rsp),%xmm1
  movsd  %xmm1,0x18(%rsp)
  movsd  0x10(%rsp),%xmm3
  addsd  %xmm3,%xmm3
  movsd  0x20(%rsp),%xmm0
  movsd  0x38(%rsp),%xmm7
  mulsd  %xmm7,%xmm0
  divsd  %xmm3,%xmm0
  mulsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  movapd %xmm3,%xmm1
  xorpd  D23(%rip),%xmm1
  divsd  %xmm7,%xmm1
  movq   %r12,%xmm0
  call   <pow@plt>
  movq   %xmm0,%r15
  movsd  0x8(%rsp),%xmm0
  divsd  0x40(%rsp),%xmm0
  mulsd  0x28(%rsp),%xmm0
  subsd  (%rsp),%xmm0
  call   <cnd@plt>
  movq   %r15,%xmm6
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%rsp)
  movq   %rbx,%xmm0
  call   <cnd@plt>
  movq   %r14,%xmm3
  mulsd  %xmm0,%xmm3
  movsd  (%rsp),%xmm0
  subsd  %xmm3,%xmm0
  mulsd  0x10(%rsp),%xmm0
  addsd  0x18(%rsp),%xmm0
  jmp    L42
L5:
  movsd  (%rsp),%xmm0
  call   <sqrt@plt>
  movsd  %xmm0,0x28(%rsp)
  jmp    L29
L15:
  movq   %rbp,%xmm0
  addsd  (%rsp),%xmm0
  divsd  0x30(%rsp),%xmm0
  movq   %xmm0,%rbp
  movq   %rbx,%xmm3
  mulsd  0x8(%rsp),%xmm3
  movsd  %xmm3,(%rsp)
  call   <cnd@plt>
  mulsd  (%rsp),%xmm0
  movq   %xmm0,%rbx
  movsd  0x18(%rsp),%xmm5
  mulsd  0x20(%rsp),%xmm5
  movsd  %xmm5,(%rsp)
  movq   %rbp,%xmm6
  subsd  0x30(%rsp),%xmm6
  movapd %xmm6,%xmm0
  call   <cnd@plt>
  mulsd  (%rsp),%xmm0
  movq   %rbx,%xmm2
  subsd  %xmm0,%xmm2
  movsd  %xmm2,(%rsp)
  movsd  0x10(%rsp),%xmm5
  addsd  %xmm5,%xmm5
  movsd  0x20(%rsp),%xmm0
  mulsd  0x8(%rsp),%xmm0
  movsd  0x38(%rsp),%xmm7
  mulsd  %xmm7,%xmm0
  divsd  %xmm5,%xmm0
  movsd  %xmm0,0x10(%rsp)
  movsd  %xmm5,0x8(%rsp)
  movapd %xmm5,%xmm1
  xorpd  D23(%rip),%xmm1
  divsd  %xmm7,%xmm1
  movq   %r13,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rbx
  movsd  0x8(%rsp),%xmm0
  divsd  0x40(%rsp),%xmm0
  mulsd  0x28(%rsp),%xmm0
  movq   %rbp,%xmm3
  subsd  %xmm0,%xmm3
  movapd %xmm3,%xmm0
  call   <cnd@plt>
  movq   %rbx,%xmm6
  xorpd  D23(%rip),%xmm6
  movapd %xmm6,%xmm5
  mulsd  %xmm0,%xmm5
  movsd  %xmm5,0x8(%rsp)
  movq   %rbp,%xmm0
  call   <cnd@plt>
  movq   %r14,%xmm3
  mulsd  %xmm3,%xmm0
  addsd  0x8(%rsp),%xmm0
  mulsd  0x10(%rsp),%xmm0
  addsd  (%rsp),%xmm0
L42:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L9:
  movq   %r13,%xmm0
  addsd  (%rsp),%xmm0
  movapd %xmm0,%xmm7
  divsd  0x30(%rsp),%xmm7
  movsd  0x8(%rsp),%xmm6
  xorpd  D23(%rip),%xmm6
  movq   %rbx,%xmm1
  mulsd  %xmm6,%xmm1
  movsd  %xmm1,0x48(%rsp)
  movsd  %xmm7,(%rsp)
  movapd %xmm7,%xmm5
  xorpd  D23(%rip),%xmm5
  movq   %xmm5,%rbx
  movapd %xmm5,%xmm0
  call   <cnd@plt>
  movapd %xmm0,%xmm2
  mulsd  0x48(%rsp),%xmm2
  movsd  %xmm2,0x48(%rsp)
  movsd  0x18(%rsp),%xmm4
  mulsd  0x20(%rsp),%xmm4
  movsd  %xmm4,0x18(%rsp)
  movsd  0x30(%rsp),%xmm0
  subsd  (%rsp),%xmm0
  call   <cnd@plt>
  mulsd  0x18(%rsp),%xmm0
  movapd %xmm0,%xmm1
  addsd  0x48(%rsp),%xmm1
  movsd  %xmm1,0x18(%rsp)
  movsd  0x10(%rsp),%xmm2
  addsd  %xmm2,%xmm2
  movsd  0x20(%rsp),%xmm0
  mulsd  0x8(%rsp),%xmm0
  movsd  0x38(%rsp),%xmm6
  mulsd  %xmm6,%xmm0
  divsd  %xmm2,%xmm0
  movsd  %xmm0,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  movapd %xmm2,%xmm1
  xorpd  D23(%rip),%xmm1
  divsd  %xmm6,%xmm1
  movq   %r15,%xmm0
  call   <pow@plt>
  movq   %xmm0,%r15
  movsd  0x8(%rsp),%xmm0
  divsd  0x40(%rsp),%xmm0
  mulsd  0x28(%rsp),%xmm0
  subsd  (%rsp),%xmm0
  call   <cnd@plt>
  movq   %r15,%xmm3
  mulsd  %xmm3,%xmm0
  movsd  %xmm0,(%rsp)
  movq   %rbx,%xmm0
  call   <cnd@plt>
  movq   %r14,%xmm3
  mulsd  %xmm0,%xmm3
  movsd  (%rsp),%xmm0
  subsd  %xmm3,%xmm0
  mulsd  0x10(%rsp),%xmm0
  addsd  0x18(%rsp),%xmm0
  jmp    L42
L60:
  movsd  0x8(%rsp),%xmm3
  divsd  0x18(%rsp),%xmm3
  movq   %xmm3,%r13
  movapd %xmm3,%xmm0
  call   <log@plt>
  movq   %xmm0,%rbp
  movsd  0x38(%rsp),%xmm0
  mulsd  D113(%rip),%xmm0
  addsd  0x10(%rsp),%xmm0
  mulsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  movsd  0x8(%rsp),%xmm3
  divsd  0x48(%rsp),%xmm3
  movq   %xmm3,%r12
  movapd %xmm3,%xmm0
  call   <log@plt>
  movsd  0x18(%rsp),%xmm1
  comisd 0x48(%rsp),%xmm1
  ja     L15
  addsd  (%rsp),%xmm0
  divsd  0x30(%rsp),%xmm0
  movq   %xmm0,%rbp
  movsd  0x48(%rsp),%xmm0
  subsd  0x18(%rsp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  0x20(%rsp),%xmm2
  movsd  %xmm2,(%rsp)
  movq   %rbx,%xmm3
  mulsd  0x8(%rsp),%xmm3
  movsd  %xmm3,0x18(%rsp)
  movq   %rbp,%xmm0
  call   <cnd@plt>
  mulsd  0x18(%rsp),%xmm0
  movapd %xmm0,%xmm7
  addsd  (%rsp),%xmm7
  movq   %xmm7,%rbx
  movsd  0x48(%rsp),%xmm0
  mulsd  0x20(%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  movq   %rbp,%xmm2
  subsd  0x30(%rsp),%xmm2
  movapd %xmm2,%xmm0
  call   <cnd@plt>
  mulsd  (%rsp),%xmm0
  movq   %rbx,%xmm3
  subsd  %xmm0,%xmm3
  movsd  %xmm3,(%rsp)
  movsd  0x10(%rsp),%xmm6
  addsd  %xmm6,%xmm6
  movsd  0x20(%rsp),%xmm0
  mulsd  0x8(%rsp),%xmm0
  movsd  0x38(%rsp),%xmm5
  mulsd  %xmm5,%xmm0
  divsd  %xmm6,%xmm0
  movsd  %xmm0,0x10(%rsp)
  movsd  %xmm6,0x8(%rsp)
  movapd %xmm6,%xmm1
  xorpd  D23(%rip),%xmm1
  divsd  %xmm5,%xmm1
  movq   %r12,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rbx
  movsd  0x8(%rsp),%xmm0
  divsd  0x40(%rsp),%xmm0
  mulsd  0x28(%rsp),%xmm0
  movq   %rbp,%xmm1
  subsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  call   <cnd@plt>
  movq   %rbx,%xmm7
  xorpd  D23(%rip),%xmm7
  movapd %xmm7,%xmm4
  mulsd  %xmm0,%xmm4
  movsd  %xmm4,0x8(%rsp)
  movq   %rbp,%xmm0
  call   <cnd@plt>
  movq   %r14,%xmm5
  mulsd  %xmm5,%xmm0
  addsd  0x8(%rsp),%xmm0
  mulsd  0x10(%rsp),%xmm0
  addsd  (%rsp),%xmm0
  jmp    L42
```

tool_calls: name: disassemble_data
arguments: tag: D23
type: byte[16]
name: disassemble_data
arguments: tag: D113
type: byte[8]

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

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

assistant: ```c
double FixedStrikeLookback(int fCall, double S, double SMin, double SMax, double X, double T, double r, double b, double v) {
  double sT, vsT, vv, erT, ebT, ebrT, m, d1, d2, e1, e2, result;
  sT = sqrt(T);
  vsT = v * sT;
  vv = v * v;
  erT = exp(-r * T);
  ebT = exp(b * T);
  ebrT = exp((b - r) * T);
  if (fCall)
    m = SMax;
  else
    m = SMin;
  d1 = (log(S / X) + (b + vv / 2.0) * T) / (vsT);
  d2 = d1 - vsT;
  e1 = (log(S / m) + (b + vv / 2.0) * T) / (vsT);
  e2 = e1 - vsT;
  if (fCall) {
    if (X > m) {
      result = S * ebrT * cnd(d1) - X * erT * cnd(d2) + S * erT * vv / (2.0 * b) * (-pow((S / X), (-2.0 * b / vv)) * cnd(d1 - 2.0 * b / v * sT) + ebT * cnd(d1));
    } else {
      result = erT * (m - X) + S * ebrT * cnd(e1) - erT * m * cnd(e2) + S * erT * vv / (2.0 * b) * (-pow((S / m), (-2.0 * b / vv)) * cnd(e1 - 2.0 * b / v * sT) + ebT * cnd(e1));
    }
  } else {
    if (X < m) {
      result = -S * ebrT * cnd(-d1) + X * erT * cnd(-d1 + v * sT) + S * erT * vv / (2.0 * b) * (pow((S / X), (-2.0 * b / vv)) * cnd(-d1 + 2.0 * b / v * sT) - ebT * cnd(-d1));
    } else {
      result = erT * (X - m) - S * ebrT * cnd(-e1) + erT * m * cnd(-e1 + vsT) + erT * vv / (2.0 * b) * S * (pow((S / m), (-2.0 * b / vv)) * cnd(-e1 + 2.0 * b / v * sT) - ebT * cnd(-e1));
    }
  }
  return result;
}
```