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

```asm
<brent>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x50,%rsp
  mov    %rdi,%rbp
  movss  %xmm3,0x48(%rsp)
  mov    %rsi,%r12
  movaps %xmm0,%xmm6
  minss  %xmm2,%xmm6
  movss  %xmm6,0x10(%rsp)
  maxss  %xmm2,%xmm0
  movss  %xmm0,0x14(%rsp)
  movss  %xmm1,0x38(%rsp)
  movaps %xmm1,%xmm0
  call   *%rdi
  movss  %xmm0,0x3c(%rsp)
  movss  0x38(%rsp),%xmm1
  movss  %xmm1,0xc(%rsp)
  movss  %xmm1,0x2c(%rsp)
  movss  %xmm0,0x30(%rsp)
  movss  %xmm0,0x28(%rsp)
  mov    $0x64,%ebx
  pxor   %xmm4,%xmm4
  movss  %xmm4,0x1c(%rsp)
  jmp    L166
L92:
  movss  0x14(%rsp),%xmm2
  subss  0xc(%rsp),%xmm2
  movss  %xmm2,0x1c(%rsp)
  jmp    L269
L284:
  movss  0x40(%rsp),%xmm2
  divss  0x44(%rsp),%xmm2
  movss  0xc(%rsp),%xmm0
  addss  %xmm2,%xmm0
  movaps %xmm0,%xmm1
  subss  0x10(%rsp),%xmm1
  movss  0x34(%rsp),%xmm7
  comiss %xmm1,%xmm7
  ja     L308
  movss  0x14(%rsp),%xmm1
  subss  %xmm0,%xmm1
  comiss %xmm1,%xmm7
  jbe    L353
L308:
  movss  0x20(%rsp),%xmm0
  subss  0xc(%rsp),%xmm0
  comiss D50(%rip),%xmm0
  jb     L222
  movss  0x18(%rsp),%xmm0
  call   <fabs@plt>
  movss  0x24(%rsp),%xmm3
  movss  %xmm3,0x1c(%rsp)
  movss  %xmm0,0x24(%rsp)
  jmp    L145
L222:
  movss  0x18(%rsp),%xmm0
  call   <fabs@plt>
  xorps  D42(%rip),%xmm0
  movss  0x24(%rsp),%xmm7
  movss  %xmm7,0x1c(%rsp)
  movss  %xmm0,0x24(%rsp)
  jmp    L145
L20:
  movss  0xc(%rsp),%xmm7
  comiss 0x20(%rsp),%xmm7
  jb     L244
  movss  0x10(%rsp),%xmm6
  subss  %xmm7,%xmm6
  movss  %xmm6,0x1c(%rsp)
L204:
  pxor   %xmm0,%xmm0
  cvtss2sd 0x1c(%rsp),%xmm0
  mulsd  D24(%rip),%xmm0
  pxor   %xmm3,%xmm3
  cvtsd2ss %xmm0,%xmm3
  movss  %xmm3,0x24(%rsp)
L145:
  movss  0x24(%rsp),%xmm0
  call   <fabs@plt>
  comiss 0x18(%rsp),%xmm0
  jb     L2
  movss  0x24(%rsp),%xmm5
  addss  0xc(%rsp),%xmm5
  movss  %xmm5,0x18(%rsp)
L56:
  movss  0x18(%rsp),%xmm0
  call   *%rbp
  movss  0x30(%rsp),%xmm6
  comiss %xmm0,%xmm6
  jb     L65
  movss  0x18(%rsp),%xmm3
  movss  0xc(%rsp),%xmm4
  comiss %xmm4,%xmm3
  jae    L64
  movss  0x2c(%rsp),%xmm7
  movss  %xmm7,0x38(%rsp)
  movss  %xmm4,0x2c(%rsp)
  movss  0x28(%rsp),%xmm7
  movss  %xmm7,0x3c(%rsp)
  movss  %xmm6,0x28(%rsp)
  movss  %xmm0,0x30(%rsp)
  movss  %xmm4,0x14(%rsp)
  movss  %xmm3,0xc(%rsp)
L138:
  sub    $0x1,%ebx
  je     L5
L166:
  movss  0x10(%rsp),%xmm0
  addss  0x14(%rsp),%xmm0
  movaps %xmm0,%xmm6
  mulss  D28(%rip),%xmm6
  movss  %xmm6,0x20(%rsp)
  movss  0xc(%rsp),%xmm0
  call   <fabs@plt>
  mulss  0x48(%rsp),%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  D64(%rip),%xmm0
  pxor   %xmm4,%xmm4
  cvtsd2ss %xmm0,%xmm4
  movss  %xmm4,0x18(%rsp)
  addss  %xmm4,%xmm4
  movss  %xmm4,0x34(%rsp)
  movss  0xc(%rsp),%xmm0
  subss  0x20(%rsp),%xmm0
  call   <fabs@plt>
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd 0x34(%rsp),%xmm2
  movss  0x14(%rsp),%xmm3
  subss  0x10(%rsp),%xmm3
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm3,%xmm0
  mulsd  D43(%rip),%xmm0
  subsd  %xmm0,%xmm2
  comisd %xmm1,%xmm2
  jae    L357
  movss  0x1c(%rsp),%xmm0
  call   <fabs@plt>
  comiss 0x18(%rsp),%xmm0
  jbe    L20
  movss  0x30(%rsp),%xmm4
  movaps %xmm4,%xmm3
  subss  0x3c(%rsp),%xmm3
  movss  0xc(%rsp),%xmm6
  movaps %xmm6,%xmm1
  subss  0x2c(%rsp),%xmm1
  mulss  %xmm1,%xmm3
  subss  0x28(%rsp),%xmm4
  movaps %xmm4,%xmm0
  subss  0x38(%rsp),%xmm6
  movaps %xmm6,%xmm2
  mulss  %xmm6,%xmm0
  mulss  %xmm0,%xmm2
  mulss  %xmm3,%xmm1
  subss  %xmm1,%xmm2
  movaps %xmm2,%xmm7
  movss  %xmm2,0x40(%rsp)
  subss  %xmm3,%xmm0
  addss  %xmm0,%xmm0
  comiss D50(%rip),%xmm0
  jbe    L220
  xorps  D42(%rip),%xmm7
  movss  %xmm7,0x40(%rsp)
L220:
  call   <fabs@plt>
  movss  %xmm0,0x44(%rsp)
  movss  0x40(%rsp),%xmm0
  call   <fabs@plt>
  movss  %xmm0,0x4c(%rsp)
  pxor   %xmm0,%xmm0
  cvtss2sd 0x44(%rsp),%xmm0
  mulsd  D43(%rip),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0x1c(%rsp),%xmm1
  mulsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  call   <fabs@plt>
  movss  0x4c(%rsp),%xmm6
  comiss %xmm0,%xmm6
  jae    L278
  movss  0x10(%rsp),%xmm5
  movss  0xc(%rsp),%xmm6
  subss  %xmm6,%xmm5
  movaps %xmm5,%xmm0
  movss  0x44(%rsp),%xmm7
  mulss  %xmm7,%xmm0
  movss  0x40(%rsp),%xmm3
  comiss %xmm3,%xmm0
  jae    L278
  movss  0x14(%rsp),%xmm0
  subss  %xmm6,%xmm0
  mulss  %xmm7,%xmm0
  comiss %xmm0,%xmm3
  jb     L284
L278:
  movss  0xc(%rsp),%xmm6
  comiss 0x20(%rsp),%xmm6
  jb     L92
  movss  0x10(%rsp),%xmm5
  subss  %xmm6,%xmm5
  movss  %xmm5,0x1c(%rsp)
L269:
  pxor   %xmm0,%xmm0
  cvtss2sd 0x1c(%rsp),%xmm0
  mulsd  D24(%rip),%xmm0
  pxor   %xmm2,%xmm2
  cvtsd2ss %xmm0,%xmm2
  movss  %xmm2,0x24(%rsp)
  jmp    L145
L244:
  movss  0x14(%rsp),%xmm7
  subss  0xc(%rsp),%xmm7
  movss  %xmm7,0x1c(%rsp)
  jmp    L204
L353:
  movss  0x24(%rsp),%xmm5
  movss  %xmm5,0x1c(%rsp)
  movss  %xmm2,0x24(%rsp)
  jmp    L145
L2:
  movss  0x24(%rsp),%xmm2
  comiss D50(%rip),%xmm2
  jb     L162
  movss  0x18(%rsp),%xmm0
  call   <fabs@plt>
L147:
  addss  0xc(%rsp),%xmm0
  movss  %xmm0,0x18(%rsp)
  jmp    L56
L162:
  movss  0x18(%rsp),%xmm0
  call   <fabs@plt>
  xorps  D42(%rip),%xmm0
  jmp    L147
L65:
  movss  0x18(%rsp),%xmm7
  movaps %xmm7,%xmm1
  movss  0xc(%rsp),%xmm5
  cmpltss %xmm5,%xmm1
  movss  0x14(%rsp),%xmm2
  andps  %xmm1,%xmm2
  andnps %xmm7,%xmm1
  orps   %xmm2,%xmm1
  movss  %xmm1,0x14(%rsp)
  movaps %xmm7,%xmm1
  cmpltss %xmm5,%xmm1
  andps  %xmm1,%xmm7
  movss  0x10(%rsp),%xmm6
  andnps %xmm6,%xmm1
  orps   %xmm7,%xmm1
  movss  %xmm1,0x10(%rsp)
  movss  0x28(%rsp),%xmm4
  comiss %xmm0,%xmm4
  jae    L339
  movss  0x2c(%rsp),%xmm3
  ucomiss %xmm5,%xmm3
  jp     L226
  jne    L226
  movss  0x2c(%rsp),%xmm4
  movss  %xmm4,0x38(%rsp)
  movss  0x18(%rsp),%xmm3
  movss  %xmm3,0x2c(%rsp)
  movss  0x28(%rsp),%xmm6
  movss  %xmm6,0x3c(%rsp)
  movss  %xmm0,0x28(%rsp)
  jmp    L138
L226:
  movss  0x3c(%rsp),%xmm7
  comiss %xmm0,%xmm7
  jae    L195
  movss  0x38(%rsp),%xmm5
  ucomiss 0xc(%rsp),%xmm5
  setnp  %al
  mov    $0x0,%edx
  cmovne %edx,%eax
  test   %al,%al
  jne    L197
  ucomiss 0x2c(%rsp),%xmm5
  setnp  %al
  cmovne %edx,%eax
  test   %al,%al
  je     L138
L197:
  movss  0x18(%rsp),%xmm5
  movss  %xmm5,0x38(%rsp)
  movss  %xmm0,0x3c(%rsp)
  jmp    L138
L64:
  movss  0x2c(%rsp),%xmm5
  movss  %xmm5,0x38(%rsp)
  movss  0xc(%rsp),%xmm4
  movss  %xmm4,0x2c(%rsp)
  movss  0x28(%rsp),%xmm2
  movss  %xmm2,0x3c(%rsp)
  movss  0x30(%rsp),%xmm1
  movss  %xmm1,0x28(%rsp)
  movss  %xmm0,0x30(%rsp)
  movss  %xmm4,0x10(%rsp)
  movss  0x18(%rsp),%xmm7
  movss  %xmm7,0xc(%rsp)
  jmp    L138
L339:
  movss  0x2c(%rsp),%xmm4
  movss  %xmm4,0x38(%rsp)
  movss  0x18(%rsp),%xmm3
  movss  %xmm3,0x2c(%rsp)
  movss  0x28(%rsp),%xmm5
  movss  %xmm5,0x3c(%rsp)
  movss  %xmm0,0x28(%rsp)
  jmp    L138
L195:
  movss  0x18(%rsp),%xmm6
  movss  %xmm6,0x38(%rsp)
  movss  %xmm0,0x3c(%rsp)
  jmp    L138
L5:
  lea    D90(%rip),%rdi
  call   <nrerror@plt>
L357:
  movss  0xc(%rsp),%xmm3
  movss  %xmm3,(%r12)
  movss  0x30(%rsp),%xmm0
  add    $0x50,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
```

tool_calls: name: read_data
arguments: data_label: D50
datatype: f64
name: read_data
arguments: data_label: D42
datatype: byte[16]
name: read_data
arguments: data_label: D24
datatype: f64
name: read_data
arguments: data_label: D28
datatype: f32
name: read_data
arguments: data_label: D64
datatype: byte[8]
name: read_data
arguments: data_label: D43
datatype: byte[8]
name: read_data
arguments: data_label: D90
datatype: string

tool: D50: 0

tool: {"D42": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: D24: 0.381966

tool: D28: 0.5

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

tool: {"D43": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

tool: D90: Too many iterations in brent

assistant: ```c
float brent(float ax, float bx, float cx, float (*f)(float), float tol, float *xmin) {
  int iter;
  float a, b, d, etemp, fu, fv, fw, fx, p, q, r, tol1, tol2, u, v, w, x, xm;
  float 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;
}
```