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

```asm
<matched_filter>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %r9d,%ebx
  sub    $0xb8,%rsp
  mov    0xf8(%rsp),%r14d
  mov    0xf0(%rsp),%eax
  mov    %rsi,0x80(%rsp)
  mov    0x108(%rsp),%r15d
  mov    0x118(%rsp),%esi
  mov    %r8,0x60(%rsp)
  mov    %eax,0x28(%rsp)
  lea    0x1(%r14),%r12d
  mov    0x100(%rsp),%eax
  imul   %r15d,%r12d
  mov    %esi,0x90(%rsp)
  mov    0x120(%rsp),%rsi
  mov    %eax,0x6c(%rsp)
  mov    0x110(%rsp),%eax
  mov    %rcx,0x88(%rsp)
  imul   %eax,%r12d
  mov    %rdx,0x70(%rsp)
  mov    %eax,%r13d
  mov    %rsi,0x38(%rsp)
  mov    %r14d,0x2c(%rsp)
  shl    $0x3,%r12d
  mov    %r15d,0x30(%rsp)
  mov    %r12d,%edi
  mov    %eax,0x34(%rsp)
  call   <malloc@plt>
  mov    %r12d,%edx
  xor    %esi,%esi
  mov    %rax,%rdi
  mov    %rax,%r12
  mov    %rax,0x78(%rsp)
  call   <memset@plt>
  mov    0x60(%rsp),%rdx
  mov    %r12,%r9
  mov    %r13d,%r8d
  mov    0x88(%rsp),%rdi
  mov    %r15d,%ecx
  mov    %r14d,%esi
  call   <cumsum_square_data@plt>
  mov    0x6c(%rsp),%edx
  test   %edx,%edx
  jle    L6
  mov    0x30(%rsp),%ecx
  imul   0x34(%rsp),%ecx
  pxor   %xmm2,%xmm2
  movq   $0x0,0x50(%rsp)
  mov    0x28(%rsp),%eax
  mov    0x2c(%rsp),%edi
  cvtsi2ss %ebx,%xmm2
  movl   $0x0,0x8(%rsp)
  movl   $0x0,0x68(%rsp)
  sub    %eax,%edi
  imul   %ecx,%eax
  mov    %ecx,0x94(%rsp)
  mov    %edi,0xa8(%rsp)
  mov    0x70(%rsp),%rdi
  movss  %xmm2,0xac(%rsp)
  cltq
  shl    $0x2,%rax
  mov    %rax,0x98(%rsp)
  movslq %ecx,%rax
  shl    $0x2,%rax
  mov    %rax,0xa0(%rsp)
  lea    -0x1(%rcx),%eax
  lea    0x4(%rdi,%rax,4),%rax
  mov    %rax,0x58(%rsp)
  movslq %ebx,%rax
  lea    0x0(,%rax,4),%rsi
  shl    $0x3,%rax
  mov    %rsi,0x48(%rsp)
  mov    %rax,0x40(%rsp)
  nopl   0x0(%rax,%rax,1)
L57:
  mov    0x94(%rsp),%eax
  test   %eax,%eax
  jle    L63
  mov    0x70(%rsp),%rax
  add    0x50(%rsp),%rax
  xor    %r12d,%r12d
  xor    %edi,%edi
  mov    %rax,0x20(%rsp)
  mov    0x58(%rsp),%rcx
  mov    %rax,%rdx
  nopl   0x0(%rax,%rax,1)
L20:
  mov    (%rdx),%eax
  cmp    %eax,%edi
  cmovg  %eax,%edi
  cmp    %eax,%r12d
  cmovl  %eax,%r12d
  add    $0x4,%rdx
  cmp    %rcx,%rdx
  jne    L20
L19:
  mov    0x50(%rsp),%rcx
  mov    0x60(%rsp),%rax
  add    %rcx,%rax
  mov    %rax,0x18(%rsp)
  mov    0x80(%rsp),%rax
  add    %rcx,%rax
  mov    %rax,0x10(%rsp)
  call   <abs@plt>
  divss  0xac(%rsp),%xmm0
  call   <ceilf@plt>
  mov    %eax,%r15d
  mov    0xa8(%rsp),%eax
  imul   %ebx,%r15d
  sub    %r12d,%eax
  mov    %eax,0xc(%rsp)
  cmp    %r15d,%eax
  jl     L0
  mov    0x88(%rsp),%rcx
  mov    0x78(%rsp),%rsi
  movslq %r15d,%rax
  mov    %r15d,%r13d
  lea    0x8(%rsi,%rax,8),%r12
  lea    (%rcx,%rax,4),%r14
  mov    %r12,%r15
  mov    %ebx,%r12d
  mov    %r14,%rbx
  nop
L17:
  mov    %r13d,%eax
  mov    0x38(%rsp),%rsi
  mov    %r15,%r8
  mov    %rbx,%rcx
  cltd
  mov    %rbp,%rdi
  add    %r12d,%r13d
  idiv   %r12d
  add    0x8(%rsp),%eax
  cltq
  lea    (%rsi,%rax,4),%r14
  mov    0x34(%rsp),%eax
  push   %rax
  mov    0x38(%rsp),%eax
  push   %rax
  mov    0x3c(%rsp),%eax
  push   %rax
  mov    0x40(%rsp),%eax
  push   %rax
  mov    0x38(%rsp),%r9
  mov    0x40(%rsp),%rdx
  mov    0x30(%rsp),%rsi
  call   <network_corr@plt>
  add    0x68(%rsp),%rbx
  add    0x60(%rsp),%r15
  add    $0x20,%rsp
  movss  %xmm0,(%r14)
  cmp    %r13d,0xc(%rsp)
  jge    L17
  mov    %r12d,%ebx
L0:
  mov    0xa0(%rsp),%rsi
  addl   $0x1,0x68(%rsp)
  mov    0x90(%rsp),%edi
  add    %rsi,0x58(%rsp)
  add    %edi,0x8(%rsp)
  mov    0x68(%rsp),%eax
  add    %rsi,0x50(%rsp)
  add    0x98(%rsp),%rbp
  cmp    %eax,0x6c(%rsp)
  jne    L57
L6:
  mov    0x78(%rsp),%rdi
  add    $0xb8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <free@plt>
  nopw   0x0(%rax,%rax,1)
L63:
  mov    0x70(%rsp),%rax
  mov    0x50(%rsp),%rsi
  xor    %r12d,%r12d
  xor    %edi,%edi
  add    %rsi,%rax
  mov    %rax,0x20(%rsp)
  jmp    L19
```

