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

```asm
<ximage_convert_bgr233>:
  endbr64
  test   %r9d,%r9d
  jle    L68
  movslq %esi,%rsi
  movslq %ecx,%r11
  test   %r8d,%r8d
  jle    L68
  push   %r13
  movdqa D20(%rip),%xmm2
  mov    %rdx,%r10
  xor    %ecx,%ecx
  push   %r12
  movdqa D29(%rip),%xmm6
  push   %rbp
  lea    -0x1(%r8),%ebp
  movdqa D9(%rip),%xmm5
  mov    %ebp,%eax
  push   %rbx
  mov    %ebp,%r12d
  movdqa D33(%rip),%xmm4
  shr    $0x4,%eax
  movdqa D5(%rip),%xmm3
  and    $0xfffffff0,%r12d
  lea    -0x1(%rax),%ebx
  add    $0x1,%rbx
  shl    $0x4,%rbx
  nopw   0x0(%rax,%rax,1)
L31:
  mov    %r10,%rdx
  mov    %rdi,%rax
  lea    (%rbx,%r10,1),%r13
  cmp    $0xf,%ebp
  jbe    L57
  nopl   0x0(%rax,%rax,1)
L39:
  movdqu (%rax),%xmm1
  movdqu 0x10(%rax),%xmm0
  add    $0x10,%rdx
  add    $0x40,%rax
  movdqu -0x20(%rax),%xmm7
  movdqu -0x30(%rax),%xmm8
  pand   %xmm2,%xmm0
  pand   %xmm2,%xmm1
  movdqu -0x10(%rax),%xmm9
  packuswb %xmm0,%xmm1
  movdqu -0x10(%rax),%xmm0
  pand   %xmm2,%xmm7
  psrlw  $0x8,%xmm8
  psrlw  $0x8,%xmm9
  pand   %xmm2,%xmm0
  packuswb %xmm0,%xmm7
  movdqu -0x40(%rax),%xmm0
  psrlw  $0x8,%xmm0
  packuswb %xmm8,%xmm0
  movdqu -0x20(%rax),%xmm8
  pand   %xmm2,%xmm0
  psrlw  $0x8,%xmm8
  packuswb %xmm9,%xmm8
  movdqa %xmm7,%xmm9
  pand   %xmm2,%xmm7
  pand   %xmm2,%xmm8
  psrlw  $0x8,%xmm9
  packuswb %xmm8,%xmm0
  movdqa %xmm1,%xmm8
  pand   %xmm2,%xmm1
  psrlw  $0x2,%xmm0
  psrlw  $0x8,%xmm8
  packuswb %xmm7,%xmm1
  pand   %xmm6,%xmm0
  psrlw  $0x5,%xmm1
  packuswb %xmm9,%xmm8
  pand   %xmm5,%xmm0
  pand   %xmm4,%xmm8
  pand   %xmm3,%xmm1
  por    %xmm8,%xmm0
  por    %xmm1,%xmm0
  movups %xmm0,-0x10(%rdx)
  cmp    %rdx,%r13
  jne    L39
  movslq %r12d,%rdx
  nopl   0x0(%rax)
L33:
  movzbl 0x1(%rdi,%rdx,4),%eax
  movzbl 0x2(%rdi,%rdx,4),%r13d
  shr    $0x2,%al
  and    $0xffffffc0,%r13d
  and    $0x38,%eax
  or     %r13d,%eax
  movzbl (%rdi,%rdx,4),%r13d
  shr    $0x5,%r13b
  or     %r13d,%eax
  mov    %al,(%r10,%rdx,1)
  add    $0x1,%rdx
  cmp    %edx,%r8d
  jg     L33
  add    $0x1,%ecx
  add    %rsi,%rdi
  add    %r11,%r10
  cmp    %ecx,%r9d
  jne    L31
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L57:
  xor    %edx,%edx
  jmp    L33
L68:
  ret
```

tool_calls: name: disassemble_data
arguments: label: D20
type_guessed: byte[16]
name: disassemble_data
arguments: label: D29
type_guessed: byte[16]
name: disassemble_data
arguments: label: D9
type_guessed: byte[16]
name: disassemble_data
arguments: label: D33
type_guessed: byte[16]
name: disassemble_data
arguments: label: D5
type_guessed: byte[16]

tool: {"D20": [0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00]}

tool: {"D29": [0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f]}

tool: {"D9": [0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38]}

tool: {"D33": [0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0]}

tool: {"D5": [0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07]}

assistant: ```c
void ximage_convert_bgr233(const unsigned char *__restrict src, int srcstride, unsigned char *__restrict dst, int dststride, int w, int h) {
  unsigned char r, g, b;
  int x, y;
  for (y = 0; y < h; y++) {
    for (x = 0; x < w; x++) {
      r = src[4 * x + 0];
      g = src[4 * x + 1];
      b = src[4 * x + 2];
      dst[x] = (b & 0xC0) | ((g >> 2) & 0x38) | ((r >> 5) & 0x7);
    }
    src += srcstride;
    dst += dststride;
  }
}
```