user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<pool_forwards_cpu>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %ecx,%r13d
  mov    %edx,%ecx
  push   %r12
  imul   %r13d,%ecx
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %esi,0x88(%rsp)
  mov    %r8d,0x30(%rsp)
  mov    %r9d,0xc(%rsp)
  mov    %ecx,0x78(%rsp)
  test   %esi,%esi
  jle    L24
  mov    %edx,%eax
  movl   $0x0,0x74(%rsp)
  mov    %r13d,%r15d
  sub    %r8d,%eax
  movl   $0x0,0x68(%rsp)
  mov    %eax,0x70(%rsp)
  mov    0xd0(%rsp),%eax
  imul   %r13d,%eax
  mov    %eax,0x7c(%rsp)
  movslq 0xd8(%rsp),%rax
  mov    %rax,0x50(%rsp)
  shl    $0x3,%rax
  mov    %rax,0x58(%rsp)
  mov    %r13d,%eax
  sub    %r9d,%eax
  mov    %eax,0x4c(%rsp)
  lea    -0x2(%r9),%eax
  mov    %eax,0x8c(%rsp)
  lea    0x8(%rdi),%rax
  mov    %rax,0x28(%rsp)
L3:
  mov    0x70(%rsp),%eax
  test   %eax,%eax
  js     L34
  movslq 0x74(%rsp),%rsi
  mov    0x8c(%rsp),%eax
  movl   $0x0,0x48(%rsp)
  movl   $0x0,0x6c(%rsp)
  add    %rsi,%rax
  mov    %rsi,0x20(%rsp)
  mov    %rax,0x80(%rsp)
L93:
  mov    0x4c(%rsp),%edx
  test   %edx,%edx
  js     L104
  movslq 0x48(%rsp),%rax
  mov    0x20(%rsp),%rsi
  xor    %r13d,%r13d
  movl   $0x0,0x34(%rsp)
  mov    0x18(%rsp),%rdi
  lea    (%rax,%rsi,1),%rdx
  add    0x80(%rsp),%rax
  lea    (%rdi,%rdx,8),%rdi
  mov    %rdi,0x38(%rsp)
  mov    0x28(%rsp),%rdi
  lea    (%rdi,%rax,8),%rax
  mov    %rax,0x40(%rsp)
  mov    0xc(%rsp),%eax
  sub    $0x1,%eax
  add    %rsi,%rax
  mov    %rax,0x60(%rsp)
  nop
L102:
  mov    0x38(%rsp),%rbx
  cmpl   $0x1,0xc(%rsp)
  movsd  (%rbx),%xmm0
  jle    L55
  mov    0x40(%rsp),%rbp
  nopl   (%rax)
L64:
  movsd  0x8(%rbx),%xmm1
  add    $0x8,%rbx
  call   <max@plt>
  cmp    %rbp,%rbx
  jne    L64
L55:
  cmpl   $0x1,0x30(%rsp)
  jle    L52
  mov    0x48(%rsp),%eax
  mov    $0x1,%ebp
  lea    (%rax,%r15,1),%r12d
  mov    0x60(%rsp),%rax
  add    %r13,%rax
  mov    %rax,0x10(%rsp)
  nopl   0x0(%rax)
L92:
  mov    0xc(%rsp),%ecx
  test   %ecx,%ecx
  jle    L106
  mov    0x20(%rsp),%rax
  movslq %r12d,%rdx
  mov    0x18(%rsp),%rcx
  add    %r13,%rax
  add    %rdx,%rax
  add    0x10(%rsp),%rdx
  lea    (%rcx,%rax,8),%r14
  mov    0x28(%rsp),%rax
  lea    (%rax,%rdx,8),%rbx
  nopl   (%rax)
L22:
  movsd  (%r14),%xmm1
  add    $0x8,%r14
  call   <max@plt>
  cmp    %r14,%rbx
  jne    L22
L106:
  add    $0x1,%ebp
  add    %r15d,%r12d
  cmp    %ebp,0x30(%rsp)
  jne    L92
L52:
  addq   $0x8,0xe0(%rsp)
  mov    0xe0(%rsp),%rax
  mov    0x58(%rsp),%rdi
  mov    0xd8(%rsp),%esi
  movsd  %xmm0,-0x8(%rax)
  add    0x50(%rsp),%r13
  add    %esi,0x34(%rsp)
  mov    0x34(%rsp),%eax
  add    %rdi,0x38(%rsp)
  add    %rdi,0x40(%rsp)
  cmp    %eax,0x4c(%rsp)
  jge    L102
L104:
  mov    0xd0(%rsp),%esi
  mov    0x7c(%rsp),%edi
  add    %esi,0x6c(%rsp)
  mov    0x6c(%rsp),%eax
  add    %edi,0x48(%rsp)
  cmp    %eax,0x70(%rsp)
  jge    L93
L34:
  addl   $0x1,0x68(%rsp)
  mov    0x78(%rsp),%edi
  mov    0x68(%rsp),%eax
  add    %edi,0x74(%rsp)
  cmp    %eax,0x88(%rsp)
  jne    L3
L24:
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void pool_forwards_cpu(const double *data_im, const int channels, const int height, const int width, const int kernel_h, const int kernel_w, const int stride_h, const int stride_w, double *data_pooled) {
  const int channel_size = height * width;
  for (int channel = 0; channel < channels; channel++) {
    for (int fitting_height = 0; fitting_height <= (height - kernel_h); fitting_height += stride_h) {
      for (int fitting_width = 0; fitting_width <= (width - kernel_w); fitting_width += stride_w) {
        int max_index = fitting_height * width + fitting_width + channel_size * channel;
        double max_value = data_im[max_index];
        for (int kernel_col = 1; kernel_col < kernel_w; kernel_col++) {
          int input_row = fitting_height;
          int input_col = fitting_width + kernel_col;
          int data_index = input_row * width + input_col + channel_size * channel;
          double data_value = data_im[data_index];
          max_value = max(max_value, data_value);
        }
        for (int kernel_row = 1; kernel_row < kernel_h; kernel_row++) {
          for (int kernel_col = 0; kernel_col < kernel_w; kernel_col++) {
            int input_row = fitting_height + kernel_row;
            int input_col = fitting_width + kernel_col;
            int data_index = input_row * width + input_col + channel_size * channel;
            double data_value = data_im[data_index];
            max_value = max(max_value, data_value);
          }
        }
        *(data_pooled++) = max_value;
      }
    }
  }
}
```