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

```asm
<cdflib_beta_cdflib_rcomp>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    %rdi,-0xb8(%rbp)
  mov    %rsi,-0xc0(%rbp)
  mov    %rdx,-0xc8(%rbp)
  mov    %rcx,-0xd0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0xc8(%rbp),%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L127
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  je     L347
L127:
  mov    -0xd0(%rbp),%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L143
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jne    L143
L347:
  movsd  -0x28(%rbp),%xmm0
  jmp    L233
L143:
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0xb8(%rbp),%rax
  mov    (%rax),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x2,%eax
  call   <cdflib_fifdmin1@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  movsd  -0xa0(%rbp),%xmm0
  comisd D52(%rip),%xmm0
  jae    L159
  mov    -0xc8(%rbp),%rax
  movsd  (%rax),%xmm0
  comisd D234(%rip),%xmm0
  ja     L301
  mov    -0xc8(%rbp),%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x60(%rbp)
  mov    -0xc8(%rbp),%rax
  movsd  (%rax),%xmm0
  movq   D25(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  lea    -0x80(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <cdflib_alnrel@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  jmp    L282
L301:
  nop
  mov    -0xd0(%rbp),%rax
  movsd  (%rax),%xmm0
  comisd D234(%rip),%xmm0
  ja     L10
  mov    -0xd0(%rbp),%rax
  movsd  (%rax),%xmm0
  movq   D25(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  lea    -0x78(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <cdflib_alnrel@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  mov    -0xd0(%rbp),%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x58(%rbp)
  jmp    L282
L10:
  nop
  mov    -0xc8(%rbp),%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x60(%rbp)
  mov    -0xd0(%rbp),%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x58(%rbp)
L282:
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x60(%rbp),%xmm1
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  -0x58(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0xa0(%rbp),%xmm1
  movsd  D219(%rip),%xmm0
  comisd %xmm1,%xmm0
  ja     L119
  mov    -0xc0(%rbp),%rdx
  mov    -0xb8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <cdflib_beta_log@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0x30(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
  jmp    L233
L119:
  nop
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0xb8(%rbp),%rax
  mov    (%rax),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x2,%eax
  call   <cdflib_fifdmax1@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  movsd  -0x90(%rbp),%xmm0
  comisd D52(%rip),%xmm0
  jae    L308
  movsd  -0x90(%rbp),%xmm0
  movsd  D219(%rip),%xmm1
  comisd %xmm1,%xmm0
  ja     L2
  mov    -0x30(%rbp),%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  ucomisd -0x28(%rbp),%xmm0
  jp     L324
  pxor   %xmm0,%xmm0
  ucomisd -0x28(%rbp),%xmm0
  jne    L324
  movsd  -0x28(%rbp),%xmm0
  jmp    L233
L324:
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  movsd  -0x98(%rbp),%xmm0
  movsd  D219(%rip),%xmm1
  comisd %xmm1,%xmm0
  ja     L46
  lea    -0x98(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <cdflib_gam1@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D219(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  jmp    L166
L46:
  nop
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  D219(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  lea    -0x88(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <cdflib_gam1@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D219(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x98(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
L166:
  mov    -0xb8(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <cdflib_gam1@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D219(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  %xmm1,-0xd8(%rbp)
  mov    -0xc0(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <cdflib_gam1@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D219(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mulsd  -0xd8(%rbp),%xmm0
  divsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x70(%rbp)
  movsd  -0xa0(%rbp),%xmm0
  mulsd  -0x70(%rbp),%xmm0
  mulsd  -0x28(%rbp),%xmm0
  movsd  -0xa0(%rbp),%xmm1
  movsd  -0x90(%rbp),%xmm3
  movapd %xmm1,%xmm2
  divsd  %xmm3,%xmm2
  movsd  D219(%rip),%xmm1
  addsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
  jmp    L233
L2:
  nop
  lea    -0xa0(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <cdflib_gamma_ln1@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movsd  -0x90(%rbp),%xmm0
  movsd  D219(%rip),%xmm1
  subsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0xa4(%rbp)
  cmpl   $0x0,-0xa4(%rbp)
  jle    L156
  movsd  D219(%rip),%xmm0
  movsd  %xmm0,-0x70(%rbp)
  movl   $0x1,-0xa8(%rbp)
  jmp    L75
L303:
  movsd  -0x90(%rbp),%xmm0
  movsd  D219(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  movsd  -0x90(%rbp),%xmm0
  movsd  -0xa0(%rbp),%xmm2
  movsd  -0x90(%rbp),%xmm1
  addsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  -0x70(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x70(%rbp)
  addl   $0x1,-0xa8(%rbp)
L75:
  mov    -0xa8(%rbp),%eax
  cmp    -0xa4(%rbp),%eax
  jle    L303
  mov    -0x70(%rbp),%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movsd  -0x88(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  jmp    L109
L156:
  nop
L109:
  movsd  -0x88(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x90(%rbp),%xmm0
  movsd  D219(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  movsd  -0xa0(%rbp),%xmm1
  movsd  -0x90(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  movsd  -0x98(%rbp),%xmm0
  movsd  D219(%rip),%xmm1
  comisd %xmm1,%xmm0
  ja     L226
  lea    -0x98(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <cdflib_gam1@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D219(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  jmp    L93
L226:
  nop
  movsd  -0xa0(%rbp),%xmm1
  movsd  -0x90(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  D219(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  lea    -0x88(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <cdflib_gam1@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D219(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x98(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
L93:
  mov    -0x30(%rbp),%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  movsd  -0xa0(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  lea    -0x90(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <cdflib_gam1@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  D219(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mulsd  -0xd8(%rbp),%xmm0
  divsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
  jmp    L233
L308:
  nop
  lea    -0xa0(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <cdflib_gamma_ln1@plt>
  mov    %eax,%ebx
  lea    -0x90(%rbp),%rdx
  lea    -0xa0(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <cdflib_algdiv@plt>
  add    %ebx,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movsd  -0x88(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  movsd  -0xa0(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
  jmp    L233
L159:
  nop
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm1
  comisd %xmm1,%xmm0
  ja     L291
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm1
  movsd  D219(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x20(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0x20(%rbp),%xmm1
  movsd  D219(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  D219(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm2
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm1
  addsd  %xmm1,%xmm2
  mov    -0xc8(%rbp),%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x68(%rbp)
  jmp    L201
L291:
  nop
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm1
  movsd  D219(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  D219(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0x20(%rbp),%xmm1
  movsd  D219(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x20(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  addsd  %xmm0,%xmm1
  mov    -0xd0(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x68(%rbp)
L201:
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x68(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movq   D25(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movsd  -0x78(%rbp),%xmm0
  movq   D221(%rip),%xmm1
  andpd  %xmm1,%xmm0
  comisd D295(%rip),%xmm0
  ja     L269
  lea    -0x78(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <cdflib_rlog1@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  jmp    L62
L269:
  nop
  movsd  -0x78(%rbp),%xmm5
  movsd  %xmm5,-0xd8(%rbp)
  mov    -0xc8(%rbp),%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm6
  divsd  -0x40(%rbp),%xmm6
  movq   %xmm6,%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movapd %xmm0,%xmm1
  movsd  -0xd8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
L62:
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x68(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movsd  -0x78(%rbp),%xmm0
  movq   D221(%rip),%xmm1
  andpd  %xmm1,%xmm0
  comisd D295(%rip),%xmm0
  ja     L128
  lea    -0x78(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <cdflib_rlog1@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  jmp    L174
L128:
  nop
  movsd  -0x78(%rbp),%xmm7
  movsd  %xmm7,-0xd8(%rbp)
  mov    -0xd0(%rbp),%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm3
  divsd  -0x38(%rbp),%xmm3
  movq   %xmm3,%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movapd %xmm0,%xmm1
  movsd  -0xd8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
L174:
  mov    -0xb8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x88(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  -0x48(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movq   D25(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x30(%rbp)
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  -0x40(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movsd  D288(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  mulsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  mov    -0xc0(%rbp),%rdx
  mov    -0xb8(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <cdflib_bcorr@plt>
  neg    %eax
  pxor   %xmm5,%xmm5
  cvtsi2sd %eax,%xmm5
  movq   %xmm5,%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  mulsd  -0xd8(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
L233:
  movq   %xmm0,%rax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L221
  call   <__stack_chk_fail@plt>
L221:
  movq   %rax,%xmm0
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D52
data_type: f64[2]
name: retrieve_data
arguments: data_tag: D234
data_type: f64[2]
name: retrieve_data
arguments: data_tag: D25
data_type: f32[2]
name: retrieve_data
arguments: data_tag: D219
data_type: f64
name: retrieve_data
arguments: data_tag: D221
data_type: qword
name: retrieve_data
arguments: data_tag: D295
data_type: f64
name: retrieve_data
arguments: data_tag: D288
data_type: byte[8]

tool: {"D52": [8.0,0.375]}

tool: {"D234": [0.375,0.0]}

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

tool: D219: 1

tool: D221: 9223372036854775807

tool: D295: 0.6

tool: {"D288": [0x56,0x36,0xd4,0x33,0x45,0x88,0xd9,0x3f]}

assistant: ```c
double cdflib_beta_cdflib_rcomp(const double *a, const double *b, const double *x, const double *y) {
  static const double Const = .398942280401433e0;
  double brcomp, a0, apb, b0, c, e, h, lambda, lnx, lny, t, u, v, x0, y0, z;
  int i, n;
  double T1, T2;
  brcomp = 0.0e0;
  if (*x == 0.0e0 || *y == 0.0e0) {
    return brcomp;
  }
  a0 = cdflib_fifdmin1(*a, *b);
  if (a0 >= 8.0e0) {
    goto S130;
  }
  if (*x > 0.375e0) {
    goto S10;
  }
  lnx = log(*x);
  T1 = -*x;
  lny = cdflib_alnrel(&T1);
  goto S30;
S10:
  if (*y > 0.375e0) {
    goto S20;
  }
  T2 = -*y;
  lnx = cdflib_alnrel(&T2);
  lny = log(*y);
  goto S30;
S20:
  lnx = log(*x);
  lny = log(*y);
S30:
  z = *a * lnx + *b * lny;
  if (a0 < 1.0e0) {
    goto S40;
  }
  z -= cdflib_beta_log(a, b);
  brcomp = exp(z);
  return brcomp;
S40:
  b0 = cdflib_fifdmax1(*a, *b);
  if (b0 >= 8.0e0) {
    goto S120;
  }
  if (b0 > 1.0e0) {
    goto S70;
  }
  brcomp = exp(z);
  if (brcomp == 0.0e0) {
    return brcomp;
  }
  apb = *a + *b;
  if (apb > 1.0e0) {
    goto S50;
  }
  z = 1.0e0 + cdflib_gam1(&apb);
  goto S60;
S50:
  u = *a + *b - 1.e0;
  z = (1.0e0 + cdflib_gam1(&u)) / apb;
S60:
  c = (1.0e0 + cdflib_gam1(a)) * (1.0e0 + cdflib_gam1(b)) / z;
  brcomp = brcomp * (a0 * c) / (1.0e0 + a0 / b0);
  return brcomp;
S70:
  u = cdflib_gamma_ln1(&a0);
  n = (int)(b0 - 1.0e0);
  if (n < 1) {
    goto S90;
  }
  c = 1.0e0;
  for (i = 1; i <= n; i++) {
    b0 -= 1.0e0;
    c *= (b0 / (a0 + b0));
  }
  u = log(c) + u;
S90:
  z -= u;
  b0 -= 1.0e0;
  apb = a0 + b0;
  if (apb > 1.0e0) {
    goto S100;
  }
  t = 1.0e0 + cdflib_gam1(&apb);
  goto S110;
S100:
  u = a0 + b0 - 1.e0;
  t = (1.0e0 + cdflib_gam1(&u)) / apb;
S110:
  brcomp = a0 * exp(z) * (1.0e0 + cdflib_gam1(&b0)) / t;
  return brcomp;
S120:
  u = cdflib_gamma_ln1(&a0) + cdflib_algdiv(&a0, &b0);
  brcomp = a0 * exp(z - u);
  return brcomp;
S130:
  if (*a > *b) {
    goto S140;
  }
  h = *a / *b;
  x0 = h / (1.0e0 + h);
  y0 = 1.0e0 / (1.0e0 + h);
  lambda = *a - (*a + *b) * *x;
  goto S150;
S140:
  h = *b / *a;
  x0 = 1.0e0 / (1.0e0 + h);
  y0 = h / (1.0e0 + h);
  lambda = (*a + *b) * *y - *b;
S150:
  e = -(lambda / *a);
  if (fabs(e) > 0.6e0) {
    goto S160;
  }
  u = cdflib_rlog1(&e);
  goto S170;
S160:
  u = e - log(*x / x0);
S170:
  e = lambda / *b;
  if (fabs(e) > 0.6e0) {
    goto S180;
  }
  v = cdflib_rlog1(&e);
  goto S190;
S180:
  v = e - log(*y / y0);
S190:
  z = exp(-(*a * u + *b * v));
  brcomp = Const * sqrt(*b * x0) * z * exp(-cdflib_bcorr(a, b));
  return brcomp;
}
```