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

```asm
<nextremum>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x108,%rsp
  mov    %esi,0x48(%rsp)
  mov    %edx,0x4c(%rsp)
  mov    %rcx,0x40(%rsp)
  mov    %r8,0x20(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xf8(%rsp)
  xor    %eax,%eax
  movl   $0x0,(%rcx)
  test   %edx,%edx
  jle    L230
  movapd %xmm0,%xmm5
  pxor   %xmm1,%xmm1
L201:
  mov    0x48(%rsp),%eax
  mov    $0x1,%ebx
  pxor   %xmm2,%xmm2
  test   %eax,%eax
  jle    L167
  mov    0x48(%rsp),%ebp
  mov    0x20(%rsp),%r12
  movq   %xmm1,%r14
  movq   %xmm5,%r13
  nopl   0x0(%rax,%rax,1)
L68:
  movsd  %xmm2,(%rsp)
  mov    %ebx,%esi
  mov    %r15,%rdi
  xor    %eax,%eax
  call   *%r12
  movq   D78(%rip),%xmm4
  movsd  (%rsp),%xmm2
  add    $0x1,%ebx
  andpd  %xmm4,%xmm0
  addsd  %xmm0,%xmm2
  cmp    %ebx,%ebp
  jge    L68
  movq   %r13,%xmm5
  movq   %r14,%xmm1
  comisd %xmm2,%xmm5
  ja     L230
  mov    0x48(%rsp),%eax
  lea    0xa0(%rsp),%r14
  movq   $0x1,0x18(%rsp)
  mov    %r14,%r13
  mov    %r15,%r14
  add    $0x1,%eax
  mov    %rax,0x38(%rsp)
L139:
  mov    0x18(%rsp),%rax
  movl   $0x5,0x34(%rsp)
  mov    %r14,%r15
  movsd  -0x8(%r14,%rax,8),%xmm7
  mov    %eax,%ebp
  mov    %r13,%r14
  movsd  %xmm7,0x28(%rsp)
  nopl   0x0(%rax)
L104:
  mov    %r15,%rbx
  xor    %r13d,%r13d
  mov    %r14,%r15
  jmp    L46
  nopl   0x0(%rax,%rax,1)
L221:
  movsd  %xmm2,0x50(%rsp)
  movapd %xmm3,%xmm1
  movsd  %xmm3,0xa0(%rsp)
L220:
  add    $0x1,%r13
  add    $0x8,%r15
L46:
  mov    %r13d,%r12d
  movapd %xmm1,%xmm3
  cmp    $0x2,%r13
  ja     L39
  pxor   %xmm3,%xmm3
  cvtsi2sd %r13d,%xmm3
  mulsd  D85(%rip),%xmm3
  addsd  0x28(%rsp),%xmm3
L39:
  mov    0x18(%rsp),%rax
  movsd  %xmm5,0x10(%rsp)
  mov    %ebp,%esi
  mov    %rbx,%rdi
  movsd  %xmm1,0x8(%rsp)
  mov    0x20(%rsp),%rcx
  movsd  %xmm3,-0x8(%rbx,%rax,8)
  xor    %eax,%eax
  movsd  %xmm3,(%rsp)
  call   *%rcx
  movq   D78(%rip),%xmm4
  movsd  0x10(%rsp),%xmm5
  movapd %xmm0,%xmm2
  movsd  (%rsp),%xmm3
  movsd  0x8(%rsp),%xmm1
  andpd  %xmm4,%xmm0
  comisd %xmm0,%xmm5
  ja     L177
  test   %r13,%r13
  je     L221
  lea    0x50(%rsp),%rsi
  movapd %xmm3,%xmm0
  xor    %eax,%eax
  movsd  %xmm2,(%rsi,%r13,8)
  jmp    L212
  nopl   0x0(%rax,%rax,1)
L22:
  movapd %xmm2,%xmm0
  subsd  (%rsi,%rax,8),%xmm0
  add    $0x1,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%r15)
  cmp    %eax,%r12d
  jle    L97
L212:
  movapd %xmm0,%xmm1
  subsd  (%r14,%rax,8),%xmm1
  movapd %xmm1,%xmm0
  andpd  %xmm4,%xmm0
  comisd %xmm0,%xmm5
  jbe    L22
  mov    D10(%rip),%rax
  mov    %rax,(%r15)
  movq   %rax,%xmm0
L97:
  movsd  0x58(%rsp),%xmm2
  lea    -0x2(%r13),%rax
  xorpd  D27(%rip),%xmm2
  pxor   %xmm1,%xmm1
  jmp    L166
  nopw   0x0(%rax,%rax,1)
L215:
  movsd  0x8(%r14,%rax,8),%xmm0
  sub    $0x1,%rax
L166:
  addsd  %xmm1,%xmm0
  movapd %xmm2,%xmm1
  divsd  %xmm0,%xmm1
  cmp    $0xffffffff,%eax
  jne    L215
  addsd  0xa0(%rsp),%xmm1
  cmp    $0x7,%r13
  jne    L220
  subl   $0x1,0x34(%rsp)
  mov    0x18(%rsp),%rax
  mov    %rbx,%r15
  movsd  %xmm1,-0x8(%rbx,%rax,8)
  je     L66
  movsd  %xmm1,0x28(%rsp)
  jmp    L104
  nopl   0x0(%rax,%rax,1)
L177:
  mov    %r14,%r13
  mov    %rbx,%r14
L218:
  mov    0x18(%rsp),%rax
  movsd  %xmm3,-0x8(%r14,%rax,8)
  add    $0x1,%rax
  mov    %rax,0x18(%rsp)
  cmp    0x38(%rsp),%rax
  jne    L139
  mov    %r14,%r15
L78:
  mov    0x40(%rsp),%rdx
  mov    (%rdx),%eax
  mov    %eax,(%rsp)
  add    $0x1,%eax
  mov    %eax,(%rdx)
  cmp    0x4c(%rsp),%eax
  jl     L201
L230:
  mov    0x20(%rsp),%rbp
  xor    %esi,%esi
  xor    %eax,%eax
  mov    %r15,%rdi
  call   *%rbp
  movslq 0x48(%rsp),%rax
  xor    %esi,%esi
  mov    %r15,%rdi
  movsd  %xmm0,0x10(%rsp)
  mov    $0x2,%ebx
  movsd  %xmm0,(%r15,%rax,8)
  movsd  (%r15),%xmm7
  mov    %rax,%r12
  xor    %eax,%eax
  movsd  D75(%rip),%xmm0
  movsd  %xmm7,(%rsp)
  addsd  %xmm7,%xmm0
  movsd  %xmm0,(%r15)
  call   *%rbp
  movsd  (%rsp),%xmm7
  xor    %eax,%eax
  xor    %esi,%esi
  subsd  D75(%rip),%xmm7
  movsd  %xmm0,0x8(%rsp)
  mov    %r15,%rdi
  movsd  %xmm7,(%r15)
  call   *%rbp
  movsd  0x10(%rsp),%xmm1
  movsd  (%rsp),%xmm7
  mov    $0xffffffff,%eax
  addsd  0x8(%rsp),%xmm0
  mov    $0x1,%edx
  mov    0x40(%rsp),%r13
  movsd  %xmm7,(%r15)
  movapd %xmm1,%xmm7
  addsd  %xmm1,%xmm7
  subsd  %xmm7,%xmm0
  movsd  %xmm7,0x10(%rsp)
  pxor   %xmm7,%xmm7
  comisd %xmm7,%xmm0
  cmovbe %edx,%eax
  mov    %eax,0x4(%r13)
  nopl   0x0(%rax)
L31:
  movsd  -0x8(%r15,%rbx,8),%xmm7
  xor    %esi,%esi
  xor    %eax,%eax
  mov    %r15,%rdi
  movsd  D75(%rip),%xmm0
  movsd  %xmm7,(%rsp)
  addsd  %xmm7,%xmm0
  movsd  %xmm0,-0x8(%r15,%rbx,8)
  call   *%rbp
  movsd  (%rsp),%xmm6
  xor    %eax,%eax
  xor    %esi,%esi
  subsd  D75(%rip),%xmm6
  movsd  %xmm0,0x8(%rsp)
  mov    %r15,%rdi
  movsd  %xmm6,-0x8(%r15,%rbx,8)
  call   *%rbp
  pxor   %xmm1,%xmm1
  addsd  0x8(%rsp),%xmm0
  cmp    %ebx,%r12d
  cvtsi2sdl 0x4(%r13),%xmm1
  subsd  0x10(%rsp),%xmm0
  pxor   %xmm7,%xmm7
  setg   %dl
  movsd  (%rsp),%xmm6
  movsd  %xmm6,-0x8(%r15,%rbx,8)
  mulsd  %xmm1,%xmm0
  comisd %xmm0,%xmm7
  seta   %al
  add    $0x1,%rbx
  test   %al,%dl
  jne    L31
  comisd %xmm7,%xmm0
  jbe    L20
  mov    0x40(%rsp),%rax
  movl   $0x0,0x4(%rax)
L20:
  mov    0xf8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L63
  add    $0x108,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L167:
  pxor   %xmm7,%xmm7
  comisd %xmm7,%xmm5
  jbe    L78
  jmp    L230
L66:
  mov    %r14,%r13
  mov    %rbx,%r14
  jmp    L218
L63:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_tag: D78
data_type: qword
name: unpack_data
arguments: data_tag: D85
data_type: f64
name: unpack_data
arguments: data_tag: D10
data_type: byte[8]
name: unpack_data
arguments: data_tag: D27
data_type: f32[4]
name: unpack_data
arguments: data_tag: D75
data_type: f64

tool: D78: 9223372036854775807

tool: D85: 0.01

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

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

tool: D75: 1e-05

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;
}
```