user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<cdflib_beta_log>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x48,%rsp
  movsd  (%rsi),%xmm1
  movsd  (%rdi),%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  mov    $0x2,%eax
  call   <cdflib_fifdmin1@plt>
  pxor   %xmm0,%xmm0
  movsd  0x0(%rbp),%xmm1
  cvtsi2sd %eax,%xmm0
  mov    $0x2,%eax
  movsd  %xmm0,0x20(%rsp)
  movsd  (%rbx),%xmm0
  call   <cdflib_fifdmax1@plt>
  pxor   %xmm1,%xmm1
  movsd  0x20(%rsp),%xmm0
  comisd D12(%rip),%xmm0
  cvtsi2sd %eax,%xmm1
  movsd  %xmm1,0x28(%rsp)
  jae    L25
  movsd  D78(%rip),%xmm2
  mov    %eax,%ebx
  comisd %xmm2,%xmm0
  jae    L223
  cmp    $0x7,%eax
  jg     L56
  addsd  %xmm1,%xmm0
  lea    0x20(%rsp),%rdi
  xor    %eax,%eax
  movsd  %xmm0,0x30(%rsp)
  call   <cdflib_gamma_log@plt>
  lea    0x28(%rsp),%rdi
  mov    %eax,%ebp
  xor    %eax,%eax
  call   <cdflib_gamma_log@plt>
  lea    0x30(%rsp),%rdi
  mov    %eax,%ebx
  xor    %eax,%eax
  call   <cdflib_gamma_log@plt>
  pxor   %xmm0,%xmm0
  sub    %eax,%ebx
  add    %ebp,%ebx
  cvtsi2sd %ebx,%xmm0
L215:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L44
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nop
L223:
  comisd D89(%rip),%xmm0
  ja     L178
  cmp    $0x2,%eax
  jle    L31
  pxor   %xmm6,%xmm6
  cmp    $0x7,%eax
  jg     L56
L102:
  movapd %xmm1,%xmm0
  subsd  %xmm2,%xmm0
  cvttsd2si %xmm0,%edx
  test   %edx,%edx
  jle    L244
  movsd  0x20(%rsp),%xmm5
  add    $0x1,%edx
  mov    $0x1,%eax
  movapd %xmm2,%xmm0
  nopw   0x0(%rax,%rax,1)
L15:
  subsd  %xmm2,%xmm1
  add    $0x1,%eax
  movapd %xmm1,%xmm4
  movapd %xmm1,%xmm3
  addsd  %xmm5,%xmm4
  divsd  %xmm4,%xmm3
  mulsd  %xmm3,%xmm0
  cmp    %edx,%eax
  jne    L15
  movsd  %xmm1,0x28(%rsp)
L51:
  movsd  %xmm6,0x8(%rsp)
  lea    0x20(%rsp),%r12
  lea    0x28(%rsp),%r13
  call   <log@plt>
  movsd  0x8(%rsp),%xmm6
  mov    %r12,%rdi
  xor    %eax,%eax
  addsd  %xmm6,%xmm0
  movsd  %xmm0,0x8(%rsp)
  call   <cdflib_gamma_log@plt>
  mov    %r13,%rdi
  mov    %eax,%ebp
  xor    %eax,%eax
  call   <cdflib_gamma_log@plt>
  mov    %r13,%rsi
  mov    %r12,%rdi
  mov    %eax,%ebx
  xor    %eax,%eax
  call   <cdflib_gsumln@plt>
  pxor   %xmm0,%xmm0
  sub    %eax,%ebx
  add    %ebp,%ebx
  cvtsi2sd %ebx,%xmm0
  addsd  0x8(%rsp),%xmm0
  jmp    L215
  cs nopw 0x0(%rax,%rax,1)
L56:
  lea    0x20(%rsp),%rbp
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <cdflib_gamma_log@plt>
  lea    0x28(%rsp),%rsi
  mov    %rbp,%rdi
  mov    %eax,%ebx
  xor    %eax,%eax
  call   <cdflib_algdiv@plt>
  pxor   %xmm0,%xmm0
  add    %eax,%ebx
  cvtsi2sd %ebx,%xmm0
  jmp    L215
  nop
