user: What is the c source code of the assembly code below:

```asm
<rtbis>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  movsd  %xmm0,-0x40(%rbp)
  movsd  %xmm1,-0x48(%rbp)
  movsd  %xmm2,-0x50(%rbp)
  mov    -0x40(%rbp),%rax
  mov    -0x38(%rbp),%rdx
  movq   %rax,%xmm0
  call   *%rdx
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x48(%rbp),%rax
  mov    -0x38(%rbp),%rdx
  movq   %rax,%xmm0
  call   *%rdx
  movq   %xmm0,%rax
  mov    %rax,-0x10(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jb     L4
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movsd  -0x48(%rbp),%xmm0
  mov    -0x40(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  lea    D61(%rip),%rax
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <printf@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L4:
  pxor   %xmm0,%xmm0
  comisd -0x18(%rbp),%xmm0
  jbe    L6
  movsd  -0x48(%rbp),%xmm0
  subsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x40(%rbp),%xmm0
  jmp    L71
L6:
  movsd  -0x40(%rbp),%xmm0
  subsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x48(%rbp),%xmm0
L71:
  movsd  %xmm0,-0x20(%rbp)
  movl   $0x0,-0x2c(%rbp)
  jmp    L15
L52:
  movsd  -0x28(%rbp),%xmm1
  movsd  D40(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
  addsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    -0x38(%rbp),%rdx
  movq   %rax,%xmm0
  call   *%rdx
  movq   %xmm0,%rax
  mov    %rax,-0x10(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x10(%rbp),%xmm0
  jb     L3
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
L3:
  movsd  -0x28(%rbp),%xmm0
  movq   D60(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x50(%rbp),%xmm0
  comisd %xmm1,%xmm0
  ja     L81
  pxor   %xmm0,%xmm0
  ucomisd -0x10(%rbp),%xmm0
  jp     L20
  pxor   %xmm0,%xmm0
  ucomisd -0x10(%rbp),%xmm0
  jne    L20
L81:
  movsd  -0x20(%rbp),%xmm0
  movq   %xmm0,%rax
  jmp    L83
L20:
  addl   $0x1,-0x2c(%rbp)
L15:
  cmpl   $0x27,-0x2c(%rbp)
  jle    L52
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L83:
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D47
datatype: string
name: extract_symbolic_data
arguments: tag: D16
datatype: string
name: extract_symbolic_data
arguments: tag: D61
datatype: string
name: extract_symbolic_data
arguments: tag: D40
datatype: f64
name: extract_symbolic_data
arguments: tag: D60
datatype: qword
name: extract_symbolic_data
arguments: tag: D32
datatype: string

tool: D47: 

Error in function rtbis():

tool: D16: 
root in function must be within

tool: D61: x1 = %f  and x2 = %f


tool: D40: 0.5

tool: D60: 9223372036854775807

tool: D32: 
Too many bisections!!!

assistant: ```c
double rtbis(double (*func)(double), double x1, double x2, double xacc) {
  int j;
  double dx, f, fmid, xmid, rtb;
  f = (*func)(x1);
  fmid = (*func)(x2);
  if (f * fmid >= 0.0) {
    printf("\n\nError in function rtbis():");
    printf("\nroot in function must be within");
    printf("x1 = %f  and x2 = %f\n", x1, x2);
    exit(1);
  }
  rtb = f < 0.0 ? (dx = x2 - x1, x1) : (dx = x1 - x2, x2);
  for (j = 0; j < 40; j++) {
    fmid = (*func)(xmid = rtb + (dx *= 0.5));
    if (fmid <= 0.0)
      rtb = xmid;
    if (fabs(dx) < xacc || fmid == 0.0)
      return rtb;
  }
  printf("\n\nError in function rtbis():");
  printf("\nToo many bisections!!!\n");
  exit(1);
}
```