user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<rtsafe>:
  endbr64
  push   %r15
  movd   %xmm2,%r15d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x48,%rsp
  movss  %xmm1,0x10(%rsp)
  lea    0x28(%rsp),%r12
  lea    0x34(%rsp),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  mov    %r12,%rsi
  movss  %xmm0,0xc(%rsp)
  call   *%rbp
  movss  0x10(%rsp),%xmm0
  lea    0x30(%rsp),%rdi
  mov    %r12,%rsi
  call   *%rbp
  movss  0x34(%rsp),%xmm0
  pxor   %xmm4,%xmm4
  comiss %xmm4,%xmm0
  movss  0xc(%rsp),%xmm4
  jbe    L83
  movss  0x30(%rsp),%xmm1
  pxor   %xmm7,%xmm7
  comiss %xmm7,%xmm1
  jbe    L229
L172:
  lea    D13(%rip),%rdi
  movss  %xmm4,0xc(%rsp)
  call   <nrerror@plt>
  movss  0x34(%rsp),%xmm0
  movss  0xc(%rsp),%xmm4
L206:
  pxor   %xmm7,%xmm7
  ucomiss %xmm7,%xmm0
  jp     L150
  movaps %xmm4,%xmm1
  je     L18
L150:
  movss  0x30(%rsp),%xmm1
L10:
  pxor   %xmm7,%xmm7
  ucomiss %xmm7,%xmm1
  jp     L67
  movss  0x10(%rsp),%xmm1
  je     L18
L67:
  pxor   %xmm7,%xmm7
  comiss %xmm0,%xmm7
  ja     L60
  movss  0x10(%rsp),%xmm3
  movss  %xmm4,0xc(%rsp)
  movaps %xmm3,%xmm7
L134:
  movaps %xmm7,%xmm1
  subss  %xmm4,%xmm7
  movss  %xmm3,0x18(%rsp)
  lea    0x2c(%rsp),%r13
  addss  %xmm4,%xmm1
  mulss  D38(%rip),%xmm1
  mov    $0x64,%ebx
  movaps %xmm7,%xmm0
  movss  %xmm1,0x10(%rsp)
  call   <fabs@plt>
  movss  0x10(%rsp),%xmm1
  mov    %r12,%rsi
  mov    %r13,%rdi
  movss  %xmm0,0x14(%rsp)
  movaps %xmm1,%xmm0
  call   *%rbp
  movss  0x14(%rsp),%xmm6
  movss  0x2c(%rsp),%xmm4
  pxor   %xmm7,%xmm7
  movss  0x10(%rsp),%xmm1
  movss  0x18(%rsp),%xmm3
  movd   %xmm6,%r14d
  nopl   0x0(%rax)
L155:
  movaps %xmm1,%xmm2
  movaps %xmm1,%xmm0
  subss  0xc(%rsp),%xmm0
  movss  0x28(%rsp),%xmm5
  subss  %xmm3,%xmm2
  mulss  %xmm5,%xmm0
  mulss  %xmm5,%xmm2
  subss  %xmm4,%xmm0
  subss  %xmm4,%xmm2
  mulss  %xmm2,%xmm0
  comiss %xmm7,%xmm0
  jb     L245
L243:
  movss  0xc(%rsp),%xmm2
  subss  %xmm3,%xmm2
  mulss  D38(%rip),%xmm2
  movaps %xmm2,%xmm1
  addss  %xmm3,%xmm1
  ucomiss %xmm3,%xmm1
  jp     L232
  je     L18
L232:
  movaps %xmm2,%xmm0
  movss  %xmm1,0x10(%rsp)
  movss  %xmm3,0x18(%rsp)
  movss  %xmm2,0x14(%rsp)
  call   <fabs@plt>
  movd   %r15d,%xmm7
  movss  0x10(%rsp),%xmm1
  comiss %xmm0,%xmm7
  ja     L18
  movaps %xmm1,%xmm0
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   *%rbp
  movss  0x2c(%rsp),%xmm4
  pxor   %xmm7,%xmm7
  sub    $0x1,%ebx
  movss  0xc(%rsp),%xmm5
  movss  0x10(%rsp),%xmm1
  movaps %xmm4,%xmm0
  movss  0x18(%rsp),%xmm3
  movss  0x14(%rsp),%xmm2
  cmpltss %xmm7,%xmm0
  movaps %xmm0,%xmm6
  andps  %xmm0,%xmm5
  andnps %xmm1,%xmm6
  orps   %xmm5,%xmm6
  movaps %xmm1,%xmm5
  andps  %xmm0,%xmm5
  andnps %xmm3,%xmm0
  movss  %xmm6,0xc(%rsp)
  movd   %r14d,%xmm6
  movaps %xmm0,%xmm3
  orps   %xmm5,%xmm3
  je     L9
  movd   %xmm2,%r14d
  jmp    L155
  nopl   0x0(%rax,%rax,1)
