user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<arrayf_find_max_point>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rcx,%r13
  mov    $0xa,%ecx
  push   %r12
  movslq %r8d,%r12
  push   %rbp
  mov    %rdi,%rbp
  mov    %r12,%r14
  push   %rbx
  mov    %rdx,%rbx
  lea    D23(%rip),%rdx
  sub    $0x58,%rsp
  mov    %rsi,0x18(%rsp)
  lea    0x28(%rsp),%r15
  mov    %r12d,%esi
  shl    $0x4,%esi
  mov    %r15,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  call   <willus_mem_alloc_warn@plt>
  mov    0x28(%rsp),%rdi
  lea    (%rdi,%r12,8),%rsi
  test   %r12d,%r12d
  jle    L64
  pxor   %xmm3,%xmm3
  xor    %eax,%eax
  movapd %xmm3,%xmm0
  movapd %xmm3,%xmm1
  nopl   (%rax)
L69:
  pxor   %xmm2,%xmm2
  cvtss2sd (%rbx,%rax,4),%xmm2
  addsd  %xmm2,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd 0x0(%r13,%rax,4),%xmm2
  add    $0x1,%rax
  addsd  %xmm2,%xmm0
  cmp    %rax,%r12
  jne    L69
  pxor   %xmm4,%xmm4
  xor    %eax,%eax
  cvtsi2sd %r14d,%xmm4
  divsd  %xmm4,%xmm1
  movapd %xmm1,%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm4,%xmm1
  nopl   0x0(%rax,%rax,1)
L39:
  pxor   %xmm0,%xmm0
  cvtss2sd (%rbx,%rax,4),%xmm0
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rdi,%rax,8)
  pxor   %xmm0,%xmm0
  cvtss2sd 0x0(%r13,%rax,4),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r12
  jne    L39
L12:
  lea    0x30(%rsp),%r8
  mov    $0x2,%ecx
  mov    %r14d,%edx
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  movsd  %xmm1,(%rsp)
  call   <gslpolyfit@plt>
  lea    D11(%rip),%rsi
  mov    %r15,%rdi
  call   <willus_mem_free@plt>
  movsd  0x40(%rsp),%xmm0
  movsd  (%rsp),%xmm1
  movsd  0x10(%rsp),%xmm3
  movsd  0x8(%rsp),%xmm2
  ucomisd %xmm3,%xmm0
  jp     L25
  je     L75
L25:
  movsd  0x38(%rsp),%xmm4
  movapd %xmm0,%xmm5
  mov    0x18(%rsp),%rax
  addsd  %xmm0,%xmm5
  movapd %xmm4,%xmm3
  xorpd  D12(%rip),%xmm3
  divsd  %xmm5,%xmm3
  cvtsd2ss %xmm3,%xmm3
  movss  %xmm3,0x0(%rbp)
  cvtss2sd %xmm3,%xmm3
  mulsd  %xmm3,%xmm0
  mulsd  %xmm3,%xmm4
  mulsd  %xmm3,%xmm0
  addsd  %xmm4,%xmm0
  addsd  0x30(%rsp),%xmm0
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%rax)
  pxor   %xmm0,%xmm0
  xor    %eax,%eax
  cvtss2sd 0x0(%rbp),%xmm0
  addsd  %xmm2,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x0(%rbp)
L35:
  mov    0x48(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L38
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L64:
  pxor   %xmm0,%xmm0
  pxor   %xmm3,%xmm3
  cvtsi2sd %r12d,%xmm0
  movapd %xmm3,%xmm2
  divsd  %xmm0,%xmm2
  movapd %xmm2,%xmm1
  jmp    L12
L75:
  mov    $0xffffffff,%eax
  jmp    L35
L38:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D23
data_type: string
name: unpack_data
arguments: label: D11
data_type: string
name: unpack_data
arguments: label: D12
data_type: f32[4]

tool: D23: arrayf_find_max_point

tool: D11: array_find_max_point

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

assistant: ```c
int arrayf_find_max_point(float *x0, float *y0, float *x, float *y, int n) {
  double c[3];
  double *tx, *ty;
  double xoff, yoff;
  int i;
  willus_mem_alloc_warn((void **)&tx, sizeof(double) * 2 * n, "arrayf_find_max_point", 10);
  ty = &tx[n];
  for (xoff = yoff = 0., i = 0; i < n; i++) {
    xoff += x[i];
    yoff += y[i];
  }
  xoff /= n;
  yoff /= n;
  for (i = 0; i < n; i++) {
    tx[i] = x[i] - xoff;
    ty[i] = y[i] - yoff;
  }
  gslpolyfit(tx, ty, n, 2, c);
  willus_mem_free((double **)&tx, "array_find_max_point");
  if (c[2] == 0)
    return (-1);
  (*x0) = (float)(-c[1] / (2. * c[2]));
  (*y0) = (float)(c[2] * (*x0) * (*x0) + c[1] * (*x0) + c[0] + yoff);
  (*x0) = (*x0) + xoff;
  return (0);
}
```