user: Converte this assembly snippet into its equivalent C code:

```asm
<rgb15tobgr32>:
  endbr64
  mov    %edx,%eax
  mov    %rsi,%rcx
  shr    %eax
  shl    $0x2,%rax
  lea    (%rdi,%rax,1),%r9
  cmp    %r9,%rdi
  jae    L39
  sub    $0x1,%rax
  mov    %rdi,%rdx
  mov    %rax,%r8
  shr    $0x2,%r8
  add    $0x1,%r8
  lea    (%rdi,%r8,4),%rsi
  cmp    %rsi,%rcx
  mov    %r8,%rsi
  setae  %r10b
  shl    $0x4,%rsi
  add    %rcx,%rsi
  cmp    %rsi,%rdi
  setae  %sil
  or     %sil,%r10b
  je     L66
  cmp    $0x17,%rax
  jbe    L66
  mov    %r8,%rsi
  movdqa D19(%rip),%xmm3
  movdqa D11(%rip),%xmm4
  mov    %rcx,%rax
  shr    $0x2,%rsi
  shl    $0x4,%rsi
  add    %rdi,%rsi
  xchg   %ax,%ax
L31:
  movdqu (%rdx),%xmm0
  add    $0x10,%rdx
  add    $0x40,%rax
  movl   $0x0,-0x34(%rax)
  movl   $0x0,-0x24(%rax)
  movdqa %xmm0,%xmm2
  movdqa %xmm0,%xmm1
  movl   $0x0,-0x14(%rax)
  psrad  $0x7,%xmm2
  psrad  $0x2,%xmm1
  movl   $0x0,-0x4(%rax)
  pand   %xmm3,%xmm2
  pslld  $0x3,%xmm0
  pand   %xmm3,%xmm1
  pshufd $0x55,%xmm2,%xmm5
  movd   %xmm2,-0x40(%rax)
  pand   %xmm4,%xmm0
  movd   %xmm5,-0x30(%rax)
  movdqa %xmm2,%xmm5
  punpckhdq %xmm2,%xmm5
  pshufd $0xff,%xmm2,%xmm2
  movd   %xmm1,-0x3c(%rax)
  movd   %xmm2,-0x10(%rax)
  pshufd $0x55,%xmm1,%xmm2
  movd   %xmm2,-0x2c(%rax)
  movdqa %xmm1,%xmm2
  punpckhdq %xmm1,%xmm2
  pshufd $0xff,%xmm1,%xmm1
  movd   %xmm0,-0x38(%rax)
  movd   %xmm1,-0xc(%rax)
  pshufd $0x55,%xmm0,%xmm1
  movd   %xmm1,-0x28(%rax)
  movdqa %xmm0,%xmm1
  punpckhdq %xmm0,%xmm1
  pshufd $0xff,%xmm0,%xmm0
  movd   %xmm5,-0x20(%rax)
  movd   %xmm2,-0x1c(%rax)
  movd   %xmm1,-0x18(%rax)
  movd   %xmm0,-0x8(%rax)
  cmp    %rsi,%rdx
  jne    L31
  mov    %r8,%rdx
  and    $0xfffffffffffffffc,%rdx
  mov    %rdx,%rax
  shl    $0x4,%rax
  add    %rcx,%rax
  lea    (%rdi,%rdx,4),%rcx
  cmp    %rdx,%r8
  je     L39
  mov    (%rcx),%edx
  movl   $0x0,0xc(%rax)
  mov    %edx,%esi
  sar    $0x7,%esi
  and    $0xf8,%esi
  mov    %esi,(%rax)
  mov    %edx,%esi
  shl    $0x3,%edx
  and    $0xff,%edx
  sar    $0x2,%esi
  mov    %edx,0x8(%rax)
  and    $0xf8,%esi
  lea    0x4(%rcx),%rdx
  mov    %esi,0x4(%rax)
  cmp    %rdx,%r9
  jbe    L39
  mov    0x4(%rcx),%edx
  movl   $0x0,0x1c(%rax)
  mov    %edx,%esi
  sar    $0x7,%esi
  and    $0xf8,%esi
  mov    %esi,0x10(%rax)
  mov    %edx,%esi
  shl    $0x3,%edx
  and    $0xff,%edx
  sar    $0x2,%esi
  mov    %edx,0x18(%rax)
  and    $0xf8,%esi
  lea    0x8(%rcx),%rdx
  mov    %esi,0x14(%rax)
  cmp    %rdx,%r9
  jbe    L39
  mov    0x8(%rcx),%edx
  movl   $0x0,0x2c(%rax)
  mov    %edx,%ecx
  sar    $0x7,%ecx
  and    $0xf8,%ecx
  mov    %ecx,0x20(%rax)
  mov    %edx,%ecx
  shl    $0x3,%edx
  sar    $0x2,%ecx
  and    $0xff,%edx
  and    $0xf8,%ecx
  mov    %edx,0x28(%rax)
  mov    %ecx,0x24(%rax)
  ret
  nop
L66:
  mov    (%rdi),%eax
  add    $0x4,%rdi
  add    $0x10,%rcx
  mov    %eax,%edx
  sar    $0x7,%edx
  and    $0xf8,%edx
  mov    %edx,-0x10(%rcx)
  mov    %eax,%edx
  shl    $0x3,%eax
  sar    $0x2,%edx
  and    $0xff,%eax
  mov    %eax,-0x8(%rcx)
  and    $0xf8,%edx
  mov    %edx,-0xc(%rcx)
  movl   $0x0,-0x4(%rcx)
  cmp    %rdi,%r9
  ja     L66
L39:
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D19
type_guessed: byte[16]
name: extract_symbolic_data
arguments: tag: D11
type_guessed: byte[16]

tool: {"D19": [0xf8,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0xf8,0x00,0x00,0x00]}

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

assistant: ```c
void rgb15tobgr32(const uint8_t *src, uint8_t *dst, unsigned int src_size) {
  const uint16_t *end;
  uint8_t *d = (uint8_t *)dst;
  const uint16_t *s = (const uint16_t *)src;
  end = s + src_size / 2;
  while (s < end) {
    register uint16_t bgr;
    bgr = *s++;
    *d++ = (bgr & 0x7C00) >> 7;
    *d++ = (bgr & 0x3E0) >> 2;
    *d++ = (bgr & 0x1F) << 3;
    *d++ = 0;
  }
}
```