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

```asm
<brent>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xd0,%rsp
  movsd  %xmm0,-0xa8(%rbp)
  movsd  %xmm1,-0xb0(%rbp)
  movsd  %xmm2,-0xb8(%rbp)
  mov    %rdi,-0xc0(%rbp)
  movsd  %xmm3,-0xc8(%rbp)
  mov    %rsi,-0xd0(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0xb8(%rbp),%xmm0
  comisd -0xa8(%rbp),%xmm0
  jbe    L176
  movsd  -0xa8(%rbp),%xmm0
  jmp    L369
L176:
  movsd  -0xb8(%rbp),%xmm0
L369:
  movsd  %xmm0,-0x98(%rbp)
  movsd  -0xa8(%rbp),%xmm0
  comisd -0xb8(%rbp),%xmm0
  jbe    L71
  movsd  -0xa8(%rbp),%xmm0
  jmp    L346
L71:
  movsd  -0xb8(%rbp),%xmm0
L346:
  movsd  %xmm0,-0x90(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x60(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  mov    -0x50(%rbp),%rax
  mov    -0xc0(%rbp),%rdx
  movq   %rax,%xmm0
  call   *%rdx
  movq   %xmm0,%rax
  mov    %rax,-0x70(%rbp)
  movsd  -0x70(%rbp),%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movsd  -0x80(%rbp),%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movl   $0x1,-0x9c(%rbp)
  jmp    L41
L105:
  movsd  -0x98(%rbp),%xmm0
  movapd %xmm0,%xmm1
  addsd  -0x90(%rbp),%xmm1
  movsd  D29(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0x50(%rbp),%xmm0
  movq   D17(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0xc8(%rbp),%xmm1
  movsd  D36(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x38(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x50(%rbp),%xmm0
  subsd  -0x40(%rbp),%xmm0
  movq   D17(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x90(%rbp),%xmm0
  movapd %xmm0,%xmm2
  subsd  -0x98(%rbp),%xmm2
  movsd  D29(%rip),%xmm0
  mulsd  %xmm0,%xmm2
  movsd  -0x30(%rbp),%xmm0
  subsd  %xmm2,%xmm0
  comisd %xmm1,%xmm0
  jb     L350
  mov    -0xd0(%rbp),%rax
  movsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x70(%rbp),%xmm0
  jmp    L255
L350:
  movsd  -0x48(%rbp),%xmm0
  movq   D17(%rip),%xmm1
  andpd  %xmm1,%xmm0
  comisd -0x38(%rbp),%xmm0
  jbe    L62
  movsd  -0x50(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x58(%rbp),%xmm1
  movsd  -0x70(%rbp),%xmm0
  subsd  -0x80(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x50(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x60(%rbp),%xmm1
  movsd  -0x70(%rbp),%xmm0
  subsd  -0x78(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x50(%rbp),%xmm0
  subsd  -0x60(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  movsd  -0x50(%rbp),%xmm1
  subsd  -0x58(%rbp),%xmm1
  mulsd  -0x28(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x68(%rbp)
  movsd  -0x20(%rbp),%xmm0
  subsd  -0x28(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L74
  movsd  -0x68(%rbp),%xmm0
  movq   D142(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x68(%rbp)
L74:
  movsd  -0x20(%rbp),%xmm0
  movq   D17(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x88(%rbp),%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0x68(%rbp),%xmm0
  movq   D17(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  -0x20(%rbp),%xmm2
  movsd  D29(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  mulsd  -0x18(%rbp),%xmm1
  movq   D17(%rip),%xmm2
  andpd  %xmm2,%xmm1
  comisd %xmm1,%xmm0
  jae    L215
  movsd  -0x98(%rbp),%xmm0
  subsd  -0x50(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  comisd -0x68(%rbp),%xmm0
  jae    L215
  movsd  -0x90(%rbp),%xmm0
  subsd  -0x50(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x20(%rbp),%xmm1
  movsd  -0x68(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jb     L248
L215:
  movsd  -0x50(%rbp),%xmm0
  comisd -0x40(%rbp),%xmm0
  jb     L389
  movsd  -0x98(%rbp),%xmm0
  subsd  -0x50(%rbp),%xmm0
  jmp    L24
L389:
  movsd  -0x90(%rbp),%xmm0
  subsd  -0x50(%rbp),%xmm0
L24:
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0x48(%rbp),%xmm1
  movsd  D183(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  jmp    L400
L248:
  movsd  -0x68(%rbp),%xmm0
  divsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movsd  -0x50(%rbp),%xmm0
  addsd  -0x88(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x98(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  comisd %xmm1,%xmm0
  ja     L40
  movsd  -0x90(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x10(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L400
L40:
  movsd  -0x40(%rbp),%xmm0
  subsd  -0x50(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jb     L334
  movsd  -0x38(%rbp),%xmm0
  movq   D17(%rip),%xmm1
  andpd  %xmm1,%xmm0
  jmp    L126
L334:
  movsd  -0x38(%rbp),%xmm0
  movq   D17(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movq   D142(%rip),%xmm1
  xorpd  %xmm1,%xmm0
L126:
  movsd  %xmm0,-0x88(%rbp)
  jmp    L400
L62:
  movsd  -0x50(%rbp),%xmm0
  comisd -0x40(%rbp),%xmm0
  jb     L93
  movsd  -0x98(%rbp),%xmm0
  subsd  -0x50(%rbp),%xmm0
  jmp    L79
L93:
  movsd  -0x90(%rbp),%xmm0
  subsd  -0x50(%rbp),%xmm0
L79:
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0x48(%rbp),%xmm1
  movsd  D183(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
L400:
  movsd  -0x88(%rbp),%xmm0
  movq   D17(%rip),%xmm1
  andpd  %xmm1,%xmm0
  comisd -0x38(%rbp),%xmm0
  jb     L157
  movsd  -0x50(%rbp),%xmm0
  addsd  -0x88(%rbp),%xmm0
  jmp    L161
L157:
  movsd  -0x88(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jb     L382
  movsd  -0x38(%rbp),%xmm0
  movq   D17(%rip),%xmm1
  andpd  %xmm1,%xmm0
  jmp    L205
L382:
  movsd  -0x38(%rbp),%xmm0
  movq   D17(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movq   D142(%rip),%xmm1
  xorpd  %xmm1,%xmm0
L205:
  addsd  -0x50(%rbp),%xmm0
L161:
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    -0xc0(%rbp),%rdx
  movq   %rax,%xmm0
  call   *%rdx
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  movsd  -0x70(%rbp),%xmm0
  comisd -0x8(%rbp),%xmm0
  jb     L275
  movsd  -0x10(%rbp),%xmm0
  comisd -0x50(%rbp),%xmm0
  jb     L199
  movsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,-0x98(%rbp)
  jmp    L125
L199:
  movsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,-0x90(%rbp)
L125:
  movsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x78(%rbp),%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movsd  -0x70(%rbp),%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x70(%rbp)
  jmp    L87
L275:
  movsd  -0x50(%rbp),%xmm0
  comisd -0x10(%rbp),%xmm0
  jbe    L17
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x98(%rbp)
  jmp    L253
L17:
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x90(%rbp)
L253:
  movsd  -0x78(%rbp),%xmm0
  comisd -0x8(%rbp),%xmm0
  jae    L403
  movsd  -0x58(%rbp),%xmm0
  ucomisd -0x50(%rbp),%xmm0
  jp     L307
  movsd  -0x58(%rbp),%xmm0
  ucomisd -0x50(%rbp),%xmm0
  jne    L307
L403:
  movsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x78(%rbp),%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x78(%rbp)
  jmp    L87
L307:
  movsd  -0x80(%rbp),%xmm0
  comisd -0x8(%rbp),%xmm0
  jae    L360
  movsd  -0x60(%rbp),%xmm0
  ucomisd -0x50(%rbp),%xmm0
  jp     L376
  movsd  -0x60(%rbp),%xmm0
  ucomisd -0x50(%rbp),%xmm0
  je     L360
L376:
  movsd  -0x60(%rbp),%xmm0
  ucomisd -0x58(%rbp),%xmm0
  jp     L87
  movsd  -0x60(%rbp),%xmm0
  ucomisd -0x58(%rbp),%xmm0
  jne    L87
L360:
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x80(%rbp)
L87:
  addl   $0x1,-0x9c(%rbp)
L41:
  cmpl   $0x64,-0x9c(%rbp)
  jle    L105
  lea    D83(%rip),%rax
  mov    %rax,%rdi
  call   <nrerror@plt>
  mov    -0xd0(%rbp),%rax
  movsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x70(%rbp),%xmm0
L255:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D29
data_type: f64
name: retrieve_data
arguments: tag: D17
data_type: qword
name: retrieve_data
arguments: tag: D36
data_type: byte[8]
name: retrieve_data
arguments: tag: D142
data_type: f32[2]
name: retrieve_data
arguments: tag: D183
data_type: f64
name: retrieve_data
arguments: tag: D83
data_type: string

tool: D29: 0.5

tool: D17: 9223372036854775807

tool: {"D36": [0xbb,0xbd,0xd7,0xd9,0xdf,0x7c,0xdb,0x3d]}

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

tool: D183: 0.381966

tool: D83: Too many iterations in brent

assistant: ```c
double brent(double ax, double bx, double cx, double (*f)(double), double tol, double *xmin) {
  int iter;
  double a, b, d, etemp, fu, fv, fw, fx, p, q, r, tol1, tol2, u, v, w, x, xm;
  double e = 0.0;
  a = (ax < cx ? ax : cx);
  b = (ax > cx ? ax : cx);
  x = w = v = bx;
  fw = fv = fx = (*f)(x);
  for (iter = 1; iter <= 100; iter++) {
    xm = 0.5 * (a + b);
    tol2 = 2.0 * (tol1 = tol * fabs(x) + 1.0e-10);
    if (fabs(x - xm) <= (tol2 - 0.5 * (b - a))) {
      *xmin = x;
      return fx;
    }
    if (fabs(e) > tol1) {
      r = (x - w) * (fx - fv);
      q = (x - v) * (fx - fw);
      p = (x - v) * q - (x - w) * r;
      q = 2.0 * (q - r);
      if (q > 0.0)
        p = -p;
      q = fabs(q);
      etemp = e;
      e = d;
      if (fabs(p) >= fabs(0.5 * q * etemp) || p <= q * (a - x) || p >= q * (b - x))
        d = 0.3819660 * (e = (x >= xm ? a - x : b - x));
      else {
        d = p / q;
        u = x + d;
        if (u - a < tol2 || b - u < tol2)
          d = ((xm - x) >= 0.0 ? fabs(tol1) : -fabs(tol1));
      }
    } else {
      d = 0.3819660 * (e = (x >= xm ? a - x : b - x));
    }
    u = (fabs(d) >= tol1 ? x + d : x + ((d) >= 0.0 ? fabs(tol1) : -fabs(tol1)));
    fu = (*f)(u);
    if (fu <= fx) {
      if (u >= x)
        a = x;
      else
        b = x;
      (v) = (w);
      (w) = (x);
      (x) = (u);
      (fv) = (fw);
      (fw) = (fx);
      (fx) = (fu);
    } else {
      if (u < x)
        a = u;
      else
        b = u;
      if (fu <= fw || w == x) {
        v = w;
        w = u;
        fv = fw;
        fw = fu;
      } else if (fu <= fv || v == x || v == w) {
        v = u;
        fv = fu;
      }
    }
  }
  nrerror("Too many iterations in brent");
  *xmin = x;
  return fx;
}
```