user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<nextremum>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x108,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %esi,0x48(%rsp)
  movsd  %xmm0,0x8(%rsp)
  mov    %edx,0x4c(%rsp)
  mov    %rcx,0x40(%rsp)
  mov    %r8,%r15
  mov    %fs:0x28,%rax
  mov    %rax,0xf8(%rsp)
  xor    %eax,%eax
  pxor   %xmm7,%xmm7
  movsd  %xmm7,(%rsp)
  jmp    L86
L185:
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebx,%xmm0
  mulsd  D74(%rip),%xmm0
  addsd  0x28(%rsp),%xmm0
  movq   %xmm0,%rbp
  jmp    L125
L8:
  movsd  %xmm3,0x50(%rsp,%rbx,8)
  jle    L0
  mov    %r12d,%edi
  movq   %rbp,%xmm2
  mov    $0x0,%eax
  lea    0xa0(%rsp),%rdx
  lea    0x50(%rsp),%rsi
  movsd  0x8(%rsp),%xmm4
  jmp    L137
L116:
  mov    %rcx,%rax
L137:
  movapd %xmm2,%xmm1
  subsd  (%rdx,%rax,8),%xmm1
  movapd %xmm1,%xmm0
  andpd  D55(%rip),%xmm0
  comisd %xmm0,%xmm4
  ja     L274
  movapd %xmm3,%xmm2
  subsd  (%rsi,%rax,8),%xmm2
  divsd  %xmm1,%xmm2
  movsd  %xmm2,(%rdx,%rbx,8)
  lea    0x1(%rax),%rcx
  cmp    %rax,%rdi
  jne    L116
  jmp    L233
L274:
  mov    D38(%rip),%rax
  mov    %rax,0xa0(%rsp,%rbx,8)
L233:
  movsd  0x58(%rsp),%xmm2
  xorpd  D42(%rip),%xmm2
  mov    %r12,%rax
  pxor   %xmm0,%xmm0
  lea    0xa0(%rsp),%rdx
L108:
  movapd %xmm0,%xmm1
  addsd  0x8(%rdx,%rax,8),%xmm1
  movapd %xmm2,%xmm0
  divsd  %xmm1,%xmm0
  sub    $0x1,%rax
  test   %eax,%eax
  jns    L108
