user: What would the C source look like for the assembly code provided here:

```asm
<extremum>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x120,%rsp
  mov    %rdi,-0xf8(%rbp)
  movsd  %xmm0,-0x100(%rbp)
  mov    %esi,-0x104(%rbp)
  mov    %rdx,-0x110(%rbp)
  mov    %rcx,-0x118(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0xe4(%rbp)
  mov    -0x110(%rbp),%rax
  movl   $0x0,(%rax)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  jmp    L75
L130:
  movl   $0x0,-0xe8(%rbp)
  jmp    L91
L25:
  cmpl   $0x2,-0xe8(%rbp)
  jg     L96
  mov    -0xf8(%rbp),%rax
  movsd  (%rax),%xmm1
  pxor   %xmm2,%xmm2
  cvtsi2sdl -0xe8(%rbp),%xmm2
  movsd  D20(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  jmp    L16
L96:
  movsd  -0xd8(%rbp),%xmm0
  movsd  %xmm0,-0xe0(%rbp)
L16:
  lea    -0xc0(%rbp),%rdx
  mov    -0xe0(%rbp),%rax
  mov    -0x118(%rbp),%rcx
  mov    %rdx,%rdi
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   *%rcx
  movsd  -0xb8(%rbp),%xmm0
  movq   D7(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x100(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L200
  movl   $0x1,-0xe4(%rbp)
  jmp    L17
L200:
  movsd  -0xb8(%rbp),%xmm0
  movsd  %xmm0,-0xc8(%rbp)
  movsd  -0xe0(%rbp),%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  cmpl   $0x0,-0xe8(%rbp)
  jne    L187
  movsd  -0xc8(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0xd8(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  jmp    L121
L187:
  mov    -0xe8(%rbp),%eax
  cltq
  movsd  -0xc8(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp,%rax,8)
  movl   $0x0,-0xec(%rbp)
  jmp    L209
L137:
  mov    -0xec(%rbp),%eax
  cltq
  movsd  -0x60(%rbp,%rax,8),%xmm1
  movsd  -0xd8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movq   D7(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x100(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L125
  mov    -0xe8(%rbp),%eax
  cltq
  movsd  D41(%rip),%xmm0
  movsd  %xmm0,-0x60(%rbp,%rax,8)
  jmp    L65
L125:
  mov    -0xec(%rbp),%eax
  cltq
  movsd  -0xb0(%rbp,%rax,8),%xmm1
  movsd  -0xc8(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  mov    -0xec(%rbp),%eax
  cltq
  movsd  -0x60(%rbp,%rax,8),%xmm2
  movsd  -0xd8(%rbp),%xmm1
  subsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  mov    -0xe8(%rbp),%eax
  cltq
  movsd  -0xd8(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp,%rax,8)
  addl   $0x1,-0xec(%rbp)
L209:
  mov    -0xec(%rbp),%eax
  cmp    -0xe8(%rbp),%eax
  jl     L137
L65:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  mov    -0xe8(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0xec(%rbp)
  jmp    L100
L33:
  mov    -0xec(%rbp),%eax
  cltq
  movsd  -0xb0(%rbp,%rax,8),%xmm0
  movq   D50(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mov    -0xec(%rbp),%eax
  add    $0x1,%eax
  cltq
  movsd  -0x60(%rbp,%rax,8),%xmm1
  addsd  -0xd8(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  subl   $0x1,-0xec(%rbp)
L100:
  cmpl   $0x0,-0xec(%rbp)
  jns    L33
  movsd  -0x60(%rbp),%xmm0
  movsd  -0xd8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xd8(%rbp)
L121:
  addl   $0x1,-0xe8(%rbp)
L91:
  cmpl   $0x7,-0xe8(%rbp)
  jle    L25
L17:
  mov    -0xf8(%rbp),%rax
  movsd  -0xd8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x110(%rbp),%rax
  mov    (%rax),%eax
  lea    0x1(%rax),%edx
  mov    -0x110(%rbp),%rax
  mov    %edx,(%rax)
L75:
  cmpl   $0x0,-0xe4(%rbp)
  jne    L116
  mov    -0x110(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x104(%rbp)
  jg     L130
L116:
  mov    -0xf8(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  lea    -0xc0(%rbp),%rdx
  mov    -0xe0(%rbp),%rax
  mov    -0x118(%rbp),%rcx
  mov    %rdx,%rdi
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   *%rcx
  mov    -0xf8(%rbp),%rax
  add    $0x8,%rax
  movsd  -0xc0(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xf8(%rbp),%rax
  movsd  (%rax),%xmm0
  movq   D7(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  D96(%rip),%xmm0
  comisd %xmm1,%xmm0
  jb     L174
  movsd  D73(%rip),%xmm0
  movsd  %xmm0,-0xd0(%rbp)
  jmp    L129
L174:
  mov    -0xf8(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D73(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movq   D7(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0xd0(%rbp)
L129:
  mov    -0xf8(%rbp),%rax
  movsd  (%rax),%xmm0
  subsd  -0xd0(%rbp),%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  lea    -0xc0(%rbp),%rdx
  mov    -0xe0(%rbp),%rax
  mov    -0x118(%rbp),%rcx
  mov    %rdx,%rdi
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   *%rcx
  movsd  -0xc0(%rbp),%xmm0
  movsd  %xmm0,-0xc8(%rbp)
  mov    -0xf8(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  -0xd0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  lea    -0xc0(%rbp),%rdx
  mov    -0xe0(%rbp),%rax
  mov    -0x118(%rbp),%rcx
  mov    %rdx,%rdi
  movq   %rax,%xmm0
  mov    $0x1,%eax
  call   *%rcx
  movsd  -0xc0(%rbp),%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  movsd  -0xc8(%rbp),%xmm0
  movapd %xmm0,%xmm1
  addsd  -0xd8(%rbp),%xmm1
  mov    -0xf8(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm0,%xmm0
  subsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  jb     L202
  mov    -0x110(%rbp),%rax
  add    $0x4,%rax
  movl   $0x1,(%rax)
  jmp    L60
L202:
  mov    -0x110(%rbp),%rax
  add    $0x4,%rax
  movl   $0xffffffff,(%rax)
L60:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L104
  call   <__stack_chk_fail@plt>
L104:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D20
data_type: f64
name: unpack_data
arguments: tag: D7
data_type: qword
name: unpack_data
arguments: tag: D41
data_type: byte[8]
name: unpack_data
arguments: tag: D50
data_type: f32[2]
name: unpack_data
arguments: tag: D96
data_type: f64
name: unpack_data
arguments: tag: D73
data_type: byte[8]

tool: D20: 0.01

tool: D7: 9223372036854775807

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

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

tool: D96: 1

tool: {"D73": [0xf1,0x68,0xe3,0x88,0xb5,0xf8,0xe4,0x3e]}

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