user: Translate the below assembly code into C programming language:

```asm
<betai>:
  endbr64
  movaps %xmm0,%xmm3
  pxor   %xmm0,%xmm0
  movaps %xmm1,%xmm5
  sub    $0x38,%rsp
  comiss %xmm2,%xmm0
  ja     L59
  comiss D26(%rip),%xmm2
  jbe    L11
L59:
  lea    D40(%rip),%rdi
  movss  %xmm2,0x10(%rsp)
  movss  %xmm5,0x8(%rsp)
  movss  %xmm3,0x4(%rsp)
  call   <nrerror@plt>
  movss  0x10(%rsp),%xmm2
  movss  0x8(%rsp),%xmm5
  pxor   %xmm0,%xmm0
  movss  0x4(%rsp),%xmm3
L11:
  ucomiss %xmm0,%xmm2
  mov    $0x0,%edx
  movaps %xmm3,%xmm4
  addss  %xmm5,%xmm4
  setnp  %al
  cmovne %edx,%eax
  test   %al,%al
  jne    L58
  ucomiss D26(%rip),%xmm2
  setnp  %dl
  cmove  %edx,%eax
  test   %al,%al
  je     L49
L58:
  movsd  D32(%rip),%xmm6
  pxor   %xmm1,%xmm1
  movss  %xmm0,0x4(%rsp)
  cvtss2sd %xmm2,%xmm1
L19:
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm4,%xmm4
  addsd  D46(%rip),%xmm4
  cvtss2sd %xmm3,%xmm0
  addsd  %xmm6,%xmm0
  divsd  %xmm4,%xmm0
  comisd %xmm1,%xmm0
  jbe    L25
  movaps %xmm3,%xmm0
  movaps %xmm5,%xmm1
  movss  %xmm3,0x8(%rsp)
  call   <betacf@plt>
  mulss  0x4(%rsp),%xmm0
  movss  0x8(%rsp),%xmm3
  add    $0x38,%rsp
  divss  %xmm3,%xmm0
  ret
L25:
  movss  D26(%rip),%xmm7
  movaps %xmm3,%xmm1
  movaps %xmm5,%xmm0
  movss  %xmm5,0x8(%rsp)
  subss  %xmm2,%xmm7
  movaps %xmm7,%xmm2
  call   <betacf@plt>
  mulss  0x4(%rsp),%xmm0
  movss  0x8(%rsp),%xmm5
  movaps %xmm0,%xmm1
  movss  D26(%rip),%xmm0
  add    $0x38,%rsp
  divss  %xmm5,%xmm1
  subss  %xmm1,%xmm0
  ret
  nopl   0x0(%rax)
L49:
  movaps %xmm4,%xmm0
  movss  %xmm4,0x2c(%rsp)
  movss  %xmm2,0x20(%rsp)
  movss  %xmm5,0x18(%rsp)
  movss  %xmm3,0x8(%rsp)
  call   <gammln@plt>
  movss  0x8(%rsp),%xmm3
  movss  %xmm0,0x4(%rsp)
  movaps %xmm3,%xmm0
  movss  %xmm3,0x10(%rsp)
  call   <gammln@plt>
  movss  0x4(%rsp),%xmm1
  movss  0x18(%rsp),%xmm5
  subss  %xmm0,%xmm1
  movaps %xmm5,%xmm0
  movss  %xmm5,0x28(%rsp)
  movss  %xmm1,0x4(%rsp)
  call   <gammln@plt>
  movss  0x4(%rsp),%xmm1
  movss  0x20(%rsp),%xmm2
  subss  %xmm0,%xmm1
  movss  %xmm2,0x24(%rsp)
  movss  %xmm1,0x4(%rsp)
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x8(%rsp)
  call   <log@plt>
  movss  0x10(%rsp),%xmm3
  movsd  D32(%rip),%xmm6
  movsd  0x8(%rsp),%xmm1
  mulss  %xmm3,%xmm0
  movapd %xmm6,%xmm7
  movss  %xmm3,0x20(%rsp)
  subsd  %xmm1,%xmm7
  addss  0x4(%rsp),%xmm0
  movsd  %xmm6,0x18(%rsp)
  movsd  %xmm1,0x10(%rsp)
  movss  %xmm0,0x4(%rsp)
  movapd %xmm7,%xmm0
  call   <log@plt>
  movss  0x28(%rsp),%xmm5
  mulss  %xmm5,%xmm0
  movss  %xmm5,0x8(%rsp)
  addss  0x4(%rsp),%xmm0
  call   <exp@plt>
  movss  0x2c(%rsp),%xmm4
  movss  0x24(%rsp),%xmm2
  movss  0x20(%rsp),%xmm3
  movsd  0x18(%rsp),%xmm6
  movss  %xmm0,0x4(%rsp)
  movsd  0x10(%rsp),%xmm1
  movss  0x8(%rsp),%xmm5
  jmp    L19
```

tool_calls: name: unpack_data
arguments: data_label: D26
type_guessed: f32
name: unpack_data
arguments: data_label: D40
type_guessed: string
name: unpack_data
arguments: data_label: D32
type_guessed: f32[2]
name: unpack_data
arguments: data_label: D46
type_guessed: f64

tool: D26: 1

tool: D40: Bad x in routine betai

tool: {"D32": [0.0,1.875]}

tool: D46: 2

assistant: ```c
float betai(float a, float b, float x) {
  float betacf(float a, float b, float x);
  float gammln(float xx);
  void nrerror(char error_text[]);
  float bt;
  if (x < 0.0 || x > 1.0)
    nrerror("Bad x in routine betai");
  if (x == 0.0 || x == 1.0)
    bt = 0.0;
  else
    bt = exp(gammln(a + b) - gammln(a) - gammln(b) + a * log(x) + b * log(1.0 - x));
  if (x < (a + 1.0) / (a + b + 2.0))
    return bt * betacf(a, b, x) / a;
  else
    return 1.0 - bt * betacf(b, a, 1.0 - x) / b;
}
```