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

```asm
<arrayf_find_max_point>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%r13
  mov    %rsi,%r14
  mov    %rdx,%rbx
  mov    %rcx,%rbp
  mov    %r8d,%r12d
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  movslq %r8d,%r15
  mov    %r8d,%esi
  shl    $0x4,%esi
  lea    0x18(%rsp),%rdi
  mov    $0xa,%ecx
  lea    D33(%rip),%rdx
  call   <willus_mem_alloc_warn@plt>
  mov    0x18(%rsp),%rax
  lea    (%rax,%r15,8),%rsi
  test   %r12d,%r12d
  jle    L49
  mov    %r12d,%edx
  mov    $0x0,%eax
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm1
L19:
  pxor   %xmm2,%xmm2
  cvtss2sd (%rbx,%rax,4),%xmm2
  addsd  %xmm2,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd 0x0(%rbp,%rax,4),%xmm2
  addsd  %xmm2,%xmm0
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L19
  pxor   %xmm2,%xmm2
  cvtsi2sd %r12d,%xmm2
  divsd  %xmm2,%xmm1
  movsd  %xmm1,0x8(%rsp)
  divsd  %xmm2,%xmm0
  movsd  %xmm0,(%rsp)
  mov    $0x0,%eax
L5:
  pxor   %xmm0,%xmm0
  cvtss2sd (%rbx,%rax,4),%xmm0
  subsd  0x8(%rsp),%xmm0
  mov    0x18(%rsp),%rcx
  movsd  %xmm0,(%rcx,%rax,8)
  pxor   %xmm0,%xmm0
  cvtss2sd 0x0(%rbp,%rax,4),%xmm0
  subsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L5
L35:
  lea    0x20(%rsp),%r8
  mov    $0x2,%ecx
  mov    %r12d,%edx
  mov    0x18(%rsp),%rdi
  call   <gslpolyfit@plt>
  lea    0x18(%rsp),%rdi
  lea    D13(%rip),%rsi
  call   <willus_mem_free@plt>
  movsd  0x30(%rsp),%xmm0
  ucomisd D22(%rip),%xmm0
  jp     L37
  je     L74
L37:
  movsd  0x28(%rsp),%xmm2
  movapd %xmm2,%xmm1
  xorpd  D17(%rip),%xmm1
  movapd %xmm0,%xmm3
  addsd  %xmm0,%xmm3
  divsd  %xmm3,%xmm1
  cvtsd2ss %xmm1,%xmm1
  movss  %xmm1,0x0(%r13)
  cvtss2sd %xmm1,%xmm1
  mulsd  %xmm1,%xmm0
  mulsd  %xmm1,%xmm0
  mulsd  %xmm1,%xmm2
  addsd  %xmm2,%xmm0
  addsd  0x20(%rsp),%xmm0
  addsd  (%rsp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%r14)
  pxor   %xmm0,%xmm0
  cvtss2sd 0x0(%r13),%xmm0
  addsd  0x8(%rsp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x0(%r13)
  mov    $0x0,%eax
L10:
  mov    0x38(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L4
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L74:
  mov    $0xffffffff,%eax
  jmp    L10
L49:
  pxor   %xmm0,%xmm0
  cvtsi2sd %r12d,%xmm0
  pxor   %xmm1,%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm1,(%rsp)
  jmp    L35
L4:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D33
datatype: string
name: retrieve_data
arguments: label: D13
datatype: string
name: retrieve_data
arguments: label: D22
datatype: f64
name: retrieve_data
arguments: label: D17
datatype: byte[16]

tool: D33: arrayf_find_max_point

tool: D13: array_find_max_point

tool: D22: 0

tool: {"D17": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

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