user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<phi>:
  endbr64
  push   %rbx
  movq   %xmm4,%rbx
  sub    $0x40,%rsp
  ucomisd %xmm0,%xmm0
  movsd  %xmm0,0x8(%rsp)
  movsd  %xmm1,(%rsp)
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm3,0x28(%rsp)
  movsd  %xmm5,0x20(%rsp)
  movsd  %xmm6,0x30(%rsp)
  movsd  %xmm7,0x18(%rsp)
  jp     L98
  comisd D12(%rip),%xmm0
  movapd %xmm0,%xmm4
  jae    L114
L98:
  xor    %edi,%edi
L99:
  call   <assert@plt>
  movsd  (%rsp),%xmm4
  ucomisd %xmm4,%xmm4
  jp     L15
  comisd D40(%rip),%xmm4
  jae    L19
L15:
  xor    %edi,%edi
L132:
  call   <assert@plt>
  movsd  0x20(%rsp),%xmm5
  ucomisd %xmm5,%xmm5
  jp     L94
  pxor   %xmm7,%xmm7
  xor    %edi,%edi
  comisd %xmm7,%xmm5
  movsd  %xmm7,0x38(%rsp)
  jb     L61
  movsd  D87(%rip),%xmm0
  xor    %edi,%edi
  comisd %xmm5,%xmm0
  setae  %dil
L61:
  call   <assert@plt>
  movsd  0x18(%rsp),%xmm5
  ucomisd %xmm5,%xmm5
  jp     L103
  comisd D51(%rip),%xmm5
  jae    L31
L103:
  xor    %edi,%edi
L85:
  call   <assert@plt>
  movsd  0x38(%rsp),%xmm2
  movsd  (%rsp),%xmm6
  ucomisd %xmm6,%xmm2
  ja     L22
  sqrtsd %xmm6,%xmm6
  movapd %xmm6,%xmm0
L9:
  movsd  0x18(%rsp),%xmm3
  mulsd  %xmm3,%xmm0
  mulsd  %xmm3,%xmm3
  movsd  %xmm0,0x18(%rsp)
  movsd  0x8(%rsp),%xmm0
  divsd  0x28(%rsp),%xmm0
  movsd  %xmm3,0x38(%rsp)
  call   <log@plt>
  movsd  0x10(%rsp),%xmm7
  movsd  D32(%rip),%xmm2
  movapd %xmm0,%xmm1
  movsd  0x38(%rsp),%xmm3
  movsd  0x30(%rsp),%xmm8
  movapd %xmm7,%xmm0
  movsd  (%rsp),%xmm9
  subsd  %xmm2,%xmm0
  mulsd  %xmm7,%xmm2
  mulsd  %xmm3,%xmm0
  addsd  %xmm8,%xmm0
  mulsd  %xmm9,%xmm0
  addsd  %xmm1,%xmm0
  xorpd  D2(%rip),%xmm0
  movapd %xmm7,%xmm1
  addsd  %xmm7,%xmm1
  movapd %xmm0,%xmm5
  divsd  0x18(%rsp),%xmm5
  movsd  %xmm5,(%rsp)
  movapd %xmm8,%xmm5
  addsd  %xmm8,%xmm5
  movapd %xmm5,%xmm0
  movsd  D24(%rip),%xmm5
  divsd  %xmm3,%xmm0
  subsd  %xmm5,%xmm1
  movapd %xmm0,%xmm6
  movapd %xmm2,%xmm0
  movapd %xmm8,%xmm2
  addsd  %xmm1,%xmm6
  mulsd  %xmm7,%xmm2
  movapd %xmm7,%xmm1
  subsd  %xmm5,%xmm1
  subsd  0x20(%rsp),%xmm2
  movsd  %xmm6,0x30(%rsp)
  mulsd  %xmm1,%xmm0
  mulsd  %xmm3,%xmm0
  addsd  %xmm2,%xmm0
  mulsd  %xmm9,%xmm0
  call   <exp@plt>
  movsd  0x10(%rsp),%xmm1
  movsd  %xmm0,0x20(%rsp)
  movsd  0x8(%rsp),%xmm0
  call   <pow@plt>
  movsd  0x20(%rsp),%xmm7
  mulsd  %xmm0,%xmm7
  movsd  (%rsp),%xmm0
  movsd  %xmm7,0x10(%rsp)
  call   <cnd@plt>
  movsd  0x30(%rsp),%xmm4
  movq   %rbx,%xmm3
  divsd  0x8(%rsp),%xmm3
  movsd  %xmm0,0x28(%rsp)
  movapd %xmm3,%xmm0
  movapd %xmm4,%xmm1
  movsd  %xmm3,0x20(%rsp)
  call   <pow@plt>
  movsd  0x20(%rsp),%xmm3
  movsd  %xmm0,0x8(%rsp)
  movapd %xmm3,%xmm0
  call   <log@plt>
  movsd  (%rsp),%xmm1
  addsd  %xmm0,%xmm0
  divsd  0x18(%rsp),%xmm0
  subsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  call   <cnd@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  0x28(%rsp),%xmm2
  mulsd  %xmm0,%xmm1
  movsd  0x10(%rsp),%xmm0
  add    $0x40,%rsp
  pop    %rbx
  subsd  %xmm1,%xmm2
  mulsd  %xmm2,%xmm0
  ret
  nopw   0x0(%rax,%rax,1)
L94:
  pxor   %xmm2,%xmm2
  xor    %edi,%edi
  movsd  %xmm2,0x38(%rsp)
  jmp    L61
  nopl   0x0(%rax)
L19:
  movsd  D68(%rip),%xmm0
  xor    %edi,%edi
  comisd %xmm4,%xmm0
  setae  %dil
  jmp    L132
  nop
L114:
  movsd  D84(%rip),%xmm0
  xor    %edi,%edi
  comisd %xmm4,%xmm0
  setae  %dil
  jmp    L99
  nopw   0x0(%rax,%rax,1)
L31:
  movsd  D13(%rip),%xmm0
  xor    %edi,%edi
  comisd %xmm5,%xmm0
  setae  %dil
  jmp    L85
L22:
  movsd  (%rsp),%xmm0
  call   <sqrt@plt>
  jmp    L9
```

tool_calls: name: unpack_data
arguments: label: D12
type: f64[2]
name: unpack_data
arguments: label: D40
type: byte[16]
name: unpack_data
arguments: label: D87
type: f64
name: unpack_data
arguments: label: D51
type: f64[2]
name: unpack_data
arguments: label: D32
type: f64
name: unpack_data
arguments: label: D2
type: f32[4]
name: unpack_data
arguments: label: D24
type: f64
name: unpack_data
arguments: label: D68
type: f64
name: unpack_data
arguments: label: D84
type: f64
name: unpack_data
arguments: label: D13
type: f64

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

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

tool: D87: 1000

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

tool: D32: 0.5

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

tool: D24: 1

tool: D68: 20

tool: D84: 1000000000000

tool: D13: 100.99999

assistant: ```c
double phi(double S, double T, double gamma_val, double H, double I, double r, double b, double v) {
  double vst, vv, lambda, d, kappa;
  assert(((S) == (S)) && (S) >= 0.000001 && (S) <= 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);
  vst = v * sqrt(T);
  vv = v * v;
  lambda = (-r + gamma_val * b + 0.5 * gamma_val * (gamma_val - 1.0) * vv) * T;
  d = -(log(S / H) + (b + (gamma_val - 0.5) * vv) * T) / vst;
  kappa = 2.0 * b / vv + (2.0 * gamma_val - 1.0);
  return exp(lambda) * pow(S, gamma_val) * (cnd(d) - pow(I / S, kappa) * cnd(d - 2.0 * log(I / S) / vst));
}
```