L110:
  addsd  0xa0(%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  add    $0x1,%r14d
  cmp    $0x7,%r14d
  jg     L31
L189:
  add    $0x1,%rbx
  add    $0x1,%r12
L44:
  mov    %ebx,%r14d
  mov    %ebx,%r13d
  mov    (%rsp),%rbp
  cmp    $0x2,%ebx
  jle    L185
L125:
  mov    %rbp,(%r15)
  mov    0x10(%rsp),%esi
  mov    0x18(%rsp),%rdi
  mov    $0x0,%eax
  mov    0x20(%rsp),%rcx
  call   *%rcx
  movapd %xmm0,%xmm3
  andpd  D55(%rip),%xmm0
  movsd  0x8(%rsp),%xmm5
  comisd %xmm0,%xmm5
  ja     L198
  test   %r13d,%r13d
  jne    L8
  movsd  %xmm3,0x50(%rsp)
  mov    %rbp,0xa0(%rsp)
  mov    %rbp,(%rsp)
  jmp    L189
L0:
  test   %r12d,%r12d
  jns    L233
  pxor   %xmm0,%xmm0
  jmp    L110
L31:
  movsd  (%rsp),%xmm7
  movsd  %xmm7,(%r15)
  subl   $0x1,0x3c(%rsp)
  je     L198
L95:
  mov    0x30(%rsp),%rax
  mov    %rax,%r15
  movsd  (%rax),%xmm7
  movsd  %xmm7,0x28(%rsp)
  mov    $0xffffffffffffffff,%r12
  mov    $0x0,%ebx
  mov    0x38(%rsp),%eax
  mov    %eax,0x10(%rsp)
  jmp    L44
L198:
  mov    %rbp,(%r15)
  addl   $0x1,0x38(%rsp)
  addq   $0x8,0x30(%rsp)
  mov    0x48(%rsp),%esi
  cmp    %esi,0x10(%rsp)
  jge    L269
L149:
  movl   $0x5,0x3c(%rsp)
  jmp    L95
L269:
  mov    0x20(%rsp),%r15
L258:
  mov    0x40(%rsp),%rax
  mov    (%rax),%eax
  mov    %eax,0x10(%rsp)
  add    $0x1,%eax
L86:
  mov    0x40(%rsp),%rsi
  mov    %eax,(%rsi)
  cmp    0x4c(%rsp),%eax
  jge    L120
  mov    $0x1,%ebx
  pxor   %xmm6,%xmm6
  movsd  %xmm6,0x10(%rsp)
  cmpl   $0x0,0x48(%rsp)
  jle    L21
  mov    0x18(%rsp),%rbp
  mov    0x48(%rsp),%r12d
L140:
  mov    %ebx,%esi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   *%r15
  andpd  D55(%rip),%xmm0
  addsd  0x10(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsp)
  add    $0x1,%ebx
  cmp    %ebx,%r12d
  jge    L140
L21:
  movsd  0x8(%rsp),%xmm6
  comisd 0x10(%rsp),%xmm6
  ja     L120
  cmpl   $0x0,0x48(%rsp)
  jle    L258
  mov    0x18(%rsp),%rax
  mov    %rax,0x30(%rsp)
  movl   $0x1,0x38(%rsp)
  mov    %r15,0x20(%rsp)
  jmp    L149
L120:
  mov    $0x0,%esi
  mov    0x18(%rsp),%r14
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   *%r15
  movq   %xmm0,%rbx
  movslq 0x48(%rsp),%rax
  movsd  %xmm0,(%r14,%rax,8)
  mov    %r14,%rdi
  mov    (%r14),%rbp
  movq   %rbp,%xmm0
  addsd  D11(%rip),%xmm0
  movsd  %xmm0,(%r14)
  mov    $0x0,%esi
  mov    $0x0,%eax
  call   *%r15
  movq   %xmm0,%r12
  movq   %rbp,%xmm0
  subsd  D11(%rip),%xmm0
  mov    %r14,%rdi
  movsd  %xmm0,(%r14)
  mov    $0x0,%esi
  mov    $0x0,%eax
  call   *%r15
  mov    %rbp,(%r14)
  movq   %rbx,%xmm7
  addsd  %xmm7,%xmm7
  movsd  %xmm7,(%rsp)
  movq   %r12,%xmm6
  addsd  %xmm0,%xmm6
  movapd %xmm6,%xmm0
  subsd  %xmm7,%xmm0
  comisd D28(%rip),%xmm0
  mov    $0xffffffff,%eax
  mov    $0x1,%edx
  cmovbe %edx,%eax
  mov    0x40(%rsp),%rsi
  mov    %eax,0x4(%rsi)
  mov    $0x2,%ebx
  mov    %r14,%rbp
L277:
  mov    -0x8(%rbp,%rbx,8),%r13
  movq   %r13,%xmm0
  addsd  D11(%rip),%xmm0
  movsd  %xmm0,-0x8(%rbp,%rbx,8)
  mov    $0x0,%esi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   *%r15
  movq   %xmm0,%r12
  movq   %r13,%xmm0
  subsd  D11(%rip),%xmm0
  movsd  %xmm0,-0x8(%rbp,%rbx,8)
  mov    $0x0,%esi
  mov    %rbp,%rdi
  mov    $0x0,%eax
  call   *%r15
  mov    %r13,-0x8(%rbp,%rbx,8)
  mov    0x40(%rsp),%rax
  pxor   %xmm1,%xmm1
  cvtsi2sdl 0x4(%rax),%xmm1
  movq   %r12,%xmm6
  addsd  %xmm0,%xmm6
  movapd %xmm6,%xmm0
  subsd  (%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  cmp    %ebx,0x48(%rsp)
  setg   %dl
  pxor   %xmm6,%xmm6
  comisd %xmm0,%xmm6
  seta   %al
  add    $0x1,%rbx
  test   %al,%dl
  jne    L277
  comisd %xmm6,%xmm0
  jbe    L85
  mov    0x40(%rsp),%rax
  movl   $0x0,0x4(%rax)
L85:
  mov    0xf8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L195
  add    $0x108,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L195:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D74
datatype: f64
name: retrieve_data
arguments: data_label: D55
datatype: qword[2]
name: retrieve_data
arguments: data_label: D38
datatype: byte[8]
name: retrieve_data
arguments: data_label: D42
datatype: f32[4]
name: retrieve_data
arguments: data_label: D11
datatype: f64
name: retrieve_data
arguments: data_label: D28
datatype: f32[4]

tool: D74: 0.01

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

tool: {"D38": [0x82,0x4d,0xc7,0x72,0x61,0x42,0x33,0x47]}

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

tool: D11: 1e-05

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

assistant: ```c
void nextremum(double x[], int n, double eps, int k, int js[], double (*ff)()) {
  double y[10], b[10], z, t, h1, h2, f, dx;
  int i, j, m, l;
  int done = 0;
  js[0] = 0;
  h2 = 0.0;
  while (!done && js[0] < k) {
    t = 0.0;
    for (i = 1; i <= n; i++) {
      f = (*ff)(x, i);
      t = t + fabs(f);
    }
    if (t < eps)
      done = 1;
    else {
      for (i = 0; i < n; i++) {
        m = 0;
        while (m++ < 5) {
          j = 0;
          t = x[i];
          while (j <= 7) {
            if (j <= 2)
              z = t + j * 0.01;
            else
              z = h2;
            x[i] = z;
            f = (*ff)(x, i + 1);
            if (fabs(f) < eps) {
              m = 5;
              break;
            } else {
              h1 = f;
              h2 = z;
              if (j == 0) {
                y[0] = h1;
                b[0] = h2;
              } else {
                y[j] = h1;
                for (l = 0; l < j; l++) {
                  if (fabs(h2 - b[l]) < eps) {
                    b[j] = 1.0e+35;
                    break;
                  }
                  b[j] = h2 = (h1 - y[l]) / (h2 - b[l]);
                }
                h2 = 0.0;
                for (l = j - 1; l >= 0; l--)
                  h2 = -y[1] / (b[l + 1] + h2);
                h2 = h2 + b[0];
              }
              j = j + 1;
            }
          }
          x[i] = h2;
        }
        x[i] = z;
      }
      js[0]++;
    }
  }
  f = (*ff)(x, 0);
  x[n] = f;
  dx = 0.00001;
  t = x[0];
  x[0] = t + dx;
  h1 = (*ff)(x, 0);
  x[0] = t - dx;
  h2 = (*ff)(x, 0);
  x[0] = t;
  t = h1 + h2 - 2.0 * f;
  if (t > 0.0)
    js[1] = -1;
  else
    js[1] = 1;
  j = 1;
  do {
    j++;
    dx = 0.00001;
    t = x[j - 1];
    x[j - 1] = t + dx;
    h2 = (*ff)(x, 0);
    x[j - 1] = t - dx;
    h1 = (*ff)(x, 0);
    x[j - 1] = t;
    t = h1 + h2 - 2.0 * f;
  } while ((t * js[1] < 0.0) && (j < n));
  if (t * js[1] > 0.0)
    js[1] = 0;
}
```