user: What is the c source code of the assembly code below?

```asm
<f14_maxcorr>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%rbx
  mov    %esi,%r15d
  mov    %esi,0x10(%rsp)
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <allocate_vector@plt>
  mov    %eax,%r12d
  cltq
  mov    %rax,0x28(%rsp)
  mov    %r15d,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <allocate_vector@plt>
  mov    %eax,%ebp
  cltq
  mov    %rax,0x30(%rsp)
  lea    0x1(%r15),%eax
  mov    %eax,%esi
  mov    %eax,0x38(%rsp)
  mov    %eax,%ecx
  mov    $0x1,%edx
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <allocate_matrix@plt>
  mov    %eax,0x14(%rsp)
  cltq
  mov    %rax,0x18(%rsp)
  mov    %r15d,%esi
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <allocate_vector@plt>
  mov    %eax,0x3c(%rsp)
  cltq
  mov    %rax,0x8(%rsp)
  mov    %r15d,%esi
  mov    $0x1,%edi
  mov    $0x0,%eax
  call   <allocate_vector@plt>
  cltq
  mov    %rax,0x20(%rsp)
  test   %r15d,%r15d
  jle    L6
  mov    0x10(%rsp),%edi
  lea    -0x1(%rdi),%eax
  lea    0x8(%rbx,%rax,8),%r13
  mov    %edi,%r11d
  shl    $0x3,%r11
  mov    %rbx,%rdx
  movslq %r12d,%r12
  mov    %r12,%r15
  sub    %rbx,%r15
  movslq %ebp,%r10
L92:
  lea    (%rdx,%r15,1),%rsi
  mov    $0x0,%eax
L55:
  mov    (%rdx),%rcx
  movsd  (%rsi),%xmm0
  addsd  (%rcx,%rax,1),%xmm0
  movsd  %xmm0,(%rsi)
  lea    (%rax,%r10,1),%rcx
  mov    (%rdx),%rdi
  movsd  (%rcx),%xmm0
  addsd  (%rdi,%rax,1),%xmm0
  movsd  %xmm0,(%rcx)
  add    $0x8,%rax
  cmp    %r11,%rax
  jne    L55
  add    $0x8,%rdx
  cmp    %r13,%rdx
  jne    L92
  mov    %rbx,%rbp
  mov    $0x8,%r14d
  sub    %rbx,%r14
  movslq 0x14(%rsp),%rax
  lea    (%rax,%r14,1),%rcx
  mov    %r15,%rsi
L145:
  lea    (%rcx,%rbp,1),%r12
  lea    0x0(%rbp,%rsi,1),%r15
  mov    %rbx,%r8
L111:
  lea    (%r14,%r8,1),%r9
  mov    (%r12),%rax
  movq   $0x0,(%rax,%r9,1)
  mov    $0x0,%eax
  mov    %r14,%rdi
L135:
  mov    %r9,%rdx
  add    (%r12),%rdx
  mov    0x0(%rbp),%r14
  movsd  (%r14,%rax,1),%xmm0
  mov    (%r8),%r14
  mulsd  (%r14,%rax,1),%xmm0
  divsd  (%r15),%xmm0
  divsd  (%rax,%r10,1),%xmm0
  addsd  (%rdx),%xmm0
  movsd  %xmm0,(%rdx)
  add    $0x8,%rax
  cmp    %r11,%rax
  jne    L135
  mov    %rdi,%r14
  add    $0x8,%r8
  cmp    %r13,%r8
  jne    L111
  add    $0x8,%rbp
  cmp    %r13,%rbp
  jne    L145
L6:
  mov    0x10(%rsp),%r15d
  mov    %r15d,%esi
  mov    0x18(%rsp),%rbx
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <mkbalanced@plt>
  mov    %r15d,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <reduction@plt>
  mov    0x20(%rsp),%rcx
  mov    0x8(%rsp),%rdx
  mov    %r15d,%esi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <hessenberg@plt>
  test   %eax,%eax
  je     L136
  mov    0x10(%rsp),%edi
  cmp    $0x1,%edi
  jle    L71
  movslq 0x3c(%rsp),%rdx
  lea    0x10(%rdx),%rax
  lea    -0x2(%rdi),%ecx
  lea    0x18(%rdx,%rcx,8),%rdx
L122:
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L122
L71:
  movslq 0x10(%rsp),%rax
  mov    0x8(%rsp),%rdi
  movsd  -0x8(%rdi,%rax,8),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm0,%xmm1
  ja     L8
  sqrtsd %xmm0,%xmm0
  movq   %xmm0,%rbx
L36:
  cmpl   $0x0,0x38(%rsp)
  jle    L118
  movslq 0x14(%rsp),%rdx
  lea    0x8(%rdx),%rbp
  mov    0x10(%rsp),%eax
  lea    0x10(%rdx,%rax,8),%r12
L120:
  mov    0x0(%rbp),%rax
  lea    0x8(%rax),%rdi
  call   <free@plt>
  add    $0x8,%rbp
  cmp    %rbp,%r12
  jne    L120
L118:
  mov    0x18(%rsp),%rdi
  add    $0x8,%rdi
  call   <free@plt>
  mov    0x28(%rsp),%rdi
  call   <free@plt>
  mov    0x30(%rsp),%rdi
  call   <free@plt>
  mov    0x8(%rsp),%rdi
  add    $0x8,%rdi
  call   <free@plt>
  mov    0x20(%rsp),%rdi
  add    $0x8,%rdi
  call   <free@plt>
L148:
  movq   %rbx,%xmm0
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L136:
  cmpl   $0x0,0x38(%rsp)
  jle    L101
  movslq 0x14(%rsp),%rax
  lea    0x8(%rax),%rbx
  mov    0x10(%rsp),%edx
  lea    0x10(%rax,%rdx,8),%rbp
L79:
  mov    (%rbx),%rax
  lea    0x8(%rax),%rdi
  call   <free@plt>
  add    $0x8,%rbx
  cmp    %rbp,%rbx
  jne    L79
L101:
  mov    0x18(%rsp),%rdi
  add    $0x8,%rdi
  call   <free@plt>
  mov    0x28(%rsp),%rdi
  call   <free@plt>
  mov    0x30(%rsp),%rdi
  call   <free@plt>
  mov    0x8(%rsp),%rdi
  add    $0x8,%rdi
  call   <free@plt>
  mov    0x20(%rsp),%rdi
  add    $0x8,%rdi
  call   <free@plt>
  mov    D1(%rip),%rbx
  jmp    L148
L8:
  call   <sqrt@plt>
  movq   %xmm0,%rbx
  jmp    L36
```

