user: Demonstrate the C code that generates the assembly output below:

```asm
<f14_maxcorr>:
  endbr64
  push   %r15
  xor    %eax,%eax
  push   %r14
  push   %r13
  mov    %esi,%r13d
  push   %r12
  mov    %r13d,%esi
  mov    %rdi,%r12
  xor    %edi,%edi
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  call   <allocate_vector@plt>
  mov    %r13d,%esi
  xor    %edi,%edi
  cltq
  mov    %rax,0x10(%rsp)
  xor    %eax,%eax
  call   <allocate_vector@plt>
  mov    $0x1,%edx
  mov    $0x1,%edi
  movslq %eax,%rbp
  lea    0x1(%r13),%eax
  mov    %eax,%ecx
  mov    %eax,%esi
  mov    %eax,0x28(%rsp)
  xor    %eax,%eax
  call   <allocate_matrix@plt>
  mov    %r13d,%esi
  mov    $0x1,%edi
  movslq %eax,%rbx
  xor    %eax,%eax
  call   <allocate_vector@plt>
  mov    %r13d,%esi
  mov    $0x1,%edi
  cltq
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <allocate_vector@plt>
  pxor   %xmm2,%xmm2
  cltq
  mov    %rax,0x20(%rsp)
  test   %r13d,%r13d
  jle    L10
  lea    -0x1(%r13),%eax
  mov    %r12,%r9
  lea    0x0(,%rax,8),%r11
  mov    0x10(%rsp),%rax
  lea    0x8(%r11),%rsi
  lea    (%rsi,%rax,1),%r10
  mov    %rax,%rcx
  sub    %rax,%r9
  nopl   (%rax)
L56:
  mov    (%r9,%rcx,1),%rax
  mov    %rbp,%r8
  lea    (%rsi,%rax,1),%rdi
  sub    %rax,%r8
  cs nopw 0x0(%rax,%rax,1)
L55:
  movsd  (%rcx),%xmm0
  addsd  (%rax),%xmm0
  lea    (%r8,%rax,1),%rdx
  add    $0x8,%rax
  movsd  %xmm0,(%rcx)
  movsd  (%rdx),%xmm0
  addsd  -0x8(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  cmp    %rdi,%rax
  jne    L55
  add    $0x8,%rcx
  cmp    %r10,%rcx
  jne    L56
  lea    0x8(%r12,%r11,1),%rax
  lea    0x10(%r11),%r15
  mov    %rbp,%r11
  add    %rbp,%rsi
  mov    %rax,(%rsp)
  mov    $0x8,%eax
  mov    %r12,%r14
  pxor   %xmm2,%xmm2
  sub    %r12,%rax
  mov    %r13d,0x2c(%rsp)
  neg    %r11
  mov    %rax,0x8(%rsp)
  mov    0x10(%rsp),%rax
  sub    %r12,%rax
  mov    %rax,%r13
  nopl   0x0(%rax)
L4:
  mov    0x8(%rsp),%rax
  mov    (%r14),%rdi
  lea    0x0(%r13,%r14,1),%r8
  mov    %r12,%r9
  add    %r14,%rax
  add    %r11,%rdi
  mov    (%rax,%rbx,1),%r10
  lea    0x8(%r10),%rdx
  add    %r15,%r10
  nopl   0x0(%rax)
L93:
  mov    (%r9),%rcx
  movq   $0x0,(%rdx)
  mov    %rbp,%rax
  movapd %xmm2,%xmm1
  add    %r11,%rcx
  nopl   0x0(%rax)
L23:
  movsd  (%rdi,%rax,1),%xmm0
  mulsd  (%rcx,%rax,1),%xmm0
  add    $0x8,%rax
  divsd  (%r8),%xmm0
  divsd  -0x8(%rax),%xmm0
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%rdx)
  cmp    %rax,%rsi
  jne    L23
  add    $0x8,%rdx
  add    $0x8,%r9
  cmp    %rdx,%r10
  jne    L93
  add    $0x8,%r14
  cmp    %r14,(%rsp)
  jne    L4
  mov    0x2c(%rsp),%r13d
L10:
  mov    %r13d,%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  movsd  %xmm2,(%rsp)
  call   <mkbalanced@plt>
  mov    %r13d,%esi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <reduction@plt>
  mov    0x20(%rsp),%rcx
  xor    %eax,%eax
  mov    %r13d,%esi
  mov    0x18(%rsp),%rdx
  mov    %rbx,%rdi
  call   <hessenberg@plt>
  movsd  (%rsp),%xmm2
  test   %eax,%eax
  jne    L75
  mov    0x28(%rsp),%edx
  test   %edx,%edx
  jle    L6
  lea    0x8(%rbx),%r14
  lea    0x10(%rbx,%r13,8),%r12
  movq   %xmm2,%r15
L77:
  mov    (%r14),%rax
  add    $0x8,%r14
  lea    0x8(%rax),%rdi
  call   <free@plt>
  cmp    %r14,%r12
  jne    L77
  movq   %r15,%xmm2
L6:
  lea    0x8(%rbx),%rdi
  movsd  %xmm2,(%rsp)
  call   <free@plt>
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    0x18(%rsp),%rdi
  add    $0x8,%rdi
  call   <free@plt>
  mov    0x20(%rsp),%rdi
  add    $0x8,%rdi
  call   <free@plt>
  movsd  (%rsp),%xmm2
  movq   %xmm2,%r14
L20:
  add    $0x38,%rsp
  movq   %r14,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L75:
  mov    0x18(%rsp),%rsi
  movslq %r13d,%rax
  movsd  -0x8(%rsi,%rax,8),%xmm0
  ucomisd %xmm0,%xmm2
  ja     L27
  sqrtsd %xmm0,%xmm0
  movq   %xmm0,%r14
L117:
  mov    0x28(%rsp),%eax
  test   %eax,%eax
  jle    L32
  lea    0x8(%rbx),%r15
  lea    0x10(%rbx,%r13,8),%r12
L100:
  mov    (%r15),%rax
  add    $0x8,%r15
  lea    0x8(%rax),%rdi
  call   <free@plt>
  cmp    %r15,%r12
  jne    L100
L32:
  lea    0x8(%rbx),%rdi
  call   <free@plt>
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    0x18(%rsp),%rdi
  add    $0x8,%rdi
  call   <free@plt>
  mov    0x20(%rsp),%rdi
  add    $0x8,%rdi
  call   <free@plt>
  jmp    L20
L27:
  call   <sqrt@plt>
  movq   %xmm0,%r14
  jmp    L117
```

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