user: Converte this assembly snippet into its equivalent C code:

```asm
<probBinomial>:
  endbr64
  push   %r13
  pxor   %xmm6,%xmm6
  movapd %xmm0,%xmm7
  push   %r12
  mov    %edi,%r12d
  cvtsi2sd %edi,%xmm6
  push   %rbp
  sub    %esi,%r12d
  mov    %esi,%ebp
  push   %rbx
  sub    $0x28,%rsp
  cmp    $0x27,%edi
  jle    L64
  mov    %edi,%ebx
  cmp    $0x3e7,%edi
  jg     L14
  cmp    $0x9,%esi
  jg     L14
L64:
  cmp    %r12d,%ebp
  mov    %r12d,%eax
  pxor   %xmm0,%xmm0
  cmovle %ebp,%eax
  cvtsi2sd %eax,%xmm0
  test   %eax,%eax
  jle    L7
  movsd  D15(%rip),%xmm3
  movapd %xmm6,%xmm1
  pxor   %xmm5,%xmm5
  movapd %xmm3,%xmm2
  nopl   0x0(%rax,%rax,1)
L54:
  movapd %xmm1,%xmm4
  subsd  %xmm3,%xmm1
  divsd  %xmm0,%xmm4
  subsd  %xmm3,%xmm0
  comisd %xmm5,%xmm0
  mulsd  %xmm4,%xmm2
  ja     L54
L58:
  movapd %xmm7,%xmm0
  subsd  D20(%rip),%xmm0
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  movsd  %xmm7,(%rsp)
  movsd  %xmm6,0x18(%rsp)
  call   <fabs@plt>
  movsd  (%rsp),%xmm7
  movsd  0x8(%rsp),%xmm2
  test   %eax,%eax
  movsd  0x10(%rsp),%xmm3
  cvttsd2si %xmm7,%edi
  jle    L12
  pxor   %xmm0,%xmm0
  movsd  %xmm2,0x8(%rsp)
  cvtsi2sd %ebp,%xmm0
  movsd  %xmm3,0x18(%rsp)
  movsd  %xmm7,0x10(%rsp)
  call   <pow@plt>
  movsd  0x10(%rsp),%xmm7
  movsd  0x18(%rsp),%xmm3
  movsd  %xmm0,(%rsp)
  pxor   %xmm0,%xmm0
  cvtsi2sd %r12d,%xmm0
  subsd  %xmm7,%xmm3
  cvttsd2si %xmm3,%edi
  call   <pow@plt>
  mulsd  (%rsp),%xmm0
  movsd  0x8(%rsp),%xmm2
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  mulsd  %xmm2,%xmm0
  ret
  nopl   0x0(%rax,%rax,1)
L12:
  movsd  0x18(%rsp),%xmm6
  movsd  %xmm2,(%rsp)
  movapd %xmm6,%xmm0
  call   <pow@plt>
  movsd  (%rsp),%xmm2
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  mulsd  %xmm2,%xmm0
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax,%rax,1)
L14:
  addsd  D15(%rip),%xmm6
  movsd  %xmm7,0x8(%rsp)
  cvttsd2si %xmm6,%edi
  call   <LnGamma@plt>
  pxor   %xmm3,%xmm3
  movsd  D15(%rip),%xmm0
  cvtsi2sd %ebp,%xmm3
  mov    %eax,%r13d
  addsd  %xmm3,%xmm0
  movsd  %xmm3,(%rsp)
  cvttsd2si %xmm0,%edi
  call   <LnGamma@plt>
  pxor   %xmm2,%xmm2
  movsd  D15(%rip),%xmm0
  cvtsi2sd %r12d,%xmm2
  sub    %eax,%r13d
  addsd  %xmm2,%xmm0
  movsd  %xmm2,0x18(%rsp)
  cvttsd2si %xmm0,%edi
  call   <LnGamma@plt>
  mov    %eax,%r8d
  mov    %r13d,%eax
  sub    %r8d,%eax
  cltd
  idiv   %ebx
  mov    %eax,%edi
  call   <exp@plt>
  movsd  0x8(%rsp),%xmm7
  movsd  (%rsp),%xmm3
  movsd  %xmm0,0x10(%rsp)
  mulsd  %xmm7,%xmm0
  cvttsd2si %xmm0,%edi
  movapd %xmm3,%xmm0
  call   <pow@plt>
  movsd  0x8(%rsp),%xmm7
  movsd  D15(%rip),%xmm6
  movsd  0x10(%rsp),%xmm1
  movsd  %xmm0,(%rsp)
  movsd  0x18(%rsp),%xmm2
  subsd  %xmm7,%xmm6
  movapd %xmm6,%xmm0
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%edi
  movapd %xmm2,%xmm0
  call   <pow@plt>
  mulsd  (%rsp),%xmm0
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L7:
  movsd  D15(%rip),%xmm3
  movapd %xmm3,%xmm2
  jmp    L58
```

tool_calls: name: extract_symbolic_data
arguments: tag: D15
data_type: f64
name: extract_symbolic_data
arguments: tag: D20
data_type: byte[8]

tool: D15: 1

tool: {"D20": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

assistant: ```c
double probBinomial(int n, int k, double p) {
  double C, up, down;
  if (n < 40 || (n < 1000 && k < 10)) {
    for (down = ((k) < (n - k) ? (k) : (n - k)), up = n, C = 1; down > 0; down--, up--)
      C *= up / down;
    if (fabs(p - .5) < 1e-6)
      C *= pow(p, (double)n);
    else
      C *= pow(p, (double)k) * pow((1 - p), (double)(n - k));
  } else {
    C = exp((LnGamma(n + 1.) - LnGamma(k + 1.) - LnGamma(n - k + 1.)) / n);
    C = pow(p * C, (double)k) * pow((1 - p) * C, (double)(n - k));
  }
  return C;
}
```