user: Translate the below assembly code into C programming language:

```asm
<arrayf_get_lsq_slope>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %rdx,-0x68(%rbp)
  mov    %rcx,-0x70(%rbp)
  mov    %r8d,-0x74(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x74(%rbp),%eax
  cltq
  shl    $0x4,%eax
  mov    %eax,%esi
  lea    -0x40(%rbp),%rax
  mov    $0xa,%ecx
  lea    D12(%rip),%rdx
  mov    %rax,%rdi
  call   <willus_mem_alloc_warn@plt>
  mov    -0x40(%rbp),%rdx
  mov    -0x74(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    %rax,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movl   $0x0,-0x44(%rbp)
  jmp    L28
L39:
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  cvtss2sd %xmm0,%xmm0
  movsd  -0x38(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  cvtss2sd %xmm0,%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  addl   $0x1,-0x44(%rbp)
L28:
  mov    -0x44(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jl     L39
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x74(%rbp),%xmm1
  movsd  -0x38(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x74(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movl   $0x0,-0x44(%rbp)
  jmp    L25
L22:
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  cvtss2sd %xmm0,%xmm0
  mov    -0x40(%rbp),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  subsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  cvtss2sd %xmm0,%xmm0
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  subsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x44(%rbp)
L25:
  mov    -0x44(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jl     L22
  mov    -0x40(%rbp),%rax
  lea    -0x20(%rbp),%rcx
  mov    -0x74(%rbp),%edx
  mov    -0x28(%rbp),%rsi
  mov    %rcx,%r8
  mov    $0x1,%ecx
  mov    %rax,%rdi
  call   <gslpolyfit@plt>
  lea    -0x40(%rbp),%rax
  lea    D12(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <willus_mem_free@plt>
  movsd  -0x18(%rbp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  mov    -0x58(%rbp),%rax
  movss  %xmm0,(%rax)
  movsd  -0x20(%rbp),%xmm0
  addsd  -0x30(%rbp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  mov    -0x60(%rbp),%rax
  movss  %xmm0,(%rax)
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L10
  call   <__stack_chk_fail@plt>
L10:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D12
type_guessed: string

tool: D12: arrayf_get_lsq_slope

assistant: ```c
void arrayf_get_lsq_slope(float *m, float *b, float *x, float *y, int n) {
  double c[2];
  double *tx, *ty;
  double xoff, yoff;
  int i;
  willus_mem_alloc_warn((void **)&tx, sizeof(double) * 2 * n, "arrayf_get_lsq_slope", 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, 1, c);
  willus_mem_free((double **)&tx, "arrayf_get_lsq_slope");
  (*m) = (float)c[1];
  (*b) = (float)(c[0] + yoff);
}
```