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

```asm
<chroma_smooth_2x2>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %edi,0x5c(%rsp)
  mov    %rcx,0x48(%rsp)
  mov    %r9,0x50(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  lea    -0x5(%rsi),%eax
  mov    %eax,0x58(%rsp)
  cmp    $0x4,%eax
  jle    L83
  mov    %r8,%r12
  lea    (%rdi,%rdi,1),%r15d
  lea    (%r15,%rdi,1),%eax
  mov    %eax,0x24(%rsp)
  mov    %r15d,0x38(%rsp)
  movl   $0x4,0x3c(%rsp)
  lea    -0x4(%rdi),%eax
  mov    %eax,0xc(%rsp)
  lea    0x60(%rsp),%rax
  mov    %rax,0x28(%rsp)
  lea    0x80(%rsp),%rax
  mov    %rax,0x30(%rsp)
  mov    %r15d,%ebx
  mov    %rdx,%r14
  jmp    L18
L102:
  add    $0x2,%r9d
  cmp    $0x4,%r9d
  je     L54
L90:
  mov    0x4(%rsp),%eax
  lea    (%rax,%r9,1),%esi
  mov    0x8(%rsp),%eax
  lea    (%rax,%r9,1),%ecx
  mov    $0xfffffffe,%eax
  mov    %r9d,%ebx
  neg    %ebx
  cmovs  %r9d,%ebx
L67:
  mov    %eax,%edx
  neg    %edx
  cmovs  %eax,%edx
  add    %ebx,%edx
  cmp    $0x4,%edx
  je     L43
  lea    0x1(%rcx),%r8d
  movslq %r8d,%r8
  lea    0x1(%rsi),%edx
  movslq %edx,%rdx
  movslq (%r14,%rdx,4),%rdx
  movslq %ecx,%rdi
  movslq (%r14,%rdi,4),%rdi
  mov    (%r12,%rdi,4),%edi
  add    (%r12,%rdx,4),%edi
  mov    %edi,%edx
  shr    $0x1f,%edx
  add    %edi,%edx
  sar    %edx
  movslq %r10d,%r11
  movslq %esi,%rdi
  movslq (%r14,%rdi,4),%rdi
  mov    (%r12,%rdi,4),%edi
  sub    %edx,%edi
  mov    %edi,0x60(%rsp,%r11,4)
  movslq (%r14,%r8,4),%rdi
  mov    (%r12,%rdi,4),%edi
  sub    %edx,%edi
  mov    %edi,0x80(%rsp,%r11,4)
  add    $0x1,%r10d
L43:
  add    $0x2,%eax
  add    %r13d,%esi
  add    %r13d,%ecx
  cmp    $0x4,%eax
  jne    L67
  jmp    L102
L54:
  mov    %ebp,%ebx
  shr    $0x1f,%ebx
  add    %ebp,%ebx
  sar    %ebx
  mov    0x28(%rsp),%rdi
  call   <opt_med5@plt>
  mov    %eax,%ebp
  mov    0x30(%rsp),%rdi
  call   <opt_med5@plt>
  add    %ebx,%ebp
  cmp    $0x8000,%ebp
  jle    L92
  add    %ebx,%eax
  cmp    $0x8000,%eax
  jle    L92
  movslq %ebp,%rdx
  shl    $0x2,%rdx
  cmp    $0x6ffff,%ebp
  mov    $0x1bfffc,%ecx
  cmovge %rcx,%rdx
  mov    0x20(%rsp),%ebx
  mov    %ebx,%ecx
  add    0x40(%rsp),%ecx
  movslq %ecx,%rcx
  mov    0x50(%rsp),%rsi
  mov    0xe0(%rsp),%edi
  add    (%rsi,%rdx,1),%edi
  mov    %edi,%edx
  mov    0x48(%rsp),%rdi
  mov    %edx,(%rdi,%rcx,4)
  movslq %eax,%rdx
  shl    $0x2,%rdx
  cmp    $0x6ffff,%eax
  mov    $0x1bfffc,%eax
  cmovl  %rdx,%rax
  mov    0x44(%rsp),%ecx
  lea    0x1(%rbx,%rcx,1),%edx
  movslq %edx,%rdx
  mov    0xe0(%rsp),%ecx
  add    (%rsi,%rax,1),%ecx
  mov    %ecx,(%rdi,%rdx,4)
L92:
  add    $0x2,%r15
  cmp    %r15d,0xc(%rsp)
  jle    L82
L80:
  mov    %r15d,%esi
  mov    %r15d,0x20(%rsp)
  mov    0x10(%rsp),%rax
  movslq 0x4(%rax,%r15,4),%rax
  mov    0x18(%rsp),%rcx
  movslq (%rcx,%r15,4),%rdx
  mov    (%r12,%rdx,4),%ebp
  add    (%r12,%rax,4),%ebp
  cmp    $0x1ffff,%ebp
  jle    L92
  mov    $0x0,%r10d
  mov    $0xfffffffe,%r9d
  mov    %r15d,%eax
  add    0x38(%rsp),%eax
  mov    %eax,0x4(%rsp)
  add    0x24(%rsp),%esi
  mov    %esi,0x8(%rsp)
  jmp    L90
L82:
  mov    %r13d,%ebx
L138:
  addl   $0x2,0x3c(%rsp)
  mov    0x3c(%rsp),%eax
  add    %ebx,0x38(%rsp)
  add    %ebx,0x24(%rsp)
  cmp    0x58(%rsp),%eax
  jge    L83
L18:
  cmpl   $0x4,0xc(%rsp)
  jle    L138
  mov    0x5c(%rsp),%ecx
  mov    %ecx,%eax
  add    0x24(%rsp),%eax
  mov    %eax,0x40(%rsp)
  add    %eax,%ecx
  mov    %ecx,0x44(%rsp)
  cltq
  lea    (%r14,%rax,4),%rax
  mov    %rax,0x10(%rsp)
  movslq %ecx,%rax
  lea    (%r14,%rax,4),%rax
  mov    %rax,0x18(%rsp)
  mov    $0x4,%r15d
  mov    %ebx,%r13d
  jmp    L80
L83:
  mov    0x98(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L58
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L58:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void chroma_smooth_2x2(int w, int h, uint16_t *inp, uint16_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[5];
      int med_b[5];
      for (i = -2; i <= 2; i += 2) {
        for (j = -2; j <= 2; j += 2) {
          if (((i) > 0 ? (i) : -(i)) + ((j) > 0 ? (j) : -(j)) == 4)
            continue;
          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_med5(med_r);
      int db = opt_med5(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;
    }
  }
}
```