user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<nfa>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %edi,%ebp
  mov    %esi,%ebx
  movsd  %xmm0,(%rsp)
  movsd  %xmm1,0x20(%rsp)
  mov    %edi,%eax
  or     %esi,%eax
  js     L265
  movapd %xmm0,%xmm7
  cmp    %esi,%edi
  jl     L265
  pxor   %xmm0,%xmm0
  comisd %xmm7,%xmm0
  jae    L265
  comisd D8(%rip),%xmm7
  jb     L20
L265:
  lea    D200(%rip),%rdi
  call   <error@plt>
L20:
  test   %ebp,%ebp
  je     L129
  test   %ebx,%ebx
  je     L129
  cmp    %ebx,%ebp
  je     L94
  movsd  D8(%rip),%xmm0
  movapd %xmm0,%xmm7
  subsd  (%rsp),%xmm7
  movsd  %xmm7,0x18(%rsp)
  pxor   %xmm7,%xmm7
  cvtsi2sd %ebp,%xmm7
  movsd  %xmm7,0x28(%rsp)
  addsd  %xmm7,%xmm0
  comisd D25(%rip),%xmm0
  jbe    L34
  call   <log_gamma_windschitl@plt>
  movq   %xmm0,%r12
L212:
  pxor   %xmm3,%xmm3
  cvtsi2sd %ebx,%xmm3
  movsd  %xmm3,0x10(%rsp)
  movapd %xmm3,%xmm0
  addsd  D8(%rip),%xmm0
  comisd D25(%rip),%xmm0
  jbe    L206
  call   <log_gamma_windschitl@plt>
L189:
  movq   %r12,%xmm3
  subsd  %xmm0,%xmm3
  movq   %xmm3,%r12
  mov    %ebp,%eax
  sub    %ebx,%eax
  pxor   %xmm3,%xmm3
  cvtsi2sd %eax,%xmm3
  movsd  %xmm3,0x8(%rsp)
  movapd %xmm3,%xmm0
  addsd  D8(%rip),%xmm0
  comisd D25(%rip),%xmm0
  jbe    L271
  call   <log_gamma_windschitl@plt>
  movq   %xmm0,%r14