assistant: ```c
void matched_filter(float *templates, float *sum_square_templates, int *moveouts, float *data, float *weights, int step, int n_samples_template, int n_samples_data, int n_templates, int n_stations, int n_components, int n_corr, float *cc_sum) {
  int t, ch, i;
  int start_i, stop_i, cc_i;
  int min_moveout, max_moveout;
  int network_offset, station_offset, cc_sum_offset;
  int *moveouts_t = NULL;
  float *templates_t = NULL, *sum_square_templates_t = NULL, *weights_t = NULL;
  double *csum_square_data = NULL;
  csum_square_data = malloc(((n_samples_data + 1) * n_stations * n_components) * sizeof(double));
  memset(csum_square_data, 0., ((n_samples_data + 1) * n_stations * n_components) * sizeof(double));
  cumsum_square_data(data, n_samples_data, weights, n_stations, n_components, csum_square_data);
  for (t = 0; t < n_templates; t++) {
    network_offset = t * n_stations * n_components;
    station_offset = t * n_stations;
    cc_sum_offset = t * n_corr;
    min_moveout = 0;
    max_moveout = 0;
    for (ch = 0; ch < (n_stations * n_components); ch++) {
      if (moveouts[network_offset + ch] < min_moveout)
        min_moveout = moveouts[network_offset + ch];
      if (moveouts[network_offset + ch] > max_moveout)
        max_moveout = moveouts[network_offset + ch];
    }
    templates_t = templates + network_offset * n_samples_template;
    moveouts_t = moveouts + network_offset;
    weights_t = weights + network_offset;
    sum_square_templates_t = sum_square_templates + network_offset;
    start_i = (int)(ceilf(abs(min_moveout) / (float)step)) * step;
    stop_i = 1 + (n_samples_data - n_samples_template - max_moveout);
#pragma omp parallel for private(i, cc_i)
    for (i = start_i; i < stop_i; i += step) {
      cc_i = i / step;
      cc_sum[cc_sum_offset + cc_i] = network_corr(templates_t, sum_square_templates_t, moveouts_t, data + i, csum_square_data + i + 1, weights_t, n_samples_template, n_samples_data, n_stations, n_components);
    }
  }
  free(csum_square_data);
}
```