L25:
  lea    0x28(%rsp),%rsi
  lea    0x20(%rsp),%rdi
  xor    %eax,%eax
  call   <cdflib_bcorr@plt>
  movsd  0x20(%rsp),%xmm1
  pxor   %xmm7,%xmm7
  movsd  D78(%rip),%xmm2
  cvtsi2sd %eax,%xmm7
  movapd %xmm1,%xmm0
  divsd  0x28(%rsp),%xmm0
  addsd  %xmm0,%xmm2
  movsd  %xmm0,0x30(%rsp)
  movsd  %xmm1,0x8(%rsp)
  divsd  %xmm2,%xmm0
  movsd  %xmm7,0x10(%rsp)
  call   <log@plt>
  movsd  0x8(%rsp),%xmm1
  xor    %eax,%eax
  subsd  D37(%rip),%xmm1
  lea    0x30(%rsp),%rdi
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rsp)
  call   <cdflib_alnrel@plt>
  pxor   %xmm1,%xmm1
  movsd  0x28(%rsp),%xmm0
  movsd  0x8(%rsp),%xmm2
  cvtsi2sd %eax,%xmm1
  xorpd  D41(%rip),%xmm2
  mulsd  %xmm0,%xmm1
  comisd %xmm2,%xmm1
  jae    L238
  movsd  %xmm1,0x18(%rsp)
  call   <log@plt>
  movsd  D37(%rip),%xmm2
  movsd  0x18(%rsp),%xmm1
  mulsd  %xmm0,%xmm2
  movsd  D105(%rip),%xmm0
  subsd  %xmm2,%xmm0
  addsd  0x10(%rsp),%xmm0
  subsd  %xmm1,%xmm0
  addsd  0x8(%rsp),%xmm0
  jmp    L215
  nopl   0x0(%rax)
L31:
  lea    0x20(%rsp),%rbp
  xor    %eax,%eax
  lea    0x28(%rsp),%r12
  mov    %rbp,%rdi
  call   <cdflib_gamma_log@plt>
  mov    %r12,%rdi
  mov    %eax,%ebx
  xor    %eax,%eax
  call   <cdflib_gamma_log@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  add    %eax,%ebx
  xor    %eax,%eax
  call   <cdflib_gsumln@plt>
  pxor   %xmm0,%xmm0
  sub    %eax,%ebx
  cvtsi2sd %ebx,%xmm0
  jmp    L215
  xchg   %ax,%ax
L238:
  movsd  %xmm1,0x18(%rsp)
  call   <log@plt>
  movsd  D37(%rip),%xmm2
  movsd  0x18(%rsp),%xmm1
  mulsd  %xmm0,%xmm2
  movsd  D105(%rip),%xmm0
  subsd  %xmm2,%xmm0
  addsd  0x10(%rsp),%xmm0
  addsd  0x8(%rsp),%xmm0
  subsd  %xmm1,%xmm0
  jmp    L215
  xchg   %ax,%ax
L178:
  movapd %xmm0,%xmm3
  subsd  %xmm2,%xmm3
  cvttsd2si %xmm3,%ebp
  cmp    $0x3e8,%eax
  jg     L211
  test   %ebp,%ebp
  jle    L78
  lea    0x1(%rbp),%edx
  mov    $0x1,%eax
  movapd %xmm2,%xmm4
  nopl   0x0(%rax,%rax,1)
L214:
  subsd  %xmm2,%xmm0
  add    $0x1,%eax
  movapd %xmm0,%xmm3
  divsd  %xmm1,%xmm3
  movapd %xmm3,%xmm6
  movapd %xmm3,%xmm5
  addsd  %xmm2,%xmm6
  divsd  %xmm6,%xmm5
  mulsd  %xmm5,%xmm4
  cmp    %eax,%edx
  jne    L214
  movsd  %xmm0,0x20(%rsp)
  movsd  %xmm3,0x30(%rsp)
L42:
  movapd %xmm4,%xmm0
  movsd  %xmm1,0x8(%rsp)
  call   <log@plt>
  mov    D78(%rip),%rax
  cmp    $0x7,%ebx
  movsd  0x8(%rsp),%xmm1
  movapd %xmm0,%xmm6
  movq   %rax,%xmm2
  jle    L102
  lea    0x20(%rsp),%rbp
  xor    %eax,%eax
  movsd  %xmm0,0x8(%rsp)
  mov    %rbp,%rdi
  call   <cdflib_gamma_log@plt>
  pxor   %xmm0,%xmm0
  lea    0x28(%rsp),%rsi
  mov    %rbp,%rdi
  cvtsi2sd %eax,%xmm0
  movsd  0x8(%rsp),%xmm6
  xor    %eax,%eax
  addsd  %xmm6,%xmm0
  movsd  %xmm0,0x8(%rsp)
  call   <cdflib_algdiv@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  0x8(%rsp),%xmm0
  jmp    L215
L211:
  lea    0x1(%rbp),%edx
  mov    $0x1,%eax
  movapd %xmm2,%xmm4
  test   %ebp,%ebp
  jle    L115
L72:
  subsd  %xmm2,%xmm0
  add    $0x1,%eax
  movapd %xmm0,%xmm3
  movapd %xmm0,%xmm5
  divsd  %xmm1,%xmm3
  addsd  %xmm2,%xmm3
  divsd  %xmm3,%xmm5
  mulsd  %xmm5,%xmm4
  cmp    %edx,%eax
  jne    L72
  movsd  %xmm0,0x20(%rsp)
