user: 请将以下的汇编代码转换成C语言代码：

```asm
<brent_local_min>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%r15
  movapd %xmm0,%xmm4
  movsd  %xmm2,0x30(%rsp)
  movsd  %xmm3,0x38(%rsp)
  mov    %rsi,%r13
  movsd  %xmm1,0x8(%rsp)
  movapd %xmm1,%xmm7
  subsd  %xmm0,%xmm7
  movapd %xmm7,%xmm0
  movsd  %xmm7,0x10(%rsp)
  mulsd  D97(%rip),%xmm0
  movapd %xmm0,%xmm5
  movsd  %xmm4,(%rsp)
  addsd  %xmm4,%xmm5
  movq   %xmm5,%rbp
  movsd  %xmm5,(%rsi)
  movapd %xmm5,%xmm0
  call   *%rdi
  movsd  %xmm0,0x28(%rsp)
  movsd  0x8(%rsp),%xmm4
  addsd  (%rsp),%xmm4
  movsd  D20(%rip),%xmm2
  mulsd  %xmm2,%xmm4
  movsd  0x0(%r13),%xmm1
  movq   D87(%rip),%xmm5
  movapd %xmm1,%xmm7
  andpd  %xmm5,%xmm7
  movapd %xmm7,%xmm0
  mulsd  0x38(%rsp),%xmm0
  addsd  0x30(%rsp),%xmm0
  movapd %xmm0,%xmm7
  addsd  %xmm0,%xmm7
  movapd %xmm1,%xmm3
  subsd  %xmm4,%xmm3
  andpd  %xmm5,%xmm3
  mulsd  0x10(%rsp),%xmm2
  movapd %xmm7,%xmm5
  subsd  %xmm2,%xmm5
  comisd %xmm5,%xmm3
  jbe    L125
  mov    0x28(%rsp),%r12
  mov    %r12,%r14
  mov    %rbp,0x18(%rsp)
  pxor   %xmm6,%xmm6
  movsd  %xmm6,0x10(%rsp)
  jmp    L106
L148:
  xorpd  D60(%rip),%xmm2
  jmp    L186
L174:
  comisd %xmm1,%xmm4
  jbe    L273
  movsd  0x8(%rsp),%xmm4
  subsd  %xmm1,%xmm4
  movsd  %xmm4,0x10(%rsp)
L189:
  movsd  0x10(%rsp),%xmm4
  mulsd  D97(%rip),%xmm4
  movsd  %xmm4,0x20(%rsp)
L285:
  movsd  0x20(%rsp),%xmm7
  movapd %xmm7,%xmm2
  andpd  D87(%rip),%xmm2
  comisd %xmm0,%xmm2
  jb     L225
  addsd  %xmm7,%xmm1
  movq   %xmm1,%rbx
L231:
  movq   %rbx,%xmm0
  call   *%r15
  movq   %r12,%xmm6
  comisd %xmm0,%xmm6
  jb     L86
  movsd  0x0(%r13),%xmm1
  movq   %rbx,%xmm2
  cmpltsd %xmm1,%xmm2
  movsd  (%rsp),%xmm3
  andpd  %xmm2,%xmm3
  andnpd %xmm1,%xmm2
  orpd   %xmm3,%xmm2
  movsd  %xmm2,(%rsp)
  movq   %rbx,%xmm2
  cmpltsd %xmm1,%xmm2
  movapd %xmm1,%xmm3
  andpd  %xmm2,%xmm3
  movsd  0x8(%rsp),%xmm4
  andnpd %xmm4,%xmm2
  orpd   %xmm3,%xmm2
  movsd  %xmm2,0x8(%rsp)
  mov    %rbx,0x0(%r13)
  mov    %r14,0x28(%rsp)
  mov    %r12,%r14
  movq   %xmm0,%r12
  mov    0x18(%rsp),%rbp
  movsd  %xmm1,0x18(%rsp)
L260:
  movsd  D20(%rip),%xmm5
  movsd  (%rsp),%xmm6
  movapd %xmm6,%xmm4
  movsd  0x8(%rsp),%xmm8
  addsd  %xmm8,%xmm4
  mulsd  %xmm5,%xmm4
  movsd  0x0(%r13),%xmm1
  movq   D87(%rip),%xmm3
  movapd %xmm1,%xmm0
  andpd  %xmm3,%xmm0
  mulsd  0x38(%rsp),%xmm0
  addsd  0x30(%rsp),%xmm0
  movapd %xmm0,%xmm7
  addsd  %xmm0,%xmm7
  movapd %xmm1,%xmm2
  subsd  %xmm4,%xmm2
  andpd  %xmm3,%xmm2
  movapd %xmm8,%xmm3
  subsd  %xmm6,%xmm3
  mulsd  %xmm5,%xmm3
  movapd %xmm7,%xmm5
  subsd  %xmm3,%xmm5
  comisd %xmm5,%xmm2
  jbe    L211
L106:
  movsd  0x10(%rsp),%xmm2
  andpd  D87(%rip),%xmm2
  comisd %xmm0,%xmm2
  jbe    L174
  movq   %r12,%xmm6
  subsd  0x28(%rsp),%xmm6
  movapd %xmm1,%xmm5
  subsd  0x18(%rsp),%xmm5
  mulsd  %xmm5,%xmm6
  movq   %r12,%xmm2
  movq   %r14,%xmm3
  subsd  %xmm3,%xmm2
  movapd %xmm1,%xmm3
  movq   %rbp,%xmm9
  subsd  %xmm9,%xmm3
  mulsd  %xmm3,%xmm2
  mulsd  %xmm2,%xmm3
  mulsd  %xmm6,%xmm5
  subsd  %xmm5,%xmm3
  subsd  %xmm6,%xmm2
  addsd  %xmm2,%xmm2
  comisd D159(%rip),%xmm2
  jbe    L148
  xorpd  D60(%rip),%xmm3
L186:
  movapd %xmm3,%xmm6
  andpd  D87(%rip),%xmm6
  movapd %xmm2,%xmm5
  mulsd  D20(%rip),%xmm5
  mulsd  0x10(%rsp),%xmm5
  andpd  D87(%rip),%xmm5
  comisd %xmm6,%xmm5
  jbe    L174
  movsd  (%rsp),%xmm6
  movapd %xmm6,%xmm5
  subsd  %xmm1,%xmm5
  mulsd  %xmm2,%xmm5
  comisd %xmm3,%xmm5
  jbe    L174
  movsd  0x8(%rsp),%xmm11
  movapd %xmm11,%xmm5
  subsd  %xmm1,%xmm5
  mulsd  %xmm2,%xmm5
  comisd %xmm3,%xmm5
  jbe    L174
  divsd  %xmm2,%xmm3
  movapd %xmm3,%xmm2
  addsd  %xmm1,%xmm2
  movapd %xmm2,%xmm5
  subsd  %xmm6,%xmm5
  comisd %xmm5,%xmm7
  ja     L78
  movapd %xmm11,%xmm5
  subsd  %xmm2,%xmm5
  comisd %xmm5,%xmm7
  jbe    L60
L78:
  comisd %xmm1,%xmm4
  ja     L278
  movapd %xmm0,%xmm2
  xorpd  D60(%rip),%xmm2
  movsd  0x20(%rsp),%xmm6
  movsd  %xmm6,0x10(%rsp)
  movsd  %xmm2,0x20(%rsp)
  jmp    L285
L273:
  movsd  (%rsp),%xmm4
  subsd  %xmm1,%xmm4
  movsd  %xmm4,0x10(%rsp)
  jmp    L189
L60:
  movsd  0x20(%rsp),%xmm6
  movsd  %xmm6,0x10(%rsp)
  movsd  %xmm3,0x20(%rsp)
  jmp    L285
L278:
  movsd  0x20(%rsp),%xmm6
  movsd  %xmm6,0x10(%rsp)
  movsd  %xmm0,0x20(%rsp)
  jmp    L285
L225:
  movsd  0x20(%rsp),%xmm7
  comisd D159(%rip),%xmm7
  jbe    L73
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rbx
  jmp    L231
L73:
  subsd  %xmm0,%xmm1
  movq   %xmm1,%rbx
  jmp    L231
L86:
  movsd  0x0(%r13),%xmm2
  movq   %rbx,%xmm1
  cmpltsd %xmm2,%xmm1
  movsd  0x8(%rsp),%xmm3
  andpd  %xmm1,%xmm3
  movq   %rbx,%xmm7
  andnpd %xmm7,%xmm1
  orpd   %xmm3,%xmm1
  movsd  %xmm1,0x8(%rsp)
  movq   %rbx,%xmm1
  cmpltsd %xmm2,%xmm1
  movq   %rbx,%xmm3
  andpd  %xmm1,%xmm3
  movsd  (%rsp),%xmm4
  andnpd %xmm4,%xmm1
  orpd   %xmm3,%xmm1
  movsd  %xmm1,(%rsp)
  movq   %r14,%xmm6
  comisd %xmm0,%xmm6
  jae    L38
  movsd  0x18(%rsp),%xmm7
  ucomisd %xmm7,%xmm2
  jp     L29
  jne    L29
  mov    %r14,0x28(%rsp)
  movq   %xmm0,%r14
  mov    0x18(%rsp),%rbp
  mov    %rbx,0x18(%rsp)
  jmp    L260
L29:
  movsd  0x28(%rsp),%xmm6
  comisd %xmm0,%xmm6
  jae    L55
  movq   %rbp,%xmm6
  ucomisd 0x18(%rsp),%xmm6
  setnp  %al
  mov    $0x0,%edx
  cmovne %edx,%eax
  test   %al,%al
  jne    L290
  ucomisd %xmm6,%xmm2
  setnp  %al
  cmovne %edx,%eax
  test   %al,%al
  je     L260
L290:
  movsd  %xmm0,0x28(%rsp)
  mov    %rbx,%rbp
  jmp    L260
L38:
  mov    %r14,0x28(%rsp)
  movq   %xmm0,%r14
  mov    0x18(%rsp),%rbp
  mov    %rbx,0x18(%rsp)
  jmp    L260
L55:
  movsd  %xmm0,0x28(%rsp)
  mov    %rbx,%rbp
  jmp    L260
L125:
  mov    0x28(%rsp),%r12
L211:
  movq   %r12,%xmm0
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D97
datatype: byte[8]
name: retrieve_data
arguments: tag: D20
datatype: f64
name: retrieve_data
arguments: tag: D87
datatype: qword[2]
name: retrieve_data
arguments: tag: D60
datatype: f32[4]
name: retrieve_data
arguments: tag: D159
datatype: f32[4]

tool: {"D97": [0x60,0x2d,0xa0,0x91,0x21,0x72,0xd8,0x3f]}

tool: D20: 0.5

tool: {"D87": [0x7fffffffffffffff,0x0000000000000000]}

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

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

assistant: ```c
double brent_local_min(double (*funcpt)(double), double a, double b, double t, double eps, double *x) {
  double c, d, e, m, p, q, r, tol, t2;
  double u, v, w, fu, fv, fw, fx;
  double fd;
  fd = eps;
  c = (3.0 - sqrt(5.0)) / 2.0;
  *x = a + c * (b - a);
  w = *x;
  v = w;
  e = 0;
  fx = funcpt(*x);
  fw = fx;
  fv = fw;
  m = 0.5 * (a + b);
  tol = fd * fabs(*x) + t;
  t2 = 2.0 * tol;
  while (fabs(*x - m) > t2 - 0.5 * (b - a)) {
    p = 0;
    q = 0;
    r = 0;
    if (fabs(e) > tol) {
      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;
      } else {
        q = -q;
      }
      r = e;
      e = d;
    }
    if (fabs(p) < fabs(0.5 * q * r) && p < q * (a - *x) && p < q * (b - *x)) {
      d = p / q;
      u = *x + d;
      if ((u - a) < t2 || (b - u) < t2) {
        if (*x < m) {
          d = tol;
        } else {
          d = -tol;
        }
      }
    } else {
      if (*x < m) {
        e = b - *x;
      } else {
        e = a - *x;
      }
      d = c * e;
    }
    if (fabs(d) >= tol) {
      u = *x + d;
    } else if (d > 0) {
      u = *x + tol;
    } else {
      u = *x - tol;
    }
    fu = funcpt(u);
    if (fu <= fx) {
      if (u < *x) {
        b = *x;
      } else {
        a = *x;
      }
      v = w;
      fv = fw;
      w = *x;
      fw = fx;
      *x = u;
      fx = fu;
    } else {
      if (u < *x) {
        a = u;
      } else {
        b = u;
      }
      if (fu <= fw || w == *x) {
        v = w;
        fv = fw;
        w = u;
        fw = fu;
      } else if (fu <= fv || v == *x || v == w) {
        v = u;
        fv = fu;
      }
    }
    m = 0.5 * (a + b);
    tol = fd * fabs(*x) + t;
    t2 = 2.0 * tol;
  }
  return fx;
}
```