user: 提供的汇编代码用C语言表示会是什么样子:

```asm
<neuralops_avgpool2d_fwd>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,-0x38(%rsp)
  mov    %rsi,%r10
  mov    %rdx,%r11
  mov    %rcx,%r12
  mov    %r8,%rcx
  mov    %r9,-0x10(%rsp)
  mov    0x38(%rsp),%rsi
  mov    0x40(%rsp),%rdi
  lea    -0x1(%r10,%rsi,1),%r14
  mov    %r14,%rax
  mov    $0x0,%edx
  div    %rsi
  mov    %rax,%r15
  lea    -0x1(%r11,%rdi,1),%rax
  mov    %rax,-0x30(%rsp)
  mov    $0x0,%edx
  div    %rdi
  mov    %rax,-0x8(%rsp)
  mov    %rsi,%rax
  imul   %rdi,%rax
  test   %rax,%rax
  js     L127
  pxor   %xmm0,%xmm0
  cvtsi2ss %rax,%xmm0
L105:
  movss  D0(%rip),%xmm1
  divss  %xmm0,%xmm1
  cmpq   $0x0,-0x38(%rsp)
  je     L80
  mov    %r11,%rax
  imul   %r12,%rax
  imul   %r10,%rax
  mov    %rax,-0x18(%rsp)
  imul   %r10,%r11
  mov    %r11,-0x20(%rsp)
  mov    %r10,%rax
  imul   %rdi,%rax
  mov    %rax,-0x28(%rsp)
  lea    0x0(,%r10,4),%r8
  lea    (%rcx,%rsi,4),%rbp
  mov    %rsi,%r9
  neg    %r9
  shl    $0x2,%r9
  movq   $0x0,-0x40(%rsp)
  movq   $0x0,-0x68(%rsp)
  mov    $0x0,%r13d
  jmp    L2
L127:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2ss %rdx,%xmm0
  addss  %xmm0,%xmm0
  jmp    L105
L37:
  addss  (%rax),%xmm0
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L37
L63:
  add    $0x1,%rcx
  add    %r8,%rdx
  cmp    %rcx,%rdi
  je     L154
L132:
  lea    (%rdx,%r9,1),%rax
  test   %rsi,%rsi
  jne    L37
  jmp    L63
L45:
  pxor   %xmm0,%xmm0
L154:
  mulss  %xmm1,%xmm0
  movss  %xmm0,(%rbx,%r10,4)
  add    $0x1,%r10
  add    %rsi,%r11
  cmp    %r10,%r15
  jbe    L82
L88:
  test   %rdi,%rdi
  je     L45
  lea    0x0(%rbp,%r11,4),%rdx
  mov    $0x0,%ecx
  pxor   %xmm0,%xmm0
  jmp    L132
L82:
  lea    -0x1(%r15),%rax
  cmp    %rsi,%r14
  mov    $0x0,%ebx
  cmovb  %rbx,%rax
  lea    0x1(%r13,%rax,1),%r13
L64:
  addq   $0x1,-0x58(%rsp)
  mov    -0x58(%rsp),%rax
  mov    -0x28(%rsp),%rcx
  add    %rcx,-0x50(%rsp)
  cmp    %rax,-0x8(%rsp)
  jbe    L189
L11:
  cmp    %rsi,%r14
  jb     L64
  mov    -0x10(%rsp),%rax
  lea    (%rax,%r13,4),%rbx
  mov    -0x50(%rsp),%r11
  mov    $0x0,%r10d
  jmp    L88
L189:
  addq   $0x1,-0x60(%rsp)
  mov    -0x60(%rsp),%rax
  mov    -0x20(%rsp),%rcx
  add    %rcx,-0x48(%rsp)
  cmp    %rax,%r12
  je     L7
L74:
  mov    -0x48(%rsp),%rax
  mov    %rax,-0x50(%rsp)
  movq   $0x0,-0x58(%rsp)
  cmp    %rdi,-0x30(%rsp)
  jae    L11
  jmp    L189
L7:
  addq   $0x1,-0x68(%rsp)
  mov    -0x68(%rsp),%rax
  mov    -0x18(%rsp),%rcx
  add    %rcx,-0x40(%rsp)
  cmp    %rax,-0x38(%rsp)
  je     L80
L2:
  mov    -0x40(%rsp),%rax
  mov    %rax,-0x48(%rsp)
  movq   $0x0,-0x60(%rsp)
  test   %r12,%r12
  jne    L74
  jmp    L7
L80:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: read_data
arguments: data_tag: D0
datatype: byte[4]

tool: {"D0": [0x00,0x00,0x80,0x3f]}

assistant: ```c
void neuralops_avgpool2d_fwd(size_t batch_sz, size_t in_width, size_t in_height, size_t chan, const float *in_buf, float *out_buf, size_t pool_w, size_t pool_h) {
  size_t out_width = (in_width + pool_w - 1) / pool_w;
  size_t out_height = (in_height + pool_h - 1) / pool_h;
  float normalizer = 1.0f / ((float)(pool_w * pool_h));
  size_t p = 0;
  for (size_t idx = 0; idx < batch_sz; idx += 1) {
    for (size_t a = 0; a < chan; a += 1) {
      for (size_t y = 0; y < out_height; y += 1) {
        for (size_t x = 0; x < out_width; x += 1) {
          float pool_value = 0.0f;
          for (size_t v = 0; v < pool_h; v += 1) {
            for (size_t u = 0; u < pool_w; u += 1) {
              pool_value += in_buf[x * pool_w + u + in_width * (y * pool_h + v + in_height * (a + chan * idx))];
            }
          }
          out_buf[p] = normalizer * pool_value;
          p += 1;
        }
      }
    }
  }
}
```