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

```asm
<bessi>:
  endbr64
  push   %rbx
  cvttsd2si %xmm0,%ebx
  sub    $0x20,%rsp
  test   %ebx,%ebx
  je     L61
  cmp    $0x1,%ebx
  je     L87
  pxor   %xmm6,%xmm6
  ucomisd %xmm6,%xmm1
  jp     L20
  movapd %xmm6,%xmm0
  jne    L20
L57:
  add    $0x20,%rsp
  pop    %rbx
  ret
  nopl   0x0(%rax)
L20:
  movq   D50(%rip),%xmm9
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x8(%rsp)
  movsd  D64(%rip),%xmm8
  andpd  %xmm9,%xmm0
  divsd  %xmm0,%xmm8
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebx,%xmm0
  mulsd  D78(%rip),%xmm0
  movsd  %xmm8,0x10(%rsp)
  call   <sqrt@plt>
  pxor   %xmm6,%xmm6
  movsd  0x8(%rsp),%xmm1
  add    %ebx,%eax
  movapd %xmm6,%xmm7
  add    %eax,%eax
  test   %eax,%eax
  jle    L101
  movsd  D21(%rip),%xmm3
  movsd  0x10(%rsp),%xmm8
  movapd %xmm6,%xmm4
  movsd  D34(%rip),%xmm0
  movsd  D54(%rip),%xmm5
  movq   D50(%rip),%xmm9
  jmp    L48
  nopw   0x0(%rax,%rax,1)
L91:
  mulsd  %xmm5,%xmm3
  mulsd  %xmm5,%xmm7
  movapd %xmm3,%xmm4
  movapd %xmm2,%xmm3
  mulsd  %xmm5,%xmm3
  cmp    %eax,%ebx
  je     L122
L79:
  sub    $0x1,%eax
  je     L126
L48:
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  mulsd  %xmm8,%xmm2
  mulsd  %xmm3,%xmm2
  addsd  %xmm4,%xmm2
  movapd %xmm2,%xmm4
  andpd  %xmm9,%xmm4
  comisd %xmm0,%xmm4
  ja     L91
  movapd %xmm3,%xmm4
  movapd %xmm2,%xmm3
  cmp    %eax,%ebx
  jne    L79
L122:
  movapd %xmm4,%xmm7
  sub    $0x1,%eax
  jne    L48
  xchg   %ax,%ax
L126:
  movapd %xmm1,%xmm0
  movsd  %xmm7,0x18(%rsp)
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <bessi0@plt>
  movsd  0x10(%rsp),%xmm3
  pxor   %xmm6,%xmm6
  movsd  0x8(%rsp),%xmm1
  movsd  0x18(%rsp),%xmm7
  divsd  %xmm3,%xmm0
  comisd %xmm1,%xmm6
  mulsd  %xmm7,%xmm0
  jbe    L57
  and    $0x1,%ebx
  je     L57
  xorpd  D60(%rip),%xmm0
  jmp    L57
  nopl   0x0(%rax)
L61:
  add    $0x20,%rsp
  movapd %xmm1,%xmm0
  pop    %rbx
  jmp    1080 <bessi0@plt>
  xchg   %ax,%ax
L87:
  add    $0x20,%rsp
  movapd %xmm1,%xmm0
  pop    %rbx
  jmp    1090 <bessi1@plt>
  xchg   %ax,%ax
L101:
  movsd  D21(%rip),%xmm3
  jmp    L126
```

tool_calls: name: retrieve_data
arguments: data_label: D50
type_infered: qword
name: retrieve_data
arguments: data_label: D64
type_infered: f64
name: retrieve_data
arguments: data_label: D78
type_infered: f64
name: retrieve_data
arguments: data_label: D21
type_infered: f64
name: retrieve_data
arguments: data_label: D34
type_infered: f64
name: retrieve_data
arguments: data_label: D54
type_infered: byte[8]
name: retrieve_data
arguments: data_label: D60
type_infered: f32[4]

tool: D50: 9223372036854775807

tool: D64: 2

tool: D78: 40

tool: D21: 1

tool: D34: 10000000000

tool: {"D54": [0xbb,0xbd,0xd7,0xd9,0xdf,0x7c,0xdb,0x3d]}

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

assistant: ```c
double bessi(double nn, double x) {
  int j, n;
  double bi, bim, bip, tox, ans;
  n = (int)nn;
  if (n == 0)
    return bessi0(x);
  if (n == 1)
    return bessi1(x);
  if (x == 0.0)
    return 0.0;
  else {
    tox = 2.0 / fabs(x);
    bip = ans = 0.0;
    bi = 1.0;
    for (j = 2 * (n + (int)sqrt(40.0 * n)); j > 0; j--) {
      bim = bip + j * tox * bi;
      bip = bi;
      bi = bim;
      if (fabs(bi) > 1.0e10) {
        ans *= 1.0e-10;
        bi *= 1.0e-10;
        bip *= 1.0e-10;
      }
      if (j == n)
        ans = bip;
    }
    ans *= bessi0(x) / bi;
    return x < 0.0 && (n & 1) ? -ans : ans;
  }
}
```