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

```asm
<filter_c_2d_median>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %r8d,-0x5c(%rbp)
  mov    %r9d,-0x60(%rbp)
  mov    0x10(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    0x10(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x20(%rbp)
  mov    0x10(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x18(%rbp)
  mov    -0x1c(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  jmp    L72
L64:
  mov    -0x30(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x34(%rbp)
  jmp    L34
L76:
  movl   $0x0,-0x28(%rbp)
  jmp    L45
L8:
  mov    -0x28(%rbp),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x30(%rbp),%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  sub    -0x1c(%rbp),%eax
  mov    -0x4c(%rbp),%edx
  imul   %edx,%eax
  mov    %eax,-0xc(%rbp)
  movl   $0x0,-0x2c(%rbp)
  jmp    L50
L75:
  mov    -0xc(%rbp),%edx
  mov    -0x34(%rbp),%eax
  add    %eax,%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  sub    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%ecx
  mov    -0x2c(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x8(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x2c(%rbp)
L50:
  mov    -0x2c(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jl     L75
  addl   $0x1,-0x28(%rbp)
L45:
  mov    -0x28(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jl     L8
  mov    -0x24(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x8(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <inkernel_quicksort@plt>
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%ecx
  mov    -0x34(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x58(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x34(%rbp)
L34:
  mov    -0x50(%rbp),%eax
  sub    -0x20(%rbp),%eax
  cmp    %eax,-0x34(%rbp)
  jl     L76
  addl   $0x1,-0x30(%rbp)
L72:
  mov    -0x4c(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  cmp    %eax,-0x30(%rbp)
  jl     L64
  nop
  nop
  leave
  ret
```

assistant: ```c
void filter_c_2d_median(float *im, int ny, int nx, float *res, int nyr, int nxr, int w) {
  int nwin = w * w;
  float *win = (float *)malloc(nwin * sizeof(float));
  int edgex = w / 2;
  int edgey = w / 2;
  int mpos = nwin / 2;
  int x, y, wx, wy, ind, indy, indw;
  for (y = edgey; y < (ny - edgey); ++y) {
    ind = y * ny;
    for (x = edgex; x < (nx - edgex); ++x) {
      for (wy = 0; wy < w; ++wy) {
        indw = wy * w;
        indy = ny * (y + wy - edgey);
        for (wx = 0; wx < w; ++wx) {
          win[indw + wx] = im[indy + x + wx - edgex];
        }
      }
      inkernel_quicksort(win, 0, nwin - 1);
      res[ind + x] = win[mpos];
    }
  }
}
```