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

```asm
<chroma_smooth_3x3>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    %edi,0x64(%rsp)
  mov    %rdx,0x68(%rsp)
  mov    %rcx,0x50(%rsp)
  mov    %r9,0x58(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  lea    -0x5(%rsi),%eax
  mov    %eax,0x44(%rsp)
  cmp    $0x4,%eax
  jle    L83
  mov    %edi,%ebx
  mov    %r8,%r14
  lea    (%rdi,%rdi,1),%esi
  mov    %esi,0x60(%rsp)
  lea    0x0(,%rdi,4),%eax
  mov    %eax,0x38(%rsp)
  movslq %esi,%rdi
  mov    %rdi,0x48(%rsp)
  mov    %esi,%eax
  add    %ebx,%eax
  cltq
  mov    %rax,0x30(%rsp)
  lea    0x0(,%rdi,4),%r13
  mov    %esi,0x3c(%rsp)
  mov    %rdi,0x28(%rsp)
  movl   $0x4,0x24(%rsp)
  lea    -0x4(%rbx),%eax
  mov    %eax,0xc(%rsp)
  mov    %r13,%r15
  jmp    L121
L108:
  add    $0x8,%r9
  add    $0x3,%r8
  cmp    $0xc,%r8
  je     L7
L56:
  lea    -0x3(%r8),%rdx
  mov    (%rsp),%rax
  lea    (%r9,%rax,1),%rdi
  mov    %r9,%rsi
L122:
  movslq 0x4(%rsi),%rax
  movslq (%rdi),%rcx
  mov    (%r14,%rcx,4),%ecx
  add    (%r14,%rax,4),%ecx
  mov    %ecx,%eax
  shr    $0x1f,%eax
  add    %ecx,%eax
  sar    %eax
  movslq (%rsi),%rcx
  mov    (%r14,%rcx,4),%ecx
  sub    %eax,%ecx
  mov    %ecx,0x70(%rsp,%rdx,4)
  movslq 0x4(%rdi),%rcx
  mov    (%r14,%rcx,4),%ecx
  sub    %eax,%ecx
  mov    %ecx,0xa0(%rsp,%rdx,4)
  add    $0x1,%rdx
  add    %r15,%rsi
  add    %r15,%rdi
  cmp    %r8,%rdx
  jne    L122
  jmp    L108
L7:
  mov    %r10d,%ebp
  shr    $0x1f,%ebp
  add    %r10d,%ebp
  sar    %ebp
  lea    0x70(%rsp),%rdi
  call   <opt_med9@plt>
  mov    %eax,%r12d
  lea    0xa0(%rsp),%rdi
  call   <opt_med9@plt>
  add    %ebp,%r12d
  cmp    $0x8000,%r12d
  jle    L24
  add    %ebp,%eax
  cmp    $0x8000,%eax
  jle    L24
  movslq %r12d,%rdx
  shl    $0x2,%rdx
  cmp    $0x6ffff,%r12d
  mov    $0x1bfffc,%esi
  cmovge %rsi,%rdx
  mov    0x20(%rsp),%esi
  mov    %esi,%ecx
  add    0x38(%rsp),%ecx
  movslq %ecx,%rcx
  mov    0x58(%rsp),%rdi
  mov    0x110(%rsp),%r11d
  add    (%rdi,%rdx,1),%r11d
  mov    %r11d,%edx
  mov    0x50(%rsp),%r11
  mov    %edx,(%r11,%rcx,4)
  movslq %eax,%rdx
  shl    $0x2,%rdx
  cmp    $0x6ffff,%eax
  mov    $0x1bfffc,%eax
  cmovl  %rdx,%rax
  mov    0x40(%rsp),%edx
  lea    0x1(%rsi,%rdx,1),%edx
  movslq %edx,%rdx
  mov    0x110(%rsp),%esi
  add    (%rdi,%rax,1),%esi
  mov    %esi,(%r11,%rdx,4)
L24:
  add    $0x2,%rbx
  add    $0x8,%r13
  cmp    %ebx,0xc(%rsp)
  jle    L138
L76:
  mov    0x10(%rsp),%rax
  movslq 0x4(%rax,%rbx,4),%rax
  mov    0x18(%rsp),%rsi
  movslq (%rsi,%rbx,4),%rdx
  mov    (%r14,%rdx,4),%r10d
  add    (%r14,%rax,4),%r10d
  cmp    $0x1ffff,%r10d
  jle    L24
  mov    %ebx,0x20(%rsp)
  mov    %r13,%r9
  mov    $0x3,%r8d
  jmp    L56
L138:
  addl   $0x2,0x24(%rsp)
  mov    0x24(%rsp),%eax
  mov    0x60(%rsp),%esi
  add    %esi,0x38(%rsp)
  mov    0x48(%rsp),%rdi
  add    %rdi,0x28(%rsp)
  add    %rdi,0x30(%rsp)
  add    %esi,0x3c(%rsp)
  cmp    0x44(%rsp),%eax
  jge    L83
L121:
  cmpl   $0x4,0xc(%rsp)
  jle    L138
  mov    0x38(%rsp),%esi
  mov    %esi,%ebx
  add    0x64(%rsp),%ebx
  mov    %ebx,0x40(%rsp)
  movslq 0x3c(%rsp),%rax
  mov    0x68(%rsp),%rdi
  lea    0x8(%rdi,%rax,4),%r13
  movslq %esi,%rax
  lea    (%rdi,%rax,4),%rax
  mov    %rax,0x10(%rsp)
  movslq %ebx,%rax
  lea    (%rdi,%rax,4),%rax
  mov    %rax,0x18(%rsp)
  mov    0x30(%rsp),%rax
  sub    0x28(%rsp),%rax
  shl    $0x2,%rax
  mov    %rax,(%rsp)
  mov    $0x4,%ebx
  jmp    L76
L83:
  mov    0xc8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L29
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L29:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void chroma_smooth_3x3(int w, int h, uint32_t *inp, uint32_t *out, int *raw2ev, int *ev2raw, int black) {
  int x, y;
  for (y = 4; y < h - 5; y += 2) {
    for (x = 4; x < w - 4; x += 2) {
      int g1 = inp[x + 1 + y * w];
      int g2 = inp[x + (y + 1) * w];
      int ge = (raw2ev[g1] + raw2ev[g2]) / 2;
      if (ge < 2 * 32768)
        continue;
      int i, j;
      int k = 0;
      int med_r[9];
      int med_b[9];
      for (i = -2; i <= 2; i += 2) {
        for (j = -2; j <= 2; j += 2) {
          int r = inp[x + i + (y + j) * w];
          int g1 = inp[x + i + 1 + (y + j) * w];
          int g2 = inp[x + i + (y + j + 1) * w];
          int b = inp[x + i + 1 + (y + j + 1) * w];
          int ge = (raw2ev[g1] + raw2ev[g2]) / 2;
          med_r[k] = raw2ev[r] - ge;
          med_b[k] = raw2ev[b] - ge;
          k++;
        }
      }
      int dr = opt_med9(med_r);
      int db = opt_med9(med_b);
      if (ge + dr <= 32768)
        continue;
      if (ge + db <= 32768)
        continue;
      out[x + y * w] = ev2raw[(((((((ge + dr)) < ((14 * 32768 - 1))) ? ((ge + dr)) : ((14 * 32768 - 1)))) > ((0))) ? (((((ge + dr)) < ((14 * 32768 - 1))) ? ((ge + dr)) : ((14 * 32768 - 1)))) : ((0)))] + black;
      out[x + 1 + (y + 1) * w] = ev2raw[(((((((ge + db)) < ((14 * 32768 - 1))) ? ((ge + db)) : ((14 * 32768 - 1)))) > ((0))) ? (((((ge + db)) < ((14 * 32768 - 1))) ? ((ge + db)) : ((14 * 32768 - 1)))) : ((0)))] + black;
    }
  }
}
```