user: What would the C source look like for the assembly code provided here:

```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   %xmm2,%xmm2
  movsd  0x20(%rsp),%xmm1
  comisd D17(%rip),%xmm1
  cvtsi2sd %eax,%xmm2
  movsd  %xmm2,0x28(%rsp)
  jae    L153
  movsd  D36(%rip),%xmm6
  mov    %eax,%ebx
  comisd %xmm6,%xmm1
  jae    L191
  cmp    $0x7,%eax
  jg     L227
  addsd  %xmm1,%xmm2
  lea    0x20(%rsp),%rdi
  xor    %eax,%eax
  movsd  %xmm2,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
L241:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L7
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nop
L191:
  comisd D35(%rip),%xmm1
  ja     L152
  cmp    $0x2,%eax
  jle    L197
  pxor   %xmm5,%xmm5
  cmp    $0x7,%eax
  jg     L227
L166:
  movapd %xmm2,%xmm0
  subsd  %xmm6,%xmm0
  cvttsd2si %xmm0,%edx
  test   %edx,%edx
  jle    L129
  add    $0x1,%edx
  mov    $0x1,%eax
  movapd %xmm6,%xmm0
  nopl   0x0(%rax)
L64:
  subsd  %xmm6,%xmm2
  add    $0x1,%eax
  movapd %xmm2,%xmm4
  movapd %xmm2,%xmm3
  addsd  %xmm1,%xmm4
  divsd  %xmm4,%xmm3
  mulsd  %xmm3,%xmm0
  cmp    %edx,%eax
  jne    L64
  movsd  %xmm2,0x28(%rsp)
L8:
  movsd  %xmm5,0x8(%rsp)
  lea    0x20(%rsp),%r12
  lea    0x28(%rsp),%r13
  call   <log@plt>
  movsd  0x8(%rsp),%xmm5
  mov    %r12,%rdi
  xor    %eax,%eax
  addsd  %xmm5,%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    L241
  xchg   %ax,%ax
L227:
  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    L241
  nop
L153:
  lea    0x28(%rsp),%rsi
  lea    0x20(%rsp),%rdi
  xor    %eax,%eax
  call   <cdflib_bcorr@plt>
  movsd  0x20(%rsp),%xmm1
  pxor   %xmm7,%xmm7
  movsd  D36(%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  D34(%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  D19(%rip),%xmm2
  mulsd  %xmm0,%xmm1
  comisd %xmm2,%xmm1
  jae    L105
  movsd  %xmm1,0x18(%rsp)
  call   <log@plt>
  movsd  D34(%rip),%xmm2
  movsd  0x18(%rsp),%xmm1
  mulsd  %xmm0,%xmm2
  movsd  D5(%rip),%xmm0
  subsd  %xmm2,%xmm0
  addsd  0x10(%rsp),%xmm0
  subsd  %xmm1,%xmm0
  addsd  0x8(%rsp),%xmm0
  jmp    L241
  nopl   0x0(%rax)
L197:
  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    L241
  xchg   %ax,%ax
L105:
  movsd  %xmm1,0x18(%rsp)
  call   <log@plt>
  movsd  D34(%rip),%xmm2
  movsd  0x18(%rsp),%xmm1
  mulsd  %xmm0,%xmm2
  movsd  D5(%rip),%xmm0
  subsd  %xmm2,%xmm0
  addsd  0x10(%rsp),%xmm0
  addsd  0x8(%rsp),%xmm0
  subsd  %xmm1,%xmm0
  jmp    L241
  xchg   %ax,%ax
L152:
  movapd %xmm1,%xmm0
  subsd  %xmm6,%xmm0
  cvttsd2si %xmm0,%ebp
  cmp    $0x3e8,%eax
  jg     L184
  test   %ebp,%ebp
  jle    L174
  lea    0x1(%rbp),%edx
  mov    $0x1,%eax
  movapd %xmm6,%xmm3
  nopl   0x0(%rax,%rax,1)
L103:
  subsd  %xmm6,%xmm1
  add    $0x1,%eax
  movapd %xmm1,%xmm0
  divsd  %xmm2,%xmm0
  movapd %xmm0,%xmm5
  movapd %xmm0,%xmm4
  addsd  %xmm6,%xmm5
  divsd  %xmm5,%xmm4
  mulsd  %xmm4,%xmm3
  cmp    %edx,%eax
  jne    L103
  movsd  %xmm1,0x20(%rsp)
  movsd  %xmm0,0x30(%rsp)
L207:
  movapd %xmm3,%xmm0
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <log@plt>
  mov    D36(%rip),%rax
  cmp    $0x7,%ebx
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm2
  movapd %xmm0,%xmm5
  movq   %rax,%xmm6
  jle    L166
  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),%xmm5
  xor    %eax,%eax
  addsd  %xmm5,%xmm0
  movsd  %xmm0,0x8(%rsp)
  call   <cdflib_algdiv@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  0x8(%rsp),%xmm0
  jmp    L241
  nopl   0x0(%rax)
L184:
  lea    0x1(%rbp),%edx
  mov    $0x1,%eax
  movapd %xmm6,%xmm3
  test   %ebp,%ebp
  jle    L248
L119:
  subsd  %xmm6,%xmm1
  add    $0x1,%eax
  movapd %xmm1,%xmm0
  movapd %xmm1,%xmm4
  divsd  %xmm2,%xmm0
  addsd  %xmm6,%xmm0
  divsd  %xmm0,%xmm4
  mulsd  %xmm4,%xmm3
  cmp    %edx,%eax
  jne    L119
  movsd  %xmm1,0x20(%rsp)
L248:
  movapd %xmm3,%xmm0
  movsd  %xmm2,0x8(%rsp)
  call   <log@plt>
  movsd  0x8(%rsp),%xmm2
  movq   %xmm0,%rbx
  movapd %xmm2,%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    L241
  nopl   0x0(%rax)
L129:
  movapd %xmm6,%xmm0
  jmp    L8
L174:
  movapd %xmm6,%xmm3
  jmp    L207
L7:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D17
type_guessed: f64[2]
name: extract_symbolic_data
arguments: data_tag: D36
type_guessed: f64
name: extract_symbolic_data
arguments: data_tag: D35
type_guessed: f64[2]
name: extract_symbolic_data
arguments: data_tag: D34
type_guessed: f64
name: extract_symbolic_data
arguments: data_tag: D19
type_guessed: f32[4]
name: extract_symbolic_data
arguments: data_tag: D5
type_guessed: byte[8]

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

tool: D36: 1

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

tool: D34: 0.5

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

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