user: Translate the below assembly code into C programming language:

```asm
<brent_local_min>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xc0,%rsp
  mov    %rdi,-0x98(%rbp)
  movsd  %xmm0,-0xa0(%rbp)
  movsd  %xmm1,-0xa8(%rbp)
  movsd  %xmm2,-0xb0(%rbp)
  movsd  %xmm3,-0xb8(%rbp)
  mov    %rsi,-0xc0(%rbp)
  movsd  -0xb8(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  D129(%rip),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0xa8(%rbp),%xmm0
  subsd  -0xa0(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  addsd  -0xa0(%rbp),%xmm0
  mov    -0xc0(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  mov    -0xc0(%rbp),%rax
  mov    (%rax),%rax
  mov    -0x98(%rbp),%rdx
  movq   %rax,%xmm0
  call   *%rdx
  movq   %xmm0,%rax
  mov    %rax,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0xa0(%rbp),%xmm0
  movapd %xmm0,%xmm1
  addsd  -0xa8(%rbp),%xmm1
  movsd  D43(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  movq   D17(%rip),%xmm1
  andpd  %xmm1,%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movsd  -0xb0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x58(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  jmp    L83
L117:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x70(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x68(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x80(%rbp),%xmm0
  movq   D17(%rip),%xmm1
  andpd  %xmm1,%xmm0
  comisd -0x58(%rbp),%xmm0
  jbe    L188
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x38(%rbp),%xmm1
  movsd  -0x20(%rbp),%xmm0
  subsd  -0x30(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x40(%rbp),%xmm1
  movsd  -0x20(%rbp),%xmm0
  subsd  -0x28(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x68(%rbp)
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  subsd  -0x40(%rbp),%xmm0
  mulsd  -0x68(%rbp),%xmm0
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm1
  subsd  -0x38(%rbp),%xmm1
  mulsd  -0x60(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x70(%rbp)
  movsd  -0x68(%rbp),%xmm0
  subsd  -0x60(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  movsd  %xmm0,-0x68(%rbp)
  movsd  -0x68(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L281
  movsd  -0x70(%rbp),%xmm0
  movq   D2(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x70(%rbp)
  jmp    L207
L281:
  movsd  -0x68(%rbp),%xmm0
  movq   D2(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x68(%rbp)
L207:
  movsd  -0x80(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x88(%rbp),%xmm0
  movsd  %xmm0,-0x80(%rbp)
L188:
  movsd  -0x70(%rbp),%xmm0
  movq   D17(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x68(%rbp),%xmm2
  movsd  D43(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  -0x60(%rbp),%xmm0
  movq   D17(%rip),%xmm2
  andpd  %xmm2,%xmm0
  comisd %xmm1,%xmm0
  jbe    L137
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0xa0(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  mulsd  -0x68(%rbp),%xmm0
  comisd -0x70(%rbp),%xmm0
  jbe    L137
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0xa8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  mulsd  -0x68(%rbp),%xmm0
  comisd -0x70(%rbp),%xmm0
  jbe    L137
  movsd  -0x70(%rbp),%xmm0
  divsd  -0x68(%rbp),%xmm0
  movsd  %xmm0,-0x88(%rbp)
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  -0x88(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0x48(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0xa0(%rbp),%xmm1
  movsd  -0x50(%rbp),%xmm0
  comisd %xmm1,%xmm0
  ja     L252
  movsd  -0xa8(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x48(%rbp),%xmm1
  movsd  -0x50(%rbp),%xmm0
  comisd %xmm1,%xmm0
  ja     L252
  jmp    L262
L252:
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x78(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L160
  movsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x88(%rbp)
  jmp    L262
L160:
  movsd  -0x58(%rbp),%xmm0
  movq   D2(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  jmp    L262
L137:
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x78(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L82
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0xa8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  jmp    L259
L82:
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0xa0(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x80(%rbp)
L259:
  movsd  -0x10(%rbp),%xmm0
  mulsd  -0x80(%rbp),%xmm0
  movsd  %xmm0,-0x88(%rbp)
L262:
  movsd  -0x88(%rbp),%xmm0
  movq   D17(%rip),%xmm1
  andpd  %xmm1,%xmm0
  comisd -0x58(%rbp),%xmm0
  jb     L54
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  -0x88(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  jmp    L302
L54:
  movsd  -0x88(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L116
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  -0x58(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  jmp    L302
L116:
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  subsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x48(%rbp)
L302:
  mov    -0x48(%rbp),%rax
  mov    -0x98(%rbp),%rdx
  movq   %rax,%xmm0
  call   *%rdx
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  movsd  -0x20(%rbp),%xmm0
  comisd -0x8(%rbp),%xmm0
  jb     L192
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  comisd -0x48(%rbp),%xmm0
  jbe    L153
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  jmp    L108
L153:
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xa0(%rbp)
L108:
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0xc0(%rbp),%rax
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  jmp    L220
L192:
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  comisd -0x48(%rbp),%xmm0
  jbe    L70
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  jmp    L168
L70:
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0xa8(%rbp)
L168:
  movsd  -0x28(%rbp),%xmm0
  comisd -0x8(%rbp),%xmm0
  jae    L189
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  ucomisd -0x38(%rbp),%xmm0
  jp     L78
  ucomisd -0x38(%rbp),%xmm0
  jne    L78
L189:
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  jmp    L220
L78:
  movsd  -0x30(%rbp),%xmm0
  comisd -0x8(%rbp),%xmm0
  jae    L162
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  ucomisd -0x40(%rbp),%xmm0
  jp     L102
  ucomisd -0x40(%rbp),%xmm0
  je     L162
L102:
  movsd  -0x40(%rbp),%xmm0
  ucomisd -0x38(%rbp),%xmm0
  jp     L220
  movsd  -0x40(%rbp),%xmm0
  ucomisd -0x38(%rbp),%xmm0
  jne    L220
L162:
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
L220:
  movsd  -0xa0(%rbp),%xmm0
  movapd %xmm0,%xmm1
  addsd  -0xa8(%rbp),%xmm1
  movsd  D43(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  movq   D17(%rip),%xmm1
  andpd  %xmm1,%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movsd  -0xb0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x58(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  movsd  %xmm0,-0x50(%rbp)
L83:
  mov    -0xc0(%rbp),%rax
  movsd  (%rax),%xmm0
  subsd  -0x78(%rbp),%xmm0
  movq   D17(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  -0xa8(%rbp),%xmm1
  movapd %xmm1,%xmm2
  subsd  -0xa0(%rbp),%xmm2
  movsd  D43(%rip),%xmm1
  mulsd  %xmm1,%xmm2
  movsd  -0x50(%rbp),%xmm1
  subsd  %xmm2,%xmm1
  comisd %xmm1,%xmm0
  ja     L117
  movsd  -0x20(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D129
type: byte[8]
name: parse_data
arguments: data_tag: D43
type: f64
name: parse_data
arguments: data_tag: D17
type: qword
name: parse_data
arguments: data_tag: D2
type: f32[2]

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

tool: D43: 0.5

tool: D17: 9223372036854775807

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