L157:
  movsd  (%rsp),%xmm0
  call   <log@plt>
  movq   %xmm0,%r13
  movsd  0x18(%rsp),%xmm0
  call   <log@plt>
  movapd %xmm0,%xmm2
  movq   %r12,%xmm6
  movq   %r14,%xmm3
  subsd  %xmm3,%xmm6
  movapd %xmm6,%xmm0
  movq   %r13,%xmm1
  mulsd  0x10(%rsp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  0x8(%rsp),%xmm1
  mulsd  %xmm2,%xmm1
  movapd %xmm0,%xmm3
  addsd  %xmm1,%xmm3
  movq   %xmm3,%r12
  movapd %xmm3,%xmm0
  call   <exp@plt>
  movsd  %xmm0,0x8(%rsp)
  pxor   %xmm1,%xmm1
  call   <double_equal@plt>
  test   %rax,%rax
  je     L269
  movsd  0x28(%rsp),%xmm3
  mulsd  (%rsp),%xmm3
  movsd  0x10(%rsp),%xmm6
  comisd %xmm3,%xmm6
  jbe    L255
  movq   %r12,%xmm0
  xorpd  D209(%rip),%xmm0
  divsd  D84(%rip),%xmm0
  subsd  0x20(%rsp),%xmm0
  jmp    L23
L129:
  movsd  0x20(%rsp),%xmm0
  xorpd  D209(%rip),%xmm0
L23:
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L94:
  movsd  (%rsp),%xmm0
  call   <log10@plt>
  movapd %xmm0,%xmm2
  movsd  0x20(%rsp),%xmm0
  xorpd  D209(%rip),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %ebp,%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  jmp    L23
L34:
  call   <log_gamma_lanczos@plt>
  movq   %xmm0,%r12
  jmp    L212
L206:
  call   <log_gamma_lanczos@plt>
  jmp    L189
L271:
  call   <log_gamma_lanczos@plt>
  movq   %xmm0,%r14
  jmp    L157
L255:
  movsd  0x20(%rsp),%xmm0
  xorpd  D209(%rip),%xmm0
  jmp    L23
L269:
  add    $0x1,%ebx
  cmp    %ebx,%ebp
  jl     L112
  movsd  (%rsp),%xmm7
  divsd  0x18(%rsp),%xmm7
  movsd  %xmm7,0x18(%rsp)
  movslq %ebx,%rbx
  movsd  0x8(%rsp),%xmm6
  movsd  %xmm6,(%rsp)
  lea    D182(%rip),%r12
  jmp    L241
L56:
  pxor   %xmm2,%xmm2
  cvtsi2sd %ebx,%xmm2
  movsd  D8(%rip),%xmm0
  divsd  %xmm2,%xmm0
L119:
  mulsd  %xmm1,%xmm0
  movsd  0x18(%rsp),%xmm4
  mulsd  %xmm0,%xmm4
  movsd  %xmm4,0x10(%rsp)
  movsd  0x8(%rsp),%xmm5
  mulsd  %xmm4,%xmm5
  movsd  %xmm5,0x8(%rsp)
  movsd  (%rsp),%xmm6
  addsd  %xmm5,%xmm6
  movsd  %xmm6,(%rsp)
  movsd  D8(%rip),%xmm2
  comisd %xmm0,%xmm2
  ja     L245
L11:
  add    $0x1,%rbx
  cmp    %ebx,%ebp
  jl     L64
L241:
  lea    0x1(%rbp),%eax
  sub    %ebx,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  cmp    $0x1869f,%ebx
  jg     L56
  movsd  (%r12,%rbx,8),%xmm0
  ucomisd D40(%rip),%xmm0
  jp     L119
  jne    L119
  pxor   %xmm2,%xmm2
  cvtsi2sd %ebx,%xmm2
  movsd  D8(%rip),%xmm0
  divsd  %xmm2,%xmm0
  movsd  %xmm0,(%r12,%rbx,8)
  jmp    L119
L245:
  movapd %xmm4,%xmm0
  call   <pow@plt>
  movq   %xmm0,%r13
  movsd  (%rsp),%xmm0
  call   <log10@plt>
  xorpd  D209(%rip),%xmm0
  subsd  0x20(%rsp),%xmm0
  andpd  D144(%rip),%xmm0
  mulsd  D20(%rip),%xmm0
  mulsd  (%rsp),%xmm0
  movsd  D8(%rip),%xmm2
  movapd %xmm2,%xmm1
  movq   %r13,%xmm6
  subsd  %xmm6,%xmm1
  movapd %xmm2,%xmm3
  subsd  0x10(%rsp),%xmm3
  divsd  %xmm3,%xmm1
  subsd  %xmm2,%xmm1
  mulsd  0x8(%rsp),%xmm1
  comisd %xmm1,%xmm0
  jbe    L11
L64:
  movsd  (%rsp),%xmm0
  call   <log10@plt>
  xorpd  D209(%rip),%xmm0
  subsd  0x20(%rsp),%xmm0
  jmp    L23
L112:
  movsd  0x8(%rsp),%xmm7
  movsd  %xmm7,(%rsp)
  jmp    L64
```

tool_calls: name: retrieve_data
arguments: data_label: D8
datatype: f64[2]
name: retrieve_data
arguments: data_label: D200
datatype: string
name: retrieve_data
arguments: data_label: D25
datatype: f64[2]
name: retrieve_data
arguments: data_label: D209
datatype: f32[4]
name: retrieve_data
arguments: data_label: D84
datatype: f64
name: retrieve_data
arguments: data_label: D40
datatype: f32[2]
name: retrieve_data
arguments: data_label: D144
datatype: qword[2]
name: retrieve_data
arguments: data_label: D20
datatype: f64

tool: {"D8": [1.0,15.0]}

tool: D200: nfa: wrong n, k or p values.

tool: {"D25": [15.0,2.302585092994046]}

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

tool: D84: 2.302585092994046

tool: {"D40": [0.0,0.0]}

tool: {"D144": [0x7fffffffffffffff,0x0000000000000000]}

tool: D20: 0.1

assistant: ```c
double nfa(int n, int k, double p, double logNT) {
  static double inv[100000];
  double tolerance = 0.1;
  double log1term, term, bin_term, mult_term, bin_tail, err, p_term;
  int i;
  if (n < 0 || k < 0 || k > n || p <= 0.0 || p >= 1.0)
    error("nfa: wrong n, k or p values.");
  if (n == 0 || k == 0)
    return -logNT;
  if (n == k)
    return -logNT - (double)n * log10(p);
  p_term = p / (1.0 - p);
  log1term = (((double)n + 1.0) > 15.0 ? log_gamma_windschitl((double)n + 1.0) : log_gamma_lanczos((double)n + 1.0)) - (((double)k + 1.0) > 15.0 ? log_gamma_windschitl((double)k + 1.0) : log_gamma_lanczos((double)k + 1.0)) - (((double)(n - k) + 1.0) > 15.0 ? log_gamma_windschitl((double)(n - k) + 1.0) : log_gamma_lanczos((double)(n - k) + 1.0)) + (double)k * log(p) + (double)(n - k) * log(1.0 - p);
  term = exp(log1term);
  if (double_equal(term, 0.0)) {
    if ((double)k > (double)n * p)
      return -log1term / 2.30258509299404568402 - logNT;
    else
      return -logNT;
  }
  bin_tail = term;
  for (i = k + 1; i <= n; i++) {
    bin_term = (double)(n - i + 1) * (i < 100000 ? (inv[i] != 0.0 ? inv[i] : (inv[i] = 1.0 / (double)i)) : 1.0 / (double)i);
    mult_term = bin_term * p_term;
    term *= mult_term;
    bin_tail += term;
    if (bin_term < 1.0) {
      err = term * ((1.0 - pow(mult_term, (double)(n - i + 1))) / (1.0 - mult_term) - 1.0);
      if (err < tolerance * fabs(-log10(bin_tail) - logNT) * bin_tail)
        break;
    }
  }
  return -log10(bin_tail) - logNT;
}
```