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

```asm
<besselpoly>:
  endbr64
  pxor   %xmm3,%xmm3
  movapd %xmm0,%xmm4
  ucomisd %xmm3,%xmm0
  jp     L14
  jne    L14
  ucomisd %xmm3,%xmm2
  jp     L29
  jne    L29
  movsd  D55(%rip),%xmm0
  addsd  %xmm0,%xmm1
  divsd  %xmm1,%xmm0
  ret
  nopl   (%rax)
L14:
  push   %rbx
  sub    $0x50,%rsp
  comisd %xmm2,%xmm3
  ja     L96
  movsd  D55(%rip),%xmm6
  xor    %ebx,%ebx
  movq   D35(%rip),%xmm8
  movq   D37(%rip),%xmm9
L113:
  movapd %xmm4,%xmm0
  movaps %xmm9,0x40(%rsp)
  movaps %xmm8,0x30(%rsp)
  movsd  %xmm1,0x20(%rsp)
  movsd  %xmm4,0x18(%rsp)
  movsd  %xmm6,0x28(%rsp)
  movsd  %xmm2,(%rsp)
  call   <log@plt>
  movsd  (%rsp),%xmm2
  mulsd  %xmm2,%xmm0
  call   <exp@plt>
  movsd  (%rsp),%xmm2
  movsd  0x28(%rsp),%xmm6
  movsd  %xmm0,0x10(%rsp)
  movapd %xmm2,%xmm0
  movsd  %xmm2,0x8(%rsp)
  addsd  %xmm6,%xmm0
  movsd  %xmm6,(%rsp)
  call   <Gamma@plt>
  movsd  0x8(%rsp),%xmm2
  movsd  (%rsp),%xmm6
  xor    %eax,%eax
  movsd  0x20(%rsp),%xmm1
  movsd  0x18(%rsp),%xmm4
  pxor   %xmm3,%xmm3
  movapd 0x40(%rsp),%xmm9
  movsd  0x10(%rsp),%xmm5
  movapd %xmm3,%xmm11
  addsd  %xmm2,%xmm1
  movapd %xmm4,%xmm7
  movsd  D38(%rip),%xmm10
  movapd 0x30(%rsp),%xmm8
  xorpd  %xmm9,%xmm7
  mulsd  %xmm4,%xmm7
  addsd  %xmm6,%xmm1
  mulsd  %xmm1,%xmm0
  divsd  %xmm0,%xmm5
  movapd %xmm3,%xmm0
  jmp    L95
  nopl   0x0(%rax,%rax,1)
L107:
  cmp    $0x3e8,%eax
  je     L129
L95:
  movapd %xmm11,%xmm3
  lea    (%rax,%rax,1),%edx
  pxor   %xmm4,%xmm4
  add    $0x1,%eax
  addsd  %xmm2,%xmm3
  pxor   %xmm11,%xmm11
  movapd %xmm7,%xmm13
  cvtsi2sd %edx,%xmm4
  movapd %xmm5,%xmm12
  addsd  %xmm5,%xmm0
  cvtsi2sd %eax,%xmm11
  addsd  %xmm6,%xmm3
  addsd  %xmm1,%xmm4
  mulsd  %xmm11,%xmm3
  mulsd  %xmm4,%xmm13
  addsd  %xmm10,%xmm4
  mulsd  %xmm4,%xmm3
  movapd %xmm13,%xmm4
  divsd  %xmm3,%xmm4
  mulsd  %xmm4,%xmm5
  movapd %xmm5,%xmm3
  subsd  %xmm12,%xmm3
  divsd  %xmm5,%xmm3
  andpd  %xmm8,%xmm3
  comisd D24(%rip),%xmm3
  ja     L107
L129:
  test   %ebx,%ebx
  je     L18
  xorpd  %xmm9,%xmm0
L18:
  add    $0x50,%rsp
  pop    %rbx
  ret
  nopl   0x0(%rax)
L96:
  movsd  D44(%rip),%xmm6
  movapd %xmm2,%xmm0
  movapd %xmm2,%xmm7
  movq   D35(%rip),%xmm8
  andpd  %xmm8,%xmm0
  movapd %xmm8,%xmm5
  ucomisd %xmm0,%xmm6
  movsd  D55(%rip),%xmm6
  ja     L17
L90:
  ucomisd %xmm2,%xmm7
  jp     L20
  jne    L20
  movq   D37(%rip),%xmm9
  xorpd  %xmm9,%xmm2
  cvttsd2si %xmm2,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  lea    (%rax,%rdx,1),%ebx
  and    $0x1,%ebx
  sub    %edx,%ebx
  jmp    L113
  nopl   (%rax)
L29:
  movapd %xmm3,%xmm0
  ret
  nopl   (%rax)
L17:
  cvttsd2si %xmm2,%rax
  pxor   %xmm0,%xmm0
  andnpd %xmm2,%xmm5
  cvtsi2sd %rax,%xmm0
  movapd %xmm0,%xmm7
  cmpnlesd %xmm2,%xmm7
  andpd  %xmm6,%xmm7
  subsd  %xmm7,%xmm0
  movapd %xmm0,%xmm7
  orpd   %xmm5,%xmm7
  jmp    L90
  nopl   (%rax)
L20:
  movq   D37(%rip),%xmm9
  xor    %ebx,%ebx
  jmp    L113
```

tool_calls: name: read_data
arguments: data_tag: D55
type: f64
name: read_data
arguments: data_tag: D35
type: qword
name: read_data
arguments: data_tag: D37
type: f32[2]
name: read_data
arguments: data_tag: D38
type: f32[2]
name: read_data
arguments: data_tag: D24
type: byte[16]
name: read_data
arguments: data_tag: D44
type: f32[2]

tool: D55: 1

tool: D35: 9223372036854775807

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

tool: {"D38": [0.0,2.0]}

tool: {"D24": [0x97,0xd4,0x46,0x46,0xf5,0x0e,0x67,0x3c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f]}

tool: {"D44": [0.0,176.0]}

assistant: ```c
double besselpoly(double a, double lambda, double nu) {
  int m, factor = 0;
  double Sm, relerr, Sol;
  double sum = 0.0;
  if (a == 0.0) {
    if (nu == 0.0)
      return 1.0 / (lambda + 1);
    else
      return 0.0;
  }
  if ((nu < 0) && (floor(nu) == nu)) {
    nu = -nu;
    factor = ((int)nu) % 2;
  }
  Sm = exp(nu * log(a)) / (Gamma(nu + 1) * (lambda + nu + 1));
  m = 0;
  do {
    sum += Sm;
    Sol = Sm;
    Sm *= -a * a * (lambda + nu + 1 + 2 * m) / ((nu + m + 1) * (m + 1) * (lambda + nu + 1 + 2 * m + 2));
    m++;
    relerr = fabs((Sm - Sol) / Sm);
  } while (relerr > 1.0e-17 && m < 1000);
  if (!factor)
    return sum;
  else
    return -sum;
}
```