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

```asm
<matched_filter>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %rdi,%rbp
  mov    %rsi,0x70(%rsp)
  mov    %rdx,%r12
  mov    %rdx,0x58(%rsp)
  mov    %rcx,%r13
  mov    %rcx,0x98(%rsp)
  mov    %r8,%r14
  mov    %r8,0x78(%rsp)
  mov    %r9d,%r15d
  mov    0xe8(%rsp),%eax
  lea    0x1(%rax),%ebx
  imul   0xf8(%rsp),%ebx
  imul   0x100(%rsp),%ebx
  shl    $0x3,%ebx
  mov    %ebx,%edi
  call   <malloc@plt>
  mov    %rax,0x68(%rsp)
  mov    %ebx,%edx
  mov    $0x0,%esi
  mov    %rax,%rbx
  mov    %rax,%rdi
  call   <memset@plt>
  mov    %rbx,%r9
  mov    0x100(%rsp),%r8d
  mov    0xf8(%rsp),%ecx
  mov    %r14,%rdx
  mov    0xe8(%rsp),%esi
  mov    %r13,%rdi
  call   <cumsum_square_data@plt>
  cmpl   $0x0,0xf0(%rsp)
  jle    L24
  mov    0xf8(%rsp),%ebx
  imul   0x100(%rsp),%ebx
  mov    %ebx,0x90(%rsp)
  movslq %ebx,%rax
  shl    $0x2,%rax
  mov    %rax,0x80(%rsp)
  lea    -0x1(%rbx),%eax
  lea    0x4(%r12,%rax,4),%rax
  mov    %rax,0x60(%rsp)
  mov    %ebx,%eax
  imul   0xe0(%rsp),%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,0x88(%rsp)
  mov    %rbp,0x50(%rsp)
  movslq %r15d,%rax
  lea    0x0(,%rax,4),%rcx
  mov    %rcx,0x30(%rsp)
  shl    $0x3,%rax
  mov    %rax,0x38(%rsp)
  movq   $0x0,0x40(%rsp)
  movl   $0x0,0x4c(%rsp)
  movl   $0x0,0x48(%rsp)
  mov    0xe8(%rsp),%eax
  sub    0xe0(%rsp),%eax
  mov    %eax,0x94(%rsp)
L7:
  mov    0x4c(%rsp),%eax
  mov    %eax,0xc(%rsp)
  cmpl   $0x0,0x90(%rsp)
  jle    L12
  mov    0x58(%rsp),%rdx
  add    0x40(%rsp),%rdx
  mov    $0x0,%ebp
  mov    $0x0,%edi
  mov    0x60(%rsp),%rcx
L66:
  mov    (%rdx),%eax
  cmp    %eax,%edi
  cmovg  %eax,%edi
  cmp    %eax,%ebp
  cmovl  %eax,%ebp
  add    $0x4,%rdx
  cmp    %rcx,%rdx
  jne    L66
L16:
  mov    0x50(%rsp),%rax
  mov    %rax,0x10(%rsp)
  mov    0x58(%rsp),%rcx
  mov    0x40(%rsp),%rax
  add    %rax,%rcx
  mov    %rcx,0x20(%rsp)
  mov    0x78(%rsp),%rcx
  add    %rax,%rcx
  mov    %rcx,0x28(%rsp)
  mov    0x70(%rsp),%rcx
  add    %rax,%rcx
  mov    %rcx,0x18(%rsp)
  call   <abs@plt>
  pxor   %xmm1,%xmm1
  cvtsi2ss %r15d,%xmm1
  divss  %xmm1,%xmm0
  call   <ceilf@plt>
  mov    %eax,%ebx
  imul   %r15d,%ebx
  mov    0x94(%rsp),%r14d
  sub    %ebp,%r14d
  cmp    %ebx,%r14d
  jl     L52
  movslq %ebx,%rax
  mov    0x98(%rsp),%rcx
  lea    (%rcx,%rax,4),%r12
  mov    0x68(%rsp),%rsi
  lea    0x8(%rsi,%rax,8),%rbp
L11:
  mov    %ebx,%eax
  cltd
  idiv   %r15d
  add    0xc(%rsp),%eax
  cltq
  mov    0x110(%rsp),%rsi
  lea    (%rsi,%rax,4),%r13
  mov    0x100(%rsp),%eax
  push   %rax
  mov    0x100(%rsp),%eax
  push   %rax
  mov    0xf8(%rsp),%eax
  push   %rax
  mov    0xf8(%rsp),%eax
  push   %rax
  mov    0x48(%rsp),%r9
  mov    %rbp,%r8
  mov    %r12,%rcx
  mov    0x40(%rsp),%rdx
  mov    0x38(%rsp),%rsi
  mov    0x30(%rsp),%rdi
  call   <network_corr@plt>
  movss  %xmm0,0x0(%r13)
  add    %r15d,%ebx
  add    0x50(%rsp),%r12
  add    0x58(%rsp),%rbp
  add    $0x20,%rsp
  cmp    %ebx,%r14d
  jge    L11
L52:
  addl   $0x1,0x48(%rsp)
  mov    0x48(%rsp),%eax
  mov    0x80(%rsp),%rcx
  add    %rcx,0x60(%rsp)
  mov    0x108(%rsp),%ebx
  add    %ebx,0x4c(%rsp)
  mov    0x88(%rsp),%rdi
  add    %rdi,0x50(%rsp)
  add    %rcx,0x40(%rsp)
  cmp    %eax,0xf0(%rsp)
  jne    L7
L24:
  mov    0x68(%rsp),%rdi
  call   <free@plt>
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L12:
  mov    $0x0,%ebp
  mov    $0x0,%edi
  jmp    L16
```

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