user: 请从给定的汇编指令推导出C源代码:

```asm
<brent_local_min>:
  endbr64
  push   %r12
  movapd %xmm1,%xmm5
  movapd %xmm0,%xmm4
  push   %rbp
  subsd  %xmm0,%xmm5
  mov    %rdi,%rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x60,%rsp
  movsd  D17(%rip),%xmm0
  movsd  %xmm2,0x50(%rsp)
  mulsd  %xmm5,%xmm0
  movsd  %xmm3,0x58(%rsp)
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm5,0x8(%rsp)
  movsd  %xmm4,(%rsp)
  movsd  %xmm9,0x18(%rsp)
  addsd  %xmm4,%xmm0
  movsd  %xmm0,(%rsi)
  movsd  %xmm0,0x40(%rsp)
  call   *%rdi
  movsd  (%rbx),%xmm2
  movsd  0x10(%rsp),%xmm1
  movapd %xmm0,%xmm15
  movsd  %xmm0,0x48(%rsp)
  movsd  (%rsp),%xmm4
  movq   D42(%rip),%xmm8
  movsd  0x58(%rsp),%xmm0
  movapd %xmm2,%xmm6
  movapd %xmm1,%xmm7
  movsd  0x8(%rsp),%xmm3
  andpd  %xmm8,%xmm6
  addsd  %xmm4,%xmm7
  movapd %xmm2,%xmm5
  mulsd  %xmm6,%xmm0
  addsd  0x50(%rsp),%xmm0
  mulsd  D63(%rip),%xmm7
  mulsd  D63(%rip),%xmm3
  movapd %xmm0,%xmm12
  addsd  %xmm0,%xmm12
  subsd  %xmm7,%xmm5
  movapd %xmm12,%xmm6
  subsd  %xmm3,%xmm6
  andpd  %xmm8,%xmm5
  comisd %xmm6,%xmm5
  jbe    L268
  movsd  0x40(%rsp),%xmm5
  movsd  0x18(%rsp),%xmm9
  movapd %xmm15,%xmm10
  xor    %r12d,%r12d
  movapd %xmm15,%xmm11
  movsd  %xmm5,(%rsp)
  pxor   %xmm5,%xmm5
  nopl   (%rax)
L113:
  movapd %xmm5,%xmm3
  andpd  %xmm8,%xmm3
  comisd %xmm0,%xmm3
  jbe    L157
  movapd %xmm10,%xmm3
  movapd %xmm10,%xmm14
  movapd %xmm2,%xmm13
  subsd  0x48(%rsp),%xmm14
  subsd  (%rsp),%xmm13
  movapd %xmm2,%xmm6
  subsd  %xmm11,%xmm3
  subsd  0x40(%rsp),%xmm6
  pxor   %xmm15,%xmm15
  mulsd  %xmm13,%xmm14
  mulsd  %xmm6,%xmm3
  mulsd  %xmm14,%xmm13
  mulsd  %xmm3,%xmm6
  subsd  %xmm14,%xmm3
  addsd  %xmm3,%xmm3
  subsd  %xmm13,%xmm6
  comisd %xmm15,%xmm3
  movq   D53(%rip),%xmm15
  jbe    L230
  xorpd  %xmm15,%xmm6
L262:
  movsd  D63(%rip),%xmm14
  movapd %xmm6,%xmm13
  andpd  %xmm8,%xmm13
  mulsd  %xmm3,%xmm14
  mulsd  %xmm14,%xmm5
  andpd  %xmm8,%xmm5
  comisd %xmm13,%xmm5
  jbe    L157
  movapd %xmm4,%xmm5
  subsd  %xmm2,%xmm5
  mulsd  %xmm3,%xmm5
  comisd %xmm6,%xmm5
  jbe    L157
  movapd %xmm1,%xmm5
  subsd  %xmm2,%xmm5
  mulsd  %xmm3,%xmm5
  comisd %xmm6,%xmm5
  jbe    L157
  divsd  %xmm3,%xmm6
  movapd %xmm6,%xmm3
  addsd  %xmm2,%xmm3
  movapd %xmm3,%xmm5
  subsd  %xmm4,%xmm5
  comisd %xmm5,%xmm12
  ja     L238
  movapd %xmm1,%xmm5
  subsd  %xmm3,%xmm5
  comisd %xmm5,%xmm12
  jbe    L287
L238:
  comisd %xmm2,%xmm7
  jbe    L134
  movapd %xmm9,%xmm5
  movapd %xmm0,%xmm9
  movapd %xmm9,%xmm3
  andpd  %xmm8,%xmm3
  comisd %xmm0,%xmm3
  jae    L172
  nopl   0x0(%rax,%rax,1)
L233:
  pxor   %xmm7,%xmm7
  comisd %xmm7,%xmm9
  jbe    L171
  addsd  %xmm0,%xmm2
  movapd %xmm2,%xmm3
  jmp    L82
  nopl   0x0(%rax)
L157:
  comisd %xmm2,%xmm7
  jbe    L210
  movapd %xmm1,%xmm5
  subsd  %xmm2,%xmm5
L248:
  movsd  D17(%rip),%xmm9
  mulsd  %xmm5,%xmm9
L69:
  movapd %xmm9,%xmm3
  andpd  %xmm8,%xmm3
  comisd %xmm0,%xmm3
  jb     L233
L172:
  addsd  %xmm9,%xmm2
  movapd %xmm2,%xmm3
L82:
  movsd  %xmm1,0x38(%rsp)
  movapd %xmm3,%xmm0
  movsd  %xmm4,0x30(%rsp)
  movsd  %xmm11,0x28(%rsp)
  movsd  %xmm5,0x20(%rsp)
  movsd  %xmm9,0x18(%rsp)
  movsd  %xmm10,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
  call   *%rbp
  movsd  0x10(%rsp),%xmm10
  movsd  0x8(%rsp),%xmm3
  movq   D42(%rip),%xmm8
  movsd  0x18(%rsp),%xmm9
  comisd %xmm0,%xmm10
  movsd  0x20(%rsp),%xmm5
  movsd  0x28(%rsp),%xmm11
  movsd  0x30(%rsp),%xmm4
  movsd  0x38(%rsp),%xmm1
  jb     L125
  movsd  (%rbx),%xmm6
  movapd %xmm3,%xmm2
  movsd  %xmm11,0x48(%rsp)
  movapd %xmm10,%xmm11
  movsd  %xmm3,(%rbx)
  movapd %xmm0,%xmm10
  cmpltsd %xmm6,%xmm2
  movapd %xmm2,%xmm7
  andpd  %xmm2,%xmm4
  andnpd %xmm6,%xmm7
  orpd   %xmm7,%xmm4
  movapd %xmm6,%xmm7
  andpd  %xmm2,%xmm7
  andnpd %xmm1,%xmm2
  movapd %xmm2,%xmm1
  movapd %xmm3,%xmm2
  orpd   %xmm7,%xmm1
  movsd  (%rsp),%xmm7
  movsd  %xmm6,(%rsp)
  movsd  %xmm7,0x40(%rsp)
L100:
  movapd %xmm2,%xmm0
  movapd %xmm4,%xmm7
  movapd %xmm1,%xmm6
  andpd  %xmm8,%xmm0
  addsd  %xmm1,%xmm7
  subsd  %xmm4,%xmm6
  mulsd  0x58(%rsp),%xmm0
  movapd %xmm2,%xmm3
  addsd  0x50(%rsp),%xmm0
  mulsd  D63(%rip),%xmm7
  mulsd  D63(%rip),%xmm6
  movapd %xmm0,%xmm12
  addsd  %xmm0,%xmm12
  subsd  %xmm7,%xmm3
  movapd %xmm12,%xmm13
  subsd  %xmm6,%xmm13
  andpd  %xmm8,%xmm3
  comisd %xmm13,%xmm3
  ja     L113
  add    $0x60,%rsp
  movapd %xmm10,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  cs nopw 0x0(%rax,%rax,1)
L125:
  movsd  (%rbx),%xmm2
  movapd %xmm3,%xmm6
  comisd %xmm0,%xmm11
  cmpltsd %xmm2,%xmm6
  movapd %xmm6,%xmm7
  andpd  %xmm6,%xmm1
  andnpd %xmm3,%xmm7
  orpd   %xmm7,%xmm1
  movapd %xmm3,%xmm7
  andpd  %xmm6,%xmm7
  andnpd %xmm4,%xmm6
  movapd %xmm6,%xmm4
  orpd   %xmm7,%xmm4
  jae    L178
  ucomisd (%rsp),%xmm2
  jp     L212
  je     L178
L212:
  movsd  0x48(%rsp),%xmm7
  comisd %xmm0,%xmm7
  jae    L19
  movsd  0x40(%rsp),%xmm7
  ucomisd %xmm7,%xmm2
  setnp  %al
  cmovne %r12d,%eax
  test   %al,%al
  jne    L19
  ucomisd (%rsp),%xmm7
  setnp  %dl
  cmove  %edx,%eax
  test   %al,%al
  je     L100
L19:
  movsd  %xmm0,0x48(%rsp)
  movsd  %xmm3,0x40(%rsp)
  jmp    L100
  cs nopw 0x0(%rax,%rax,1)
L210:
  movapd %xmm4,%xmm5
  subsd  %xmm2,%xmm5
  jmp    L248
  nopl   (%rax)
L178:
  movsd  (%rsp),%xmm7
  movsd  %xmm11,0x48(%rsp)
  movapd %xmm0,%xmm11
  movsd  %xmm3,(%rsp)
  movsd  %xmm7,0x40(%rsp)
  jmp    L100
  nopl   0x0(%rax)
L230:
  xorpd  %xmm15,%xmm3
  jmp    L262
  nopw   0x0(%rax,%rax,1)
L171:
  subsd  %xmm0,%xmm2
  movapd %xmm2,%xmm3
  jmp    L82
  nopl   (%rax)
L134:
  xorpd  %xmm0,%xmm15
  movapd %xmm9,%xmm5
  movapd %xmm15,%xmm9
  jmp    L69
  nopl   0x0(%rax)
L287:
  movapd %xmm9,%xmm5
  movapd %xmm6,%xmm9
  jmp    L69
  nop
L268:
  movsd  0x48(%rsp),%xmm10
  add    $0x60,%rsp
  pop    %rbx
  pop    %rbp
  movapd %xmm10,%xmm0
  pop    %r12
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D17
data_type: byte[8]
name: extract_symbolic_data
arguments: tag: D42
data_type: qword
name: extract_symbolic_data
arguments: tag: D63
data_type: f64
name: extract_symbolic_data
arguments: tag: D53
data_type: f32[2]

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

tool: D42: 9223372036854775807

tool: D63: 0.5

tool: {"D53": [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;
}
```