user: What is the c source code of the assembly code below:

```asm
<median_filter>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8d,-0x54(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x54(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x18(%rbp)
  mov    -0x18(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x54(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  cltq
  add    %rax,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    -0x18(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  jmp    L0
L70:
  mov    -0x20(%rbp),%ecx
  movslq %ecx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %ecx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  test   %edx,%edx
  jne    L68
  mov    -0x20(%rbp),%eax
  mov    %eax,%esi
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L68:
  mov    -0x18(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L69
L43:
  movl   $0x0,-0x24(%rbp)
  mov    -0x18(%rbp),%eax
  neg    %eax
  mov    %eax,-0x2c(%rbp)
  jmp    L44
L54:
  mov    -0x18(%rbp),%eax
  neg    %eax
  mov    %eax,-0x28(%rbp)
  jmp    L80
L91:
  mov    -0x20(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x1c(%rbp),%ecx
  mov    -0x28(%rbp),%eax
  add    %ecx,%eax
  cltq
  add    %rax,%rax
  add    %rdx,%rax
  mov    -0x24(%rbp),%edx
  movslq %edx,%rdx
  lea    (%rdx,%rdx,1),%rcx
  mov    -0x10(%rbp),%rdx
  add    %rcx,%rdx
  movzwl (%rax),%eax
  mov    %ax,(%rdx)
  addl   $0x1,-0x24(%rbp)
  addl   $0x1,-0x28(%rbp)
L80:
  mov    -0x28(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L91
  addl   $0x1,-0x2c(%rbp)
L44:
  mov    -0x2c(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L54
  lea    -0x30(%rbp),%rdx
  mov    -0x10(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <median_of@plt>
  mov    -0x20(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x40(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0x1c(%rbp),%edx
  movslq %edx,%rdx
  add    %rdx,%rdx
  add    %rcx,%rdx
  mov    %ax,(%rdx)
  addl   $0x1,-0x1c(%rbp)
L69:
  mov    -0x1c(%rbp),%eax
  cltq
  mov    -0x18(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x50(%rbp),%rdx
  sub    %rcx,%rdx
  cmp    %rdx,%rax
  jl     L43
  addl   $0x1,-0x20(%rbp)
L0:
  mov    -0x20(%rbp),%eax
  cltq
  mov    -0x18(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x48(%rbp),%rdx
  sub    %rcx,%rdx
  cmp    %rdx,%rax
  jl     L70
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x50(%rbp),%rax
  lea    -0x1(%rax),%rcx
  mov    -0x48(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%esi
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fix_edges@plt>
  mov    $0x1,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L63
  call   <__stack_chk_fail@plt>
L63:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D1
type_guessed: string

tool: D1: %d 

assistant: ```c
int median_filter(the_image, out_image, rows, cols, size)
int size;
short **the_image, **out_image;
long rows, cols;
{
  int a, b, count, i, j, k, length, sd2, sd2p1, ss, width;
  short *elements;
  sd2 = size / 2;
  sd2p1 = sd2 + 1;
  ss = size * size;
  elements = (short *)malloc(ss * sizeof(short));
  printf("\n");
  for (i = sd2; i < rows - sd2; i++) {
    if ((i % 10) == 0)
      printf("%d ", i);
    for (j = sd2; j < cols - sd2; j++) {
      count = 0;
      for (a = -sd2; a < sd2p1; a++) {
        for (b = -sd2; b < sd2p1; b++) {
          elements[count] = the_image[i + a][j + b];
          count++;
        }
      }
      out_image[i][j] = median_of(elements, &ss);
    }
  }
  free(elements);
  fix_edges(out_image, sd2, rows - 1, cols - 1);
  return (1);
}
```