L115:
  movapd %xmm4,%xmm0
  movsd  %xmm1,0x8(%rsp)
  call   <log@plt>
  movsd  0x8(%rsp),%xmm1
  movq   %xmm0,%rbx
  movapd %xmm1,%xmm0
  call   <log@plt>
  pxor   %xmm1,%xmm1
  movq   %rbx,%xmm7
  xor    %eax,%eax
  cvtsi2sd %ebp,%xmm1
  lea    0x20(%rsp),%rbp
  mov    %rbp,%rdi
  mulsd  %xmm0,%xmm1
  subsd  %xmm1,%xmm7
  movsd  %xmm7,0x8(%rsp)
  call   <cdflib_gamma_log@plt>
  lea    0x28(%rsp),%rsi
  mov    %rbp,%rdi
  mov    %eax,%ebx
  xor    %eax,%eax
  call   <cdflib_algdiv@plt>
  pxor   %xmm0,%xmm0
  add    %eax,%ebx
  cvtsi2sd %ebx,%xmm0
  addsd  0x8(%rsp),%xmm0
  jmp    L215
  nopl   0x0(%rax)
L244:
  movapd %xmm2,%xmm0
  jmp    L51
L78:
  movapd %xmm2,%xmm4
  jmp    L42
L44:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D12
type_infered: f64[2]
name: disassemble_data
arguments: data_label: D78
type_infered: f64
name: disassemble_data
arguments: data_label: D89
type_infered: f64[2]
name: disassemble_data
arguments: data_label: D37
type_infered: f64
name: disassemble_data
arguments: data_label: D41
type_infered: f32[4]
name: disassemble_data
arguments: data_label: D105
type_infered: byte[8]

tool: {"D12": [8.0,0.5]}

tool: D78: 1

tool: {"D89": [2.0,0.918938533204673]}

tool: D37: 0.5

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

tool: {"D105": [0xb7,0xbe,0x64,0xc8,0xf1,0x67,0xed,0x3f]}

assistant: ```c
double cdflib_beta_log(const double *a0, const double *b0) {
  static const double e = .918938533204673e0;
  double value, a, b, c, h, u, v, w, z;
  int i, n;
  double T1;
  a = cdflib_fifdmin1(*a0, *b0);
  b = cdflib_fifdmax1(*a0, *b0);
  if (a >= 8.0e0) {
    goto S100;
  }
  if (a >= 1.0e0) {
    goto S20;
  }
  if (b >= 8.0e0) {
    goto S10;
  }
  T1 = a + b;
  value = cdflib_gamma_log(&a) + (cdflib_gamma_log(&b) - cdflib_gamma_log(&T1));
  return value;
S10:
  value = cdflib_gamma_log(&a) + cdflib_algdiv(&a, &b);
  return value;
S20:
  if (a > 2.0e0) {
    goto S40;
  }
  if (b > 2.0e0) {
    goto S30;
  }
  value = cdflib_gamma_log(&a) + cdflib_gamma_log(&b) - cdflib_gsumln(&a, &b);
  return value;
S30:
  w = 0.0e0;
  if (b < 8.0e0) {
    goto S60;
  }
  value = cdflib_gamma_log(&a) + cdflib_algdiv(&a, &b);
  return value;
S40:
  if (b > 1000.0e0) {
    goto S80;
  }
  n = (int)(a - 1.0e0);
  w = 1.0e0;
  for (i = 1; i <= n; i++) {
    a -= 1.0e0;
    h = a / b;
    w *= (h / (1.0e0 + h));
  }
  w = log(w);
  if (b < 8.0e0) {
    goto S60;
  }
  value = w + cdflib_gamma_log(&a) + cdflib_algdiv(&a, &b);
  return value;
S60:
  n = (int)(b - 1.0e0);
  z = 1.0e0;
  for (i = 1; i <= n; i++) {
    b -= 1.0e0;
    z *= (b / (a + b));
  }
  value = w + log(z) + (cdflib_gamma_log(&a) + (cdflib_gamma_log(&b) - cdflib_gsumln(&a, &b)));
  return value;
S80:
  n = (int)(a - 1.0e0);
  w = 1.0e0;
  for (i = 1; i <= n; i++) {
    a -= 1.0e0;
    w *= (a / (1.0e0 + a / b));
  }
  value = log(w) - (double)n * log(b) + (cdflib_gamma_log(&a) + cdflib_algdiv(&a, &b));
  return value;
S100:
  w = cdflib_bcorr(&a, &b);
  h = a / b;
  c = h / (1.0e0 + h);
  u = -((a - 0.5e0) * log(c));
  v = b * cdflib_alnrel(&h);
  if (u <= v) {
    goto S110;
  }
  value = -(0.5e0 * log(b)) + e + w - v - u;
  return value;
S110:
  value = -(0.5e0 * log(b)) + e + w - u - v;
  return value;
}
```