L229:
  comiss %xmm0,%xmm7
  jbe    L10
  comiss %xmm1,%xmm7
  jbe    L10
  jmp    L172
  nopw   0x0(%rax,%rax,1)
L245:
  addss  %xmm4,%xmm4
  movss  %xmm3,0x14(%rsp)
  movss  %xmm1,0x1c(%rsp)
  movss  %xmm6,0x18(%rsp)
  movaps %xmm4,%xmm0
  call   <fabs@plt>
  movss  0x18(%rsp),%xmm6
  mulss  0x28(%rsp),%xmm6
  movss  %xmm0,0x10(%rsp)
  movaps %xmm6,%xmm0
  call   <fabs@plt>
  movss  0x10(%rsp),%xmm2
  movss  0x14(%rsp),%xmm3
  comiss %xmm0,%xmm2
  ja     L243
  movss  0x1c(%rsp),%xmm1
  movss  0x2c(%rsp),%xmm2
  divss  0x28(%rsp),%xmm2
  movaps %xmm1,%xmm0
  subss  %xmm2,%xmm0
  ucomiss %xmm1,%xmm0
  movaps %xmm0,%xmm1
  jp     L232
  jne    L232
  nopl   0x0(%rax,%rax,1)
L18:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L61
  add    $0x48,%rsp
  movaps %xmm1,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L83:
  pxor   %xmm7,%xmm7
  comiss %xmm0,%xmm7
  jbe    L206
  movss  0x30(%rsp),%xmm1
  comiss %xmm1,%xmm7
  jbe    L10
  jmp    L172
  nopl   0x0(%rax)
L60:
  movss  0x10(%rsp),%xmm7
  movaps %xmm4,%xmm3
  movss  %xmm7,0xc(%rsp)
  jmp    L134
L9:
  lea    D25(%rip),%rdi
  call   <nrerror@plt>
  pxor   %xmm1,%xmm1
  jmp    L18
L61:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D13
data_type: string
name: retrieve_data
arguments: tag: D38
data_type: f32
name: retrieve_data
arguments: tag: D25
data_type: string

tool: D13: Root must be bracketed in rtsafe

tool: D38: 0.5

tool: D25: Maximum number of iterations exceeded in rtsafe

assistant: ```c
float rtsafe(void (*funcd)(float, float *, float *), float x1, float x2, float xacc) {
  void nrerror(char error_text[]);
  int j;
  float df, dx, dxold, f, fh, fl;
  float temp, xh, xl, rts;
  (*funcd)(x1, &fl, &df);
  (*funcd)(x2, &fh, &df);
  if ((fl > 0.0 && fh > 0.0) || (fl < 0.0 && fh < 0.0))
    nrerror("Root must be bracketed in rtsafe");
  if (fl == 0.0)
    return x1;
  if (fh == 0.0)
    return x2;
  if (fl < 0.0) {
    xl = x1;
    xh = x2;
  } else {
    xh = x1;
    xl = x2;
  }
  rts = 0.5 * (x1 + x2);
  dxold = fabs(x2 - x1);
  dx = dxold;
  (*funcd)(rts, &f, &df);
  for (j = 1; j <= 100; j++) {
    if ((((rts - xh) * df - f) * ((rts - xl) * df - f) >= 0.0) || (fabs(2.0 * f) > fabs(dxold * df))) {
      dxold = dx;
      dx = 0.5 * (xh - xl);
      rts = xl + dx;
      if (xl == rts)
        return rts;
    } else {
      dxold = dx;
      dx = f / df;
      temp = rts;
      rts -= dx;
      if (temp == rts)
        return rts;
    }
    if (fabs(dx) < xacc)
      return rts;
    (*funcd)(rts, &f, &df);
    if (f < 0.0)
      xl = rts;
    else
      xh = rts;
  }
  nrerror("Maximum number of iterations exceeded in rtsafe");
  return 0.0;
}
```