tool_calls: name: retrieve_data
arguments: data_label: D1
datatype: f64

tool: D1: 0

assistant: ```c
double f14_maxcorr(double **P, int Ng) {
  int i, j, k;
  double *px, *py, **Q;
  double *x, *iy, tmp;
  double f;
  px = allocate_vector(0, Ng);
  py = allocate_vector(0, Ng);
  Q = allocate_matrix(1, Ng + 1, 1, Ng + 1);
  x = allocate_vector(1, Ng);
  iy = allocate_vector(1, Ng);
  for (i = 0; i < Ng; ++i) {
    for (j = 0; j < Ng; ++j) {
      px[i] += P[i][j];
      py[j] += P[i][j];
    }
  }
  for (i = 0; i < Ng; ++i) {
    for (j = 0; j < Ng; ++j) {
      Q[i + 1][j + 1] = 0;
      for (k = 0; k < Ng; ++k)
        Q[i + 1][j + 1] += P[i][k] * P[j][k] / px[i] / py[k];
    }
  }
  mkbalanced(Q, Ng);
  reduction(Q, Ng);
  if (!hessenberg(Q, Ng, x, iy)) {
    for (i = 1; i <= Ng + 1; i++)
      free(Q[i] + 1);
    free(Q + 1);
    free((char *)px);
    free((char *)py);
    free((x + 1));
    free((iy + 1));
    return 0.0;
  }
  for (i = 2, tmp = x[1]; i <= Ng; ++i)
    tmp = (tmp > x[i]) ? tmp : x[i];
  f = sqrt(x[Ng - 1]);
  for (i = 1; i <= Ng + 1; i++)
    free(Q[i] + 1);
  free(Q + 1);
  free((char *)px);
  free((char *)py);
  free((x + 1));
  free((iy + 1));
  return f;
}
```