user: 请从给定的汇编指令推导出C源代码:

```asm
<core_max_pool>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x160,%rsp
  mov    %edi,-0x134(%rbp)
  mov    %rsi,-0x140(%rbp)
  mov    %rdx,-0x148(%rbp)
  mov    %rcx,-0x150(%rbp)
  mov    %r8,-0x158(%rbp)
  mov    %r9d,-0x138(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x130(%rbp)
  jmp    L27
L66:
  mov    -0x130(%rbp),%eax
  cltq
  mov    0x10(%rbp),%edx
  mov    %edx,-0x50(%rbp,%rax,4)
  addl   $0x1,-0x130(%rbp)
L27:
  mov    -0x130(%rbp),%eax
  cmp    -0x134(%rbp),%eax
  jl     L66
  lea    -0x50(%rbp),%rdx
  mov    -0x134(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <size_from_shape2@plt>
  mov    %eax,-0x124(%rbp)
  mov    -0x150(%rbp),%rdx
  mov    -0x134(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <size_from_shape2@plt>
  mov    %eax,-0x120(%rbp)
  lea    -0x110(%rbp),%rdx
  mov    -0x134(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <indices_reset@plt>
  movl   $0x0,-0x130(%rbp)
  jmp    L42
L61:
  movsd  D5(%rip),%xmm0
  movsd  %xmm0,-0x118(%rbp)
  lea    -0x90(%rbp),%rdx
  mov    -0x134(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <indices_reset@plt>
  movl   $0x0,-0x12c(%rbp)
  jmp    L7
L68:
  movl   $0x0,-0x128(%rbp)
  jmp    L57
L22:
  mov    -0x128(%rbp),%eax
  cltq
  mov    -0x110(%rbp,%rax,4),%eax
  imul   -0x138(%rbp),%eax
  mov    %eax,%edx
  mov    -0x128(%rbp),%eax
  cltq
  mov    -0x90(%rbp,%rax,4),%eax
  add    %eax,%edx
  mov    -0x128(%rbp),%eax
  cltq
  mov    %edx,-0xd0(%rbp,%rax,4)
  addl   $0x1,-0x128(%rbp)
L57:
  mov    -0x128(%rbp),%eax
  cmp    -0x134(%rbp),%eax
  jl     L22
  lea    -0xd0(%rbp),%rdx
  mov    -0x140(%rbp),%rcx
  mov    -0x134(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <cnnc_inline_idxs_to_pos@plt>
  mov    %eax,-0x11c(%rbp)
  cmpl   $0x0,-0x11c(%rbp)
  js     L13
  mov    -0x11c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x148(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  cvtss2sd %xmm0,%xmm0
  comisd -0x118(%rbp),%xmm0
  jbe    L13
  mov    -0x11c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x148(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  cvtss2sd %xmm0,%xmm0
  movsd  %xmm0,-0x118(%rbp)
L13:
  lea    -0x90(%rbp),%rdx
  lea    -0x50(%rbp),%rcx
  mov    -0x134(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <indices_inc@plt>
  addl   $0x1,-0x12c(%rbp)
L7:
  mov    -0x12c(%rbp),%eax
  cmp    -0x124(%rbp),%eax
  jl     L68
  mov    -0x130(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  cvtsd2ss -0x118(%rbp),%xmm0
  movss  %xmm0,(%rax)
  lea    -0x110(%rbp),%rdx
  mov    -0x150(%rbp),%rcx
  mov    -0x134(%rbp),%eax
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <indices_inc@plt>
  addl   $0x1,-0x130(%rbp)
L42:
  mov    -0x130(%rbp),%eax
  cmp    -0x120(%rbp),%eax
  jl     L61
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L56
  call   <__stack_chk_fail@plt>
L56:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D5
type_infered: byte[8]

tool: {"D5": [0xea,0x8c,0xa0,0x39,0x59,0x3e,0x29,0xc6]}

assistant: ```c
void core_max_pool(int rank, int *input_shape, float *input_ptr, int *output_shape, float *output_ptr, int tile_by, int pool_by) {
  int i, j, k, pool_size, output_size, pos;
  int output_idx[16], input_idx[16], pool_idx[16], pool_shape[16];
  double max;
  for (i = 0; i < rank; i++) {
    pool_shape[i] = pool_by;
  }
  pool_size = size_from_shape2(rank, pool_shape);
  output_size = size_from_shape2(rank, output_shape);
  indices_reset(rank, output_idx);
  for (i = 0; i < output_size; i++) {
    max = -1e30;
    indices_reset(rank, pool_idx);
    for (j = 0; j < pool_size; j++) {
      for (k = 0; k < rank; k++) {
        input_idx[k] = output_idx[k] * tile_by + pool_idx[k];
      }
      pos = cnnc_inline_idxs_to_pos(rank, input_shape, input_idx);
      if (pos >= 0 && input_ptr[pos] > max) {
        max = input_ptr[pos];
      }
      indices_inc(rank, pool_shape, pool_idx);
    }
    output_ptr[i] = max;
    indices_inc(rank, output_shape, output_idx);
  }
  return;
}
```