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

```asm
<pumas_elastic_dcs>:
  endbr64
  push   %r14
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xc8,%rsp
  movsd  %xmm0,(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xb8(%rsp)
  xor    %eax,%eax
  movsd  D17(%rip),%xmm0
  comisd (%rsp),%xmm0
  ja     L58
  movq   %xmm1,%rbx
  comisd %xmm1,%xmm0
  ja     L161
  pxor   %xmm0,%xmm0
  movsd  %xmm2,0x10(%rsp)
  comisd %xmm2,%xmm0
  jae    L63
  movsd  %xmm3,0x18(%rsp)
  comisd %xmm3,%xmm0
  jae    L155
  lea    0x48(%rsp),%rdi
  lea    0x40(%rsp),%rsi
  movapd %xmm4,%xmm0
  call   <sincos@plt>
  movsd  0x40(%rsp),%xmm7
  movsd  %xmm7,0x8(%rsp)
  mov    0x48(%rsp),%r12
  lea    0x60(%rsp),%rsi
  lea    0x58(%rsp),%rdi
  movsd  0x18(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm2
  movq   %rbx,%xmm1
  movsd  (%rsp),%xmm0
  call   <coulomb_frame_parameters@plt>
  lea    0x90(%rsp),%rdx
  lea    0x70(%rsp),%rsi
  lea    0x54(%rsp),%rdi
  movsd  0x58(%rsp),%xmm4
  movsd  0x18(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm2
  movq   %rbx,%xmm1
  movsd  (%rsp),%xmm0
  call   <coulomb_screening_parameters@plt>
  movsd  0x18(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm0
  call   <coulomb_spin_factor@plt>
  movq   %xmm0,%r14
  mov    0x60(%rsp),%rbp
  movq   %r12,%xmm0
  movq   %rbp,%xmm5
  mulsd  %xmm5,%xmm0
  movsd  0x8(%rsp),%xmm6
  movapd %xmm6,%xmm7
  mulsd  %xmm6,%xmm7
  movsd  %xmm7,0x20(%rsp)
  movapd %xmm0,%xmm6
  mulsd  %xmm0,%xmm6
  movsd  %xmm6,0x28(%rsp)
  mov    0x68(%rsp),%rbx
  movq   %rbx,%xmm1
  mulsd  %xmm1,%xmm1
  movsd  D17(%rip),%xmm0
  subsd  %xmm1,%xmm0
  mulsd  %xmm6,%xmm0
  addsd  %xmm7,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L104
  sqrtsd %xmm0,%xmm0
L121:
  movsd  0x20(%rsp),%xmm2
  movsd  0x28(%rsp),%xmm7
  addsd  %xmm7,%xmm2
  movq   %rbx,%xmm1
  addsd  D17(%rip),%xmm1
  mulsd  %xmm7,%xmm1
  movsd  0x8(%rsp),%xmm5
  movapd %xmm5,%xmm3
  subsd  %xmm0,%xmm3
  mulsd  %xmm5,%xmm3
  addsd  %xmm3,%xmm1
  mulsd  D14(%rip),%xmm1
  divsd  %xmm2,%xmm1
  movsd  %xmm1,0x20(%rsp)
  movq   %rbx,%xmm1
  mulsd  %xmm5,%xmm1
  addsd  %xmm0,%xmm1
  movq   %rbp,%xmm7
  mulsd  %xmm7,%xmm1
  mulsd  %xmm1,%xmm1
  mulsd  %xmm2,%xmm2
  mulsd  %xmm0,%xmm2
  divsd  %xmm2,%xmm1
  movsd  %xmm1,0x30(%rsp)
  mov    0x54(%rsp),%eax
  lea    -0x1(%rax),%edx
  test   %edx,%edx
  jle    L166
  mov    $0x0,%eax
  pxor   %xmm6,%xmm6
  movsd  %xmm6,0x8(%rsp)
  lea    0x90(%rsp),%rcx
L108:
  movsd  0x20(%rsp),%xmm1
  addsd  (%rcx,%rax,8),%xmm1
  movsd  0x70(%rsp,%rax,8),%xmm0
  divsd  %xmm1,%xmm0
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  add    $0x1,%rax
  cmp    %eax,%edx
  jg     L108
L14:
  movslq %edx,%rdx
  movsd  0x90(%rsp,%rdx,8),%xmm1
  movsd  0x20(%rsp),%xmm0
  call   <coulomb_nuclear_form_factor@plt>
  mulsd  0x8(%rsp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,0x38(%rsp)
  movsd  0x10(%rsp),%xmm6
  movapd %xmm6,%xmm7
  addsd  %xmm6,%xmm7
  movsd  %xmm7,0x28(%rsp)
  movsd  0x58(%rsp),%xmm1
  movapd %xmm7,%xmm0
  addsd  %xmm1,%xmm0
  mulsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L10
  sqrtsd %xmm0,%xmm0
  movsd  %xmm0,0x8(%rsp)
L15:
  movsd  0x28(%rsp),%xmm0
  movsd  0x18(%rsp),%xmm4
  addsd  %xmm4,%xmm0
  mulsd  %xmm4,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L129
  sqrtsd %xmm0,%xmm0
L144:
  movsd  (%rsp),%xmm1
  mulsd  D3(%rip),%xmm1
  movsd  0x10(%rsp),%xmm2
  addsd  0x18(%rsp),%xmm2
  mulsd  %xmm2,%xmm1
  mulsd  D55(%rip),%xmm1
  mulsd  0x8(%rsp),%xmm0
  divsd  %xmm0,%xmm1
  mulsd  %xmm1,%xmm1
  mulsd  0x38(%rsp),%xmm1
  mulsd  0x30(%rsp),%xmm1
  movq   %r14,%xmm2
  mulsd  0x20(%rsp),%xmm2
  movsd  D17(%rip),%xmm0
  subsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  jmp    L155
L104:
  call   <sqrt@plt>
  jmp    L121
L166:
  pxor   %xmm5,%xmm5
  movsd  %xmm5,0x8(%rsp)
  jmp    L14
L10:
  call   <sqrt@plt>
  movsd  %xmm0,0x8(%rsp)
  jmp    L15
L129:
  call   <sqrt@plt>
  jmp    L144
L58:
  pxor   %xmm0,%xmm0
L155:
  mov    0xb8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L147
  add    $0xc8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r14
  ret
L161:
  pxor   %xmm0,%xmm0
  jmp    L155
L63:
  pxor   %xmm0,%xmm0
  jmp    L155
L147:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D17
type_guessed: f64
name: extract_symbolic_data
arguments: data_label: D14
type_guessed: f64
name: extract_symbolic_data
arguments: data_label: D3
type_guessed: byte[8]
name: extract_symbolic_data
arguments: data_label: D55
type_guessed: byte[8]

tool: D17: 1

tool: D14: 0.5

tool: {"D3": [0x9d,0xd2,0x1e,0x2a,0xd4,0xe3,0x6d,0x3f]}

tool: {"D55": [0x82,0x38,0x06,0xa3,0x14,0x70,0xac,0x3c]}

assistant: ```c
double pumas_elastic_dcs(double Z, double A, double m, double K, double theta) {
  if ((Z < 1.) || (A < 1.) || (m <= 0.) || (K <= 0.))
    return 0.;
  int n_parameters;
  double kinetic0, amplitude[3], screening[5], fCM[2];
  coulomb_frame_parameters(Z, A, m, K, &kinetic0, fCM);
  coulomb_screening_parameters(Z, A, m, K, kinetic0, &n_parameters, amplitude, screening);
  const double fspin = coulomb_spin_factor(m, K);
  const double c = cos(theta);
  const double s = sin(theta);
  const double gs = fCM[0] * s;
  const double sd = sqrt(c * c + gs * gs * (1. - fCM[1] * fCM[1]));
  const double cgs = c * c + gs * gs;
  const double mu0 = 0.5 * (gs * gs * (1. + fCM[1]) + c * (c - sd)) / cgs;
  const double num = fCM[0] * (c * fCM[1] + sd);
  const double jac = num * num / (cgs * cgs * sd);
  const int n = n_parameters - 1;
  double dcs = 0.;
  int i;
  for (i = 0; i < n; i++) {
    dcs += amplitude[i] / (screening[i] + mu0);
  }
  dcs *= coulomb_nuclear_form_factor(mu0, screening[n]);
  dcs *= dcs;
  const double p0 = sqrt(kinetic0 * (kinetic0 + 2. * m));
  const double p = sqrt(K * (K + 2. * m));
  const double factor = 0.5 * 7.2973525693E-03 * Z * (K + m) * 1.973269804E-16 / (p0 * p);
  return factor * factor * dcs * jac * (1. - fspin * mu0);
}
```