user: Please show me the C implementation that matches the assembly code listed below:

```asm
<col221111_16>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,-0x18(%rsp)
  movslq %edx,%rax
  add    %rsi,%rax
  mov    %rax,-0x28(%rsp)
  lea    0x400(%rdi),%rax
  mov    %rax,-0x20(%rsp)
  add    %edx,%edx
  movslq %edx,%rax
  mov    %rax,-0x30(%rsp)
  lea    0x100(%rdi),%rbx
  mov    %rbx,-0x38(%rsp)
  lea    0x500(%rdi),%rbx
  mov    %rbx,-0x10(%rsp)
  shl    $0x2,%rax
  mov    %rax,-0x8(%rsp)
  mov    $0x0,%r13d
  jmp    L113
L9:
  shl    $0x8,%edx
  and    $0xf800,%edx
  jmp    L16
L243:
  shl    $0x3,%r10d
  and    $0x7e0,%r10d
  jmp    L216
L261:
  shl    $0x8,%r9d
  and    $0xf800,%r9d
  jmp    L178
L65:
  shl    $0x3,%edx
  and    $0x7e0,%edx
  jmp    L32
L88:
  shl    $0x8,%edx
  and    $0xf800,%edx
  jmp    L87
L260:
  shl    $0x3,%r9d
  and    $0x7e0,%r9d
  jmp    L194
L95:
  shl    $0x8,%edx
  and    $0xf800,%edx
  jmp    L163
L173:
  shl    $0x3,%edi
  and    $0x7e0,%edi
  jmp    L242
L130:
  or     %edi,%edx
  movzbl %dh,%ebx
  mov    %bl,0x2(%r12,%rax,4)
  mov    %dl,0x3(%r12,%rax,4)
  add    $0x1,%rax
  cmp    $0x8,%rax
  je     L182
L198:
  mov    (%r14,%rax,4),%esi
  mov    0x100(%r14,%rax,4),%edi
  imul   $0x32,%esi,%ecx
  imul   $0x82,%edi,%edx
  lea    0x80(%rcx,%rdx,1),%edx
  sar    $0x8,%edx
  mov    %edx,-0x44(%rsp)
  lea    0x3(%rax),%r8d
  test   %eax,%eax
  cmovns %eax,%r8d
  sar    $0x2,%r8d
  mov    %eax,%r11d
  and    $0x3,%r11d
  mov    %r8d,%ecx
  shl    $0x5,%ecx
  add    %r11d,%ecx
  add    %ecx,%ecx
  movslq %ecx,%rcx
  mov    -0x40(%rsp),%rbx
  mov    (%rbx,%rcx,4),%r9d
  lea    (%rdi,%r9,1),%r10d
  lea    0x7(%r10),%edx
  cmp    $0xff,%edx
  jbe    L9
  cmp    $0xfffffff9,%r10d
  mov    $0xf800,%edx
  cmovl  %r13d,%edx
L16:
  mov    %r9d,%r15d
  sub    -0x44(%rsp),%r15d
  lea    0x3(%r15),%r10d
  cmp    $0xff,%r10d
  jbe    L243
  cmp    $0xfffffffd,%r15d
  mov    $0x7e0,%r10d
  cmovl  %r13d,%r10d
L216:
  or     %r10d,%edx
  add    %esi,%r9d
  lea    0x7(%r9),%r10d
  mov    %r10d,%r15d
  sar    $0x3,%r15d
  cmp    $0xff,%r10d
  jbe    L146
  cmp    $0xfffffff9,%r9d
  mov    $0x1f,%r15d
  cmovl  %r13d,%r15d
L146:
  or     %r15d,%edx
  movzbl %dh,%ebx
  mov    %bl,0x0(%rbp,%rax,4)
  mov    %dl,0x1(%rbp,%rax,4)
  mov    -0x40(%rsp),%rbx
  mov    0x4(%rbx,%rcx,4),%ecx
  lea    (%rdi,%rcx,1),%edx
  lea    0x1(%rdx),%r9d
  cmp    $0xff,%r9d
  jbe    L261
  cmp    $0xffffffff,%edx
  mov    $0xf800,%r9d
  cmovl  %r13d,%r9d
L178:
  mov    %ecx,%edx
  sub    -0x44(%rsp),%edx
  cmp    $0xff,%edx
  jbe    L65
  sar    $0x1f,%edx
  not    %edx
  and    $0x7e0,%edx
L32:
  or     %r9d,%edx
  add    %esi,%ecx
  lea    0x1(%rcx),%r9d
  mov    %r9d,%r10d
  sar    $0x3,%r10d
  cmp    $0xff,%r9d
  jbe    L49
  cmp    $0xffffffff,%ecx
  mov    $0x1f,%r10d
  cmovl  %r13d,%r10d
L49:
  or     %r10d,%edx
  movzbl %dh,%ebx
  mov    %bl,0x2(%rbp,%rax,4)
  mov    %dl,0x3(%rbp,%rax,4)
  lea    0x1(,%r8,8),%edx
  lea    (%r11,%rdx,4),%ecx
  add    %ecx,%ecx
  movslq %ecx,%rcx
  mov    -0x40(%rsp),%rbx
  mov    (%rbx,%rcx,4),%r8d
  lea    (%rdi,%r8,1),%r9d
  lea    0x3(%r9),%edx
  cmp    $0xff,%edx
  jbe    L88
  cmp    $0xfffffffd,%r9d
  mov    $0xf800,%edx
  cmovl  %r13d,%edx
L87:
  mov    %r8d,%r10d
  sub    -0x44(%rsp),%r10d
  lea    0x1(%r10),%r9d
  cmp    $0xff,%r9d
  jbe    L260
  cmp    $0xffffffff,%r10d
  mov    $0x7e0,%r9d
  cmovl  %r13d,%r9d
L194:
  or     %r9d,%edx
  add    %esi,%r8d
  lea    0x3(%r8),%r9d
  mov    %r9d,%r10d
  sar    $0x3,%r10d
  cmp    $0xff,%r9d
  jbe    L12
  cmp    $0xfffffffd,%r8d
  mov    $0x1f,%r10d
  cmovl  %r13d,%r10d
L12:
  or     %r10d,%edx
  movzbl %dh,%ebx
  mov    %bl,(%r12,%rax,4)
  mov    %dl,0x1(%r12,%rax,4)
  mov    -0x40(%rsp),%rbx
  mov    0x4(%rbx,%rcx,4),%ecx
  add    %ecx,%edi
  lea    0x5(%rdi),%edx
  cmp    $0xff,%edx
  jbe    L95
  cmp    $0xfffffffb,%edi
  mov    $0xf800,%edx
  cmovl  %r13d,%edx
L163:
  mov    %ecx,%r8d
  sub    -0x44(%rsp),%r8d
  lea    0x2(%r8),%edi
  cmp    $0xff,%edi
  jbe    L173
  cmp    $0xfffffffe,%r8d
  mov    $0x7e0,%edi
  cmovl  %r13d,%edi
L242:
  or     %edi,%edx
  add    %ecx,%esi
  lea    0x5(%rsi),%ecx
  mov    %ecx,%edi
  sar    $0x3,%edi
  cmp    $0xff,%ecx
  jbe    L130
  cmp    $0xfffffffb,%esi
  mov    $0x1f,%edi
  cmovl  %r13d,%edi
  jmp    L130
L182:
  mov    -0x40(%rsp),%rbx
  add    $0x20,%r14
  add    $0x40,%rbx
  mov    -0x30(%rsp),%rax
  add    %rax,%rbp
  add    %rax,%r12
  cmp    -0x38(%rsp),%rbx
  je     L28
L38:
  mov    $0x0,%eax
  mov    %rbx,-0x40(%rsp)
  jmp    L198
L28:
  subq   $0xffffffffffffff80,-0x20(%rsp)
  mov    -0x8(%rsp),%rsi
  add    %rsi,-0x18(%rsp)
  add    %rsi,-0x28(%rsp)
  addq   $0x200,-0x38(%rsp)
  mov    -0x38(%rsp),%rax
  cmp    %rax,-0x10(%rsp)
  je     L112
L113:
  mov    -0x38(%rsp),%rax
  lea    -0x100(%rax),%rbx
  mov    -0x20(%rsp),%r14
  mov    -0x28(%rsp),%r12
  mov    -0x18(%rsp),%rbp
  jmp    L38
L112:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void col221111_16(out, pic, width) int *out;
unsigned char *pic;
int width;
{
  int i, j, k;
  unsigned char *pic0, *pic1;
  int *outy, *outc;
  int cr, cg, cb, y;
  pic0 = pic;
  pic1 = pic + width;
  outy = out;
  outc = out + 64 * 4;
  for (i = 2; i > 0; i--) {
    for (j = 4; j > 0; j--) {
      for (k = 0; k < 8; k++) {
        ((cb = outc[0 + 0 * 8 + k], cr = outc[64 + 0 * 8 + k], cg = (50 * cb + 130 * cr + 128) >> 8), (y = outy[(k / 4 * 8 + 0) * 8 + (k & 3) * 2 + 0], y = ((((unsigned int)(y + cr + 3 * 2 + 1) >= 256 ? ((y + cr + 3 * 2 + 1) < 0 ? 0 : 255) : (y + cr + 3 * 2 + 1)) & 0xf8) << 8) | ((((unsigned int)(y - cg + 3) >= 256 ? ((y - cg + 3) < 0 ? 0 : 255) : (y - cg + 3)) & 0xfc) << 3) | ((((unsigned int)(y + cb + 3 * 2 + 1) >= 256 ? ((y + cb + 3 * 2 + 1) < 0 ? 0 : 255) : (y + cb + 3 * 2 + 1))) >> 3), pic0[(k * 2 + 0) * 2 + 0] = y >> 8, pic0[(k * 2 + 0) * 2 + 1] = y & 0xff), (y = outy[(k / 4 * 8 + 0) * 8 + (k & 3) * 2 + 1], y = ((((unsigned int)(y + cr + 0 * 2 + 1) >= 256 ? ((y + cr + 0 * 2 + 1) < 0 ? 0 : 255) : (y + cr + 0 * 2 + 1)) & 0xf8) << 8) | ((((unsigned int)(y - cg + 0) >= 256 ? ((y - cg + 0) < 0 ? 0 : 255) : (y - cg + 0)) & 0xfc) << 3) | ((((unsigned int)(y + cb + 0 * 2 + 1) >= 256 ? ((y + cb + 0 * 2 + 1) < 0 ? 0 : 255) : (y + cb + 0 * 2 + 1))) >> 3), pic0[(k * 2 + 1) * 2 + 0] = y >> 8, pic0[(k * 2 + 1) * 2 + 1] = y & 0xff), (y = outy[(k / 4 * 8 + 1) * 8 + (k & 3) * 2 + 0], y = ((((unsigned int)(y + cr + 1 * 2 + 1) >= 256 ? ((y + cr + 1 * 2 + 1) < 0 ? 0 : 255) : (y + cr + 1 * 2 + 1)) & 0xf8) << 8) | ((((unsigned int)(y - cg + 1) >= 256 ? ((y - cg + 1) < 0 ? 0 : 255) : (y - cg + 1)) & 0xfc) << 3) | ((((unsigned int)(y + cb + 1 * 2 + 1) >= 256 ? ((y + cb + 1 * 2 + 1) < 0 ? 0 : 255) : (y + cb + 1 * 2 + 1))) >> 3), pic1[(k * 2 + 0) * 2 + 0] = y >> 8, pic1[(k * 2 + 0) * 2 + 1] = y & 0xff), (y = outy[(k / 4 * 8 + 1) * 8 + (k & 3) * 2 + 1], y = ((((unsigned int)(y + cr + 2 * 2 + 1) >= 256 ? ((y + cr + 2 * 2 + 1) < 0 ? 0 : 255) : (y + cr + 2 * 2 + 1)) & 0xf8) << 8) | ((((unsigned int)(y - cg + 2) >= 256 ? ((y - cg + 2) < 0 ? 0 : 255) : (y - cg + 2)) & 0xfc) << 3) | ((((unsigned int)(y + cb + 2 * 2 + 1) >= 256 ? ((y + cb + 2 * 2 + 1) < 0 ? 0 : 255) : (y + cb + 2 * 2 + 1))) >> 3), pic1[(k * 2 + 1) * 2 + 0] = y >> 8, pic1[(k * 2 + 1) * 2 + 1] = y & 0xff));
      }
      outc += 8;
      outy += 16;
      pic0 += 2 * width;
      pic1 += 2 * width;
    }
    outy += 64 * 2 - 16 * 4;
  }
}
```