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

```asm
<rootfind>:
  endbr64
  push   %r15
  movaps %xmm1,%xmm4
  movd   %xmm3,%r15d
  push   %r14
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x18,%rsp
  movss  D59(%rip),%xmm1
  mulss  D59(%rip),%xmm0
  movss  %xmm4,0x8(%rsp)
  mulss  %xmm4,%xmm1
  movss  %xmm2,0x4(%rsp)
  movd   %xmm0,%r14d
  call   *%rdi
  movss  D59(%rip),%xmm1
  pxor   %xmm7,%xmm7
  cvtss2sd %xmm0,%xmm0
  subsd  D18(%rip),%xmm0
  mulss  0x4(%rsp),%xmm1
  cvtsd2ss %xmm0,%xmm7
  movd   %r14d,%xmm0
  movss  %xmm7,(%rsp)
  call   *%rbp
  pxor   %xmm6,%xmm6
  movss  0x8(%rsp),%xmm4
  cvtss2sd %xmm0,%xmm0
  subsd  D18(%rip),%xmm0
  cvtsd2ss %xmm0,%xmm0
  mulss  (%rsp),%xmm0
  comiss %xmm6,%xmm0
  jb     L36
  lea    D57(%rip),%rdi
  call   <nrerror@plt>
  movss  0x8(%rsp),%xmm4
L36:
  pxor   %xmm5,%xmm5
  comiss (%rsp),%xmm5
  ja     L16
  movss  0x4(%rsp),%xmm7
  subss  %xmm7,%xmm4
  movss  %xmm7,(%rsp)
  movaps %xmm4,%xmm2
L1:
  mov    $0x28,%ebx
  jmp    L7
  nopl   0x0(%rax,%rax,1)
L26:
  movss  0xc(%rsp),%xmm1
  pxor   %xmm7,%xmm7
  movss  0x4(%rsp),%xmm2
  ucomiss %xmm7,%xmm1
  jp     L29
  je     L77
L29:
  sub    $0x1,%ebx
  je     L11
L7:
  mulss  D59(%rip),%xmm2
  movss  (%rsp),%xmm3
  movd   %r14d,%xmm0
  movss  D59(%rip),%xmm1
  addss  %xmm2,%xmm3
  movss  %xmm2,0x8(%rsp)
  mulss  %xmm3,%xmm1
  movss  %xmm3,0x4(%rsp)
  call   *%rbp
  pxor   %xmm1,%xmm1
  pxor   %xmm5,%xmm5
  movss  (%rsp),%xmm4
  cvtss2sd %xmm0,%xmm1
  movss  0x4(%rsp),%xmm3
  movss  0x8(%rsp),%xmm2
  subsd  D18(%rip),%xmm1
  movss  %xmm2,0x4(%rsp)
  cvtsd2ss %xmm1,%xmm1
  movaps %xmm1,%xmm0
  movss  %xmm1,0xc(%rsp)
  cmpnless %xmm5,%xmm0
  andps  %xmm0,%xmm4
  andnps %xmm3,%xmm0
  orps   %xmm4,%xmm0
  movss  %xmm0,(%rsp)
  movaps %xmm2,%xmm0
  call   <fabs@plt>
  movd   %r15d,%xmm6
  comiss %xmm0,%xmm6
  jbe    L26
L77:
  movss  (%rsp),%xmm0
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L16:
  movss  0x4(%rsp),%xmm2
  movss  %xmm4,(%rsp)
  subss  %xmm4,%xmm2
  jmp    L1
  nopl   0x0(%rax)
L11:
  lea    D67(%rip),%rdi
  call   <nrerror@plt>
  movl   $0x0,(%rsp)
  movss  (%rsp),%xmm0
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: parse_data
arguments: data_label: D59
datatype: f32
name: parse_data
arguments: data_label: D18
datatype: f64
name: parse_data
arguments: data_label: D57
datatype: string
name: parse_data
arguments: data_label: D67
datatype: string

tool: D59: 0.5

tool: D18: 0.6827

tool: D57: Root must be bracketed for bisection in rtbis

tool: D67: Too many bisections in rtbis

assistant: ```c
float rootfind(float (*func)(float, float), float nu, float x1, float x2, float xacc) {
  void nrerror(char error_text[]);
  int j;
  float dx, f, fmid, xmid, rtb;
  f = (*func)(nu / 2., x1 / 2.) - 0.6827;
  fmid = (*func)(nu / 2., x2 / 2.) - 0.6827;
  if (f * fmid >= 0.0)
    nrerror("Root must be bracketed for bisection in rtbis");
  rtb = f < 0.0 ? (dx = x2 - x1, x1) : (dx = x1 - x2, x2);
  for (j = 1; j <= 40; j++) {
    fmid = (*func)(nu / 2., (xmid = rtb + (dx *= 0.5)) / 2.) - 0.6827;
    if (fmid <= 0.0)
      rtb = xmid;
    if (fabs(dx) < xacc || fmid == 0.0)
      return rtb;
  }
  nrerror("Too many bisections in rtbis");
  return 0.0;
}
```