user: Please show me the C implementation that matches the assembly code listed below:

```asm
<cdflib_beta_cdflib_rcomp>:
  endbr64
  push   %r13
  pxor   %xmm6,%xmm6
  mov    %rcx,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x78,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  ucomisd (%rdx),%xmm6
  jp     L228
  je     L167
L228:
  pxor   %xmm7,%xmm7
  ucomisd 0x0(%r13),%xmm7
  jp     L67
  pxor   %xmm0,%xmm0
  jne    L67
L161:
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L325
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax,%rax,1)
L67:
  movsd  (%r12),%xmm1
  movsd  0x0(%rbp),%xmm0
  mov    $0x2,%eax
  call   <cdflib_fifdmin1@plt>
  pxor   %xmm3,%xmm3
  cvtsi2sd %eax,%xmm3
  movsd  %xmm3,0x38(%rsp)
  cmp    $0x7,%eax
  jg     L59
  movsd  (%rbx),%xmm1
  movsd  D257(%rip),%xmm0
  comisd %xmm0,%xmm1
  jbe    L19
  movsd  0x0(%r13),%xmm4
  comisd %xmm0,%xmm4
  jbe    L245
  movapd %xmm1,%xmm0
  movsd  %xmm3,0x18(%rsp)
  movsd  %xmm4,0x10(%rsp)
  call   <log@plt>
  movsd  0x10(%rsp),%xmm4
  movsd  %xmm0,0x8(%rsp)
  movapd %xmm4,%xmm0
  call   <log@plt>
  movsd  0x8(%rsp),%xmm2
  movsd  0x18(%rsp),%xmm3
L180:
  movsd  0x0(%rbp),%xmm4
  movsd  (%r12),%xmm1
  movsd  D37(%rip),%xmm5
  mulsd  %xmm4,%xmm2
  mulsd  %xmm1,%xmm0
  comisd %xmm3,%xmm5
  addsd  %xmm0,%xmm2
  movq   %xmm2,%rbx
  ja     L288
  xor    %eax,%eax
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <cdflib_beta_log@plt>
  mov    0x68(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L325
  pxor   %xmm0,%xmm0
  movq   %rbx,%xmm2
  add    $0x78,%rsp
  cvtsi2sd %eax,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  subsd  %xmm0,%xmm2
  movapd %xmm2,%xmm0
  jmp    11a0 <exp@plt>
  nopl   0x0(%rax,%rax,1)
L167:
  pxor   %xmm0,%xmm0
  jmp    L161
  nopl   0x0(%rax)
L19:
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x10(%rsp)
  call   <log@plt>
  movsd  0x10(%rsp),%xmm1
  lea    0x58(%rsp),%rdi
  xor    %eax,%eax
  xorpd  D112(%rip),%xmm1
  movsd  %xmm0,0x8(%rsp)
  movsd  %xmm1,0x58(%rsp)
  call   <cdflib_alnrel@plt>
  pxor   %xmm0,%xmm0
  movsd  0x38(%rsp),%xmm3
  movsd  0x8(%rsp),%xmm2
  cvtsi2sd %eax,%xmm0
  jmp    L180
  xchg   %ax,%ax
L59:
  movsd  0x0(%rbp),%xmm0
  movsd  (%r12),%xmm4
  comisd %xmm4,%xmm0
  movapd %xmm0,%xmm1
  addsd  %xmm4,%xmm1
  jbe    L298
  movapd %xmm4,%xmm2
  movsd  D37(%rip),%xmm5
  divsd  %xmm0,%xmm2
  mulsd  0x0(%r13),%xmm1
  subsd  %xmm4,%xmm1
  movapd %xmm2,%xmm3
  addsd  %xmm5,%xmm3
  divsd  %xmm3,%xmm5
  divsd  %xmm3,%xmm2
  movsd  %xmm5,0x8(%rsp)
  movsd  %xmm2,0x20(%rsp)
L272:
  movapd %xmm1,%xmm3
  movq   D35(%rip),%xmm2
  movsd  %xmm4,0x18(%rsp)
  divsd  %xmm0,%xmm3
  movapd %xmm3,%xmm5
  andpd  %xmm2,%xmm3
  xorpd  D112(%rip),%xmm5
  comisd D99(%rip),%xmm3
  movsd  %xmm5,0x60(%rsp)
  movsd  %xmm5,0x10(%rsp)
  jbe    L85
  movsd  (%rbx),%xmm0
  movsd  %xmm1,0x28(%rsp)
  divsd  0x8(%rsp),%xmm0
  call   <log@plt>
  movsd  0x10(%rsp),%xmm5
  movsd  0x28(%rsp),%xmm1
  movq   D35(%rip),%xmm2
  movsd  0x18(%rsp),%xmm4
  subsd  %xmm0,%xmm5
  movsd  %xmm5,0x50(%rsp)
L319:
  divsd  %xmm4,%xmm1
  movsd  %xmm4,0x18(%rsp)
  andpd  %xmm1,%xmm2
  comisd D99(%rip),%xmm2
  movsd  %xmm1,0x60(%rsp)
  movsd  %xmm1,0x10(%rsp)
  jbe    L165
  movsd  0x0(%r13),%xmm0
  divsd  0x20(%rsp),%xmm0
  call   <log@plt>
  movsd  0x10(%rsp),%xmm1
  movsd  0x18(%rsp),%xmm4
  subsd  %xmm0,%xmm1
L142:
  mulsd  %xmm4,%xmm1
  movsd  0x0(%rbp),%xmm0
  movsd  %xmm4,0x10(%rsp)
  mulsd  0x50(%rsp),%xmm0
  addsd  %xmm1,%xmm0
  xorpd  D112(%rip),%xmm0
  call   <exp@plt>
  movsd  0x10(%rsp),%xmm4
  pxor   %xmm7,%xmm7
  movapd %xmm0,%xmm1
  movsd  0x8(%rsp),%xmm0
  mulsd  %xmm4,%xmm0
  ucomisd %xmm0,%xmm7
  ja     L339
  sqrtsd %xmm0,%xmm0
L160:
  mulsd  D39(%rip),%xmm0
  mov    %r12,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,0x8(%rsp)
  call   <cdflib_bcorr@plt>
  pxor   %xmm0,%xmm0
  neg    %eax
  cvtsi2sd %eax,%xmm0
  call   <exp@plt>
  mulsd  0x8(%rsp),%xmm0
  jmp    L161
  nopw   0x0(%rax,%rax,1)
L245:
  xorpd  D112(%rip),%xmm4
  lea    0x60(%rsp),%rdi
  xor    %eax,%eax
  movsd  %xmm4,0x60(%rsp)
  call   <cdflib_alnrel@plt>
  pxor   %xmm2,%xmm2
  movsd  0x0(%r13),%xmm0
  cvtsi2sd %eax,%xmm2
  movsd  %xmm2,0x8(%rsp)
  call   <log@plt>
  movsd  0x38(%rsp),%xmm3
  movsd  0x8(%rsp),%xmm2
  jmp    L180
  nopl   0x0(%rax)
L288:
  movapd %xmm4,%xmm0
  mov    $0x2,%eax
  call   <cdflib_fifdmax1@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,0x48(%rsp)
  cmp    $0x7,%eax
  jg     L149
  cmp    $0x1,%eax
  jg     L284
  movq   %rbx,%xmm0
  call   <exp@plt>
  pxor   %xmm6,%xmm6
  ucomisd %xmm6,%xmm0
  jp     L101
  je     L161
L101:
  movsd  0x0(%rbp),%xmm1
  addsd  (%r12),%xmm1
  movsd  %xmm0,0x10(%rsp)
  comisd D37(%rip),%xmm1
  movsd  %xmm1,0x40(%rsp)
  jbe    L190
  subsd  D37(%rip),%xmm1
  lea    0x50(%rsp),%rdi
  xor    %eax,%eax
  movsd  %xmm1,0x50(%rsp)
  call   <cdflib_gam1@plt>
  pxor   %xmm1,%xmm1
  movsd  0x10(%rsp),%xmm0
  cvtsi2sd %eax,%xmm1
  addsd  D37(%rip),%xmm1
  divsd  0x40(%rsp),%xmm1
  movsd  %xmm1,0x8(%rsp)
L306:
  mov    %rbp,%rdi
  xor    %eax,%eax
  movsd  %xmm0,0x10(%rsp)
  call   <cdflib_gam1@plt>
  mov    %r12,%rdi
  mov    %eax,%ebx
  xor    %eax,%eax
  call   <cdflib_gam1@plt>
  pxor   %xmm1,%xmm1
  pxor   %xmm3,%xmm3
  movsd  0x38(%rsp),%xmm2
  cvtsi2sd %ebx,%xmm1
  addsd  D37(%rip),%xmm1
  movsd  0x10(%rsp),%xmm0
  cvtsi2sd %eax,%xmm3
  addsd  D37(%rip),%xmm3
  mulsd  %xmm3,%xmm1
  divsd  0x8(%rsp),%xmm1
  mulsd  %xmm2,%xmm1
  divsd  0x48(%rsp),%xmm2
  addsd  D37(%rip),%xmm2
  mulsd  %xmm1,%xmm0
  divsd  %xmm2,%xmm0
  jmp    L161
  nopw   0x0(%rax,%rax,1)
L165:
  lea    0x60(%rsp),%rdi
  xor    %eax,%eax
  call   <cdflib_rlog1@plt>
  pxor   %xmm1,%xmm1
  movsd  (%r12),%xmm4
  cvtsi2sd %eax,%xmm1
  jmp    L142
  nopw   0x0(%rax,%rax,1)
L85:
  lea    0x60(%rsp),%rdi
  xor    %eax,%eax
  movsd  %xmm1,0x10(%rsp)
  call   <cdflib_rlog1@plt>
  pxor   %xmm0,%xmm0
  movsd  (%r12),%xmm4
  movq   D35(%rip),%xmm2
  cvtsi2sd %eax,%xmm0
  movsd  0x10(%rsp),%xmm1
  movsd  %xmm0,0x50(%rsp)
  jmp    L319
  nopl   0x0(%rax)
L298:
  movsd  D37(%rip),%xmm5
  mulsd  (%rbx),%xmm1
  movapd %xmm0,%xmm2
  divsd  %xmm4,%xmm2
  movapd %xmm2,%xmm3
  addsd  %xmm5,%xmm3
  divsd  %xmm3,%xmm2
  divsd  %xmm3,%xmm5
  movsd  %xmm2,0x8(%rsp)
  movapd %xmm1,%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  %xmm5,0x20(%rsp)
  jmp    L272
  nopl   0x0(%rax)
L149:
  lea    0x38(%rsp),%r12
  xor    %eax,%eax
  mov    %r12,%rdi
  call   <cdflib_gamma_ln1@plt>
  lea    0x48(%rsp),%rsi
  mov    %r12,%rdi
  mov    %eax,%ebp
  xor    %eax,%eax
  call   <cdflib_algdiv@plt>
  pxor   %xmm0,%xmm0
  movq   %rbx,%xmm2
  add    %eax,%ebp
  cvtsi2sd %ebp,%xmm0
  subsd  %xmm0,%xmm2
  movapd %xmm2,%xmm0
  call   <exp@plt>
  mulsd  0x38(%rsp),%xmm0
  jmp    L161
  nop
L284:
  lea    0x38(%rsp),%rdi
  xor    %eax,%eax
  call   <cdflib_gamma_ln1@plt>
  movsd  0x48(%rsp),%xmm1
  pxor   %xmm5,%xmm5
  movsd  0x38(%rsp),%xmm3
  cvtsi2sd %eax,%xmm5
  movapd %xmm1,%xmm0
  subsd  D37(%rip),%xmm0
  cvttsd2si %xmm0,%edx
  movsd  %xmm5,0x50(%rsp)
  test   %edx,%edx
  jle    L152
  mov    D37(%rip),%rcx
  add    $0x1,%edx
  mov    $0x1,%eax
  movq   %rcx,%xmm0
  xchg   %ax,%ax
L136:
  subsd  D37(%rip),%xmm1
  add    $0x1,%eax
  movapd %xmm1,%xmm4
  movapd %xmm1,%xmm2
  addsd  %xmm3,%xmm4
  divsd  %xmm4,%xmm2
  mulsd  %xmm2,%xmm0
  cmp    %edx,%eax
  jne    L136
  movsd  %xmm5,0x18(%rsp)
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <log@plt>
  movsd  0x18(%rsp),%xmm5
  movsd  0x8(%rsp),%xmm1
  subsd  D37(%rip),%xmm1
  movsd  0x10(%rsp),%xmm3
  addsd  %xmm0,%xmm5
  movapd %xmm1,%xmm0
  movsd  %xmm5,0x50(%rsp)
L152:
  movq   %rbx,%xmm2
  addsd  %xmm0,%xmm3
  movsd  %xmm0,0x48(%rsp)
  subsd  %xmm5,%xmm2
  comisd D37(%rip),%xmm3
  movsd  %xmm3,0x40(%rsp)
  movsd  %xmm2,0x8(%rsp)
  jbe    L7
  subsd  D37(%rip),%xmm3
  lea    0x50(%rsp),%rdi
  xor    %eax,%eax
  movsd  %xmm3,0x50(%rsp)
  call   <cdflib_gam1@plt>
  pxor   %xmm0,%xmm0
  movsd  0x8(%rsp),%xmm2
  cvtsi2sd %eax,%xmm0
  addsd  D37(%rip),%xmm0
  divsd  0x40(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsp)
L126:
  movapd %xmm2,%xmm0
  call   <exp@plt>
  mulsd  0x38(%rsp),%xmm0
  lea    0x48(%rsp),%rdi
  xor    %eax,%eax
  movsd  %xmm0,0x8(%rsp)
  call   <cdflib_gam1@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  D37(%rip),%xmm0
  mulsd  0x8(%rsp),%xmm0
  divsd  0x10(%rsp),%xmm0
  jmp    L161
L7:
  lea    0x40(%rsp),%rdi
  xor    %eax,%eax
  call   <cdflib_gam1@plt>
  pxor   %xmm0,%xmm0
  movsd  0x8(%rsp),%xmm2
  cvtsi2sd %eax,%xmm0
  addsd  D37(%rip),%xmm0
  movsd  %xmm0,0x10(%rsp)
  jmp    L126
L190:
  lea    0x40(%rsp),%rdi
  xor    %eax,%eax
  call   <cdflib_gam1@plt>
  pxor   %xmm1,%xmm1
  movsd  0x10(%rsp),%xmm0
  cvtsi2sd %eax,%xmm1
  addsd  D37(%rip),%xmm1
  movsd  %xmm1,0x8(%rsp)
  jmp    L306
L325:
  call   <__stack_chk_fail@plt>
L339:
  movsd  %xmm1,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm1
  jmp    L160
```

tool_calls: name: retrieve_data
arguments: data_tag: D257
type_guessed: f64
name: retrieve_data
arguments: data_tag: D37
type_guessed: f64[2]
name: retrieve_data
arguments: data_tag: D112
type_guessed: f32[4]
name: retrieve_data
arguments: data_tag: D35
type_guessed: qword
name: retrieve_data
arguments: data_tag: D99
type_guessed: f64[2]
name: retrieve_data
arguments: data_tag: D39
type_guessed: byte[8]

tool: D257: 0.375

tool: {"D37": [1.0,0.375]}

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

tool: D35: 9223372036854775807

tool: {"D99": [0.6,0.398942280401433]}

tool: {"D39": [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;
}
```