user: What would the C source look like for the assembly code provided here?

```asm
<redcode_ycbcr2rgb_quarterscale>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,-0x3c(%rsp)
  mov    %edx,-0x38(%rsp)
  test   %edx,%edx
  jle    L40
  mov    %edx,%ebx
  mov    %esi,%edx
  shr    $0x1f,%edx
  sar    %ebx
  add    %esi,%edx
  mov    %ebx,-0x34(%rsp)
  sar    %edx
  mov    %edx,-0x28(%rsp)
  test   %esi,%esi
  jle    L40
  lea    (%rsi,%rsi,1),%ebx
  mov    %rdi,%rax
  movq   $0x0,-0x48(%rsp)
  movss  D24(%rip),%xmm3
  mov    (%rax),%rbp
  mov    0x10(%rax),%r11
  mov    %ebx,-0x24(%rsp)
  movslq %ebx,%rbx
  mov    %rbx,-0x30(%rsp)
  mov    0x18(%rax),%r10
  mov    %rcx,%rdi
  mov    0x8(%rax),%rbx
  lea    -0x1(%rsi),%eax
  movl   $0x0,-0x40(%rsp)
  mov    %eax,%esi
  mov    %eax,-0x1c(%rsp)
  shr    $0x3,%eax
  movq   D157(%rip),%xmm13
  shr    %esi
  lea    -0x1(%rax),%r9d
  movl   $0x0,-0x4c(%rsp)
  movdqa D49(%rip),%xmm4
  mov    %esi,-0x20(%rsp)
  lea    0x0(,%rax,4),%esi
  shl    $0x3,%eax
  add    $0x1,%r9
  mov    %eax,-0x10(%rsp)
  mov    %esi,%eax
  movaps D30(%rip),%xmm10
  shl    $0x5,%r9
  shl    $0x4,%rax
  mov    %esi,-0xc(%rsp)
  movaps D118(%rip),%xmm9
  mov    %rax,-0x18(%rsp)
  movaps D27(%rip),%xmm5
  movdqa D20(%rip),%xmm6
  movq   D49(%rip),%xmm7
  movq   D20(%rip),%xmm11
  movq   D27(%rip),%xmm12
  nopl   (%rax)
L50:
  mov    -0x4c(%rsp),%esi
  mov    -0x34(%rsp),%r12d
  mov    %esi,%eax
  shr    $0x1f,%eax
  add    %esi,%eax
  sar    %eax
  sub    %eax,%r12d
  sub    $0x1,%r12d
  imul   -0x28(%rsp),%r12d
  cmpl   $0x7,-0x1c(%rsp)
  movslq %r12d,%r12
  lea    0x0(,%r12,4),%rax
  lea    (%rdi,%rax,1),%r8
  jbe    L24
  mov    -0x48(%rsp),%rsi
  lea    0xc(%rdi,%rax,1),%rcx
  mov    %r8,%rdx
  xor    %eax,%eax
  pxor   %xmm8,%xmm8
  shl    $0x2,%rsi
  lea    0x0(%rbp,%rsi,1),%r15
  lea    (%rbx,%rsi,1),%r14
  lea    (%r11,%rsi,1),%r13
  add    %r10,%rsi
  nopl   0x0(%rax)
L36:
  movdqu 0x10(%rsi,%rax,1),%xmm2
  movdqu (%rsi,%rax,1),%xmm15
  add    $0x40,%rdx
  movdqu (%r15,%rax,1),%xmm0
  movdqu 0x0(%r13,%rax,1),%xmm1
  shufps $0x88,%xmm2,%xmm15
  movdqu 0x10(%r15,%rax,1),%xmm2
  pand   %xmm4,%xmm15
  movdqu 0x10(%r14,%rax,1),%xmm14
  cvtdq2ps %xmm15,%xmm15
  shufps $0x88,%xmm2,%xmm0
  pand   %xmm4,%xmm0
  movdqu 0x10(%r13,%rax,1),%xmm2
  cvtdq2ps %xmm0,%xmm0
  addps  %xmm0,%xmm15
  movdqu (%r14,%rax,1),%xmm0
  shufps $0x88,%xmm2,%xmm1
  pand   %xmm4,%xmm1
  paddd  %xmm6,%xmm1
  shufps $0x88,%xmm14,%xmm0
  pand   %xmm4,%xmm0
  mulps  %xmm10,%xmm15
  cvtdq2ps %xmm1,%xmm1
  paddd  %xmm6,%xmm0
  mulps  %xmm5,%xmm1
  cvtdq2ps %xmm0,%xmm0
  mulps  %xmm5,%xmm0
  mulps  %xmm9,%xmm15
  addps  %xmm15,%xmm1
  movaps %xmm15,%xmm2
  addps  %xmm15,%xmm0
  addps  %xmm8,%xmm2
  movaps %xmm1,%xmm15
  movss  %xmm1,-0x40(%rdx)
  shufps $0x55,%xmm1,%xmm15
  movss  %xmm15,-0x30(%rdx)
  movaps %xmm1,%xmm15
  unpckhps %xmm1,%xmm15
  shufps $0xff,%xmm1,%xmm1
  movss  %xmm1,-0x10(%rdx)
  movaps %xmm2,%xmm1
  shufps $0x55,%xmm2,%xmm1
  movss  %xmm1,-0x2c(%rdx)
  movaps %xmm2,%xmm1
  unpckhps %xmm2,%xmm1
  movss  %xmm2,-0x3c(%rdx)
  shufps $0xff,%xmm2,%xmm2
  movss  %xmm1,-0x1c(%rdx)
  movaps %xmm0,%xmm1
  shufps $0x55,%xmm0,%xmm1
  movss  %xmm1,-0x28(%rdx)
  movaps %xmm0,%xmm1
  unpckhps %xmm0,%xmm1
  movss  %xmm0,-0x38(%rdx)
  shufps $0xff,%xmm0,%xmm0
  movss  %xmm15,-0x20(%rdx)
  movss  %xmm2,-0xc(%rdx)
  movss  %xmm1,-0x18(%rdx)
  movss  %xmm0,-0x8(%rdx)
  movss  %xmm3,(%rcx,%rax,2)
  movss  %xmm3,0x10(%rcx,%rax,2)
  movss  %xmm3,0x20(%rcx,%rax,2)
  movss  %xmm3,0x30(%rcx,%rax,2)
  add    $0x20,%rax
  cmp    %rax,%r9
  jne    L36
  mov    -0xc(%rsp),%eax
  mov    -0x10(%rsp),%esi
  add    -0x18(%rsp),%r8
L56:
  mov    -0x20(%rsp),%ecx
  sub    %eax,%ecx
  cmp    $0x1,%ecx
  jbe    L20
  mov    -0x48(%rsp),%rdx
  xorps  %xmm8,%xmm8
  and    $0xfffffffe,%ecx
  lea    (%rsi,%rcx,2),%esi
  shl    $0x4,%rcx
  lea    (%rdx,%rax,2),%rdx
  lea    (%r12,%rax,4),%rax
  add    %rcx,%r8
  shl    $0x2,%rdx
  shl    $0x2,%rax
  lea    0x0(%rbp,%rdx,1),%r15
  lea    (%rbx,%rdx,1),%r13
  movq   0x8(%r15),%xmm1
  movq   (%r15),%xmm0
  lea    (%r11,%rdx,1),%r14
  add    %r10,%rdx
  movq   0x8(%rdx),%xmm2
  movq   0x8(%r13),%xmm15
  lea    0xc(%rdi,%rax,1),%r12
  punpckldq %xmm1,%xmm0
  movq   (%rdx),%xmm1
  pand   %xmm7,%xmm0
  punpckldq %xmm2,%xmm1
  cvtdq2ps %xmm0,%xmm0
  movq   D30(%rip),%xmm2
  pand   %xmm7,%xmm1
  cvtdq2ps %xmm1,%xmm1
  addps  %xmm1,%xmm0
  movq   0x8(%r14),%xmm1
  mulps  %xmm2,%xmm0
  movq   D118(%rip),%xmm2
  mulps  %xmm2,%xmm0
  movq   (%r14),%xmm2
  punpckldq %xmm1,%xmm2
  movq   0x0(%r13),%xmm1
  pand   %xmm7,%xmm2
  punpckldq %xmm15,%xmm1
  paddd  %xmm11,%xmm2
  pand   %xmm7,%xmm1
  addps  %xmm0,%xmm8
  paddd  %xmm11,%xmm1
  cvtdq2ps %xmm2,%xmm2
  mulps  %xmm12,%xmm2
  movss  %xmm8,0x4(%rdi,%rax,1)
  shufps $0xe5,%xmm8,%xmm8
  cvtdq2ps %xmm1,%xmm1
  mulps  %xmm12,%xmm1
  movss  %xmm8,0x14(%rdi,%rax,1)
  addps  %xmm0,%xmm2
  addps  %xmm0,%xmm1
  movss  %xmm2,(%rdi,%rax,1)
  shufps $0xe5,%xmm2,%xmm2
  movss  %xmm2,0x10(%rdi,%rax,1)
  movss  %xmm1,0x8(%rdi,%rax,1)
  shufps $0xe5,%xmm1,%xmm1
  movss  %xmm1,0x18(%rdi,%rax,1)
  movss  %xmm3,(%r12)
  movss  %xmm3,0x10(%r12)
L20:
  mov    -0x40(%rsp),%ecx
  pxor   %xmm1,%xmm1
  pxor   %xmm0,%xmm0
  pxor   %xmm2,%xmm2
  pxor   %xmm8,%xmm8
  lea    (%rcx,%rsi,1),%eax
  add    $0x2,%esi
  cltq
  mov    (%rbx,%rax,4),%edx
  and    $0xfff,%edx
  sub    $0x800,%edx
  cvtsi2ss %edx,%xmm1
  mov    (%r10,%rax,4),%edx
  mulss  D27(%rip),%xmm1
  and    $0xfff,%edx
  cvtsi2ss %edx,%xmm0
  mov    0x0(%rbp,%rax,4),%edx
  mov    (%r11,%rax,4),%eax
  movss  %xmm3,0xc(%r8)
  and    $0xfff,%edx
  and    $0xfff,%eax
  cvtsi2ss %edx,%xmm2
  sub    $0x800,%eax
  cvtsi2ss %eax,%xmm8
  addss  %xmm2,%xmm0
  mulss  D30(%rip),%xmm0
  pxor   %xmm2,%xmm2
  unpcklps %xmm0,%xmm8
  mulss  D118(%rip),%xmm0
  mulps  %xmm13,%xmm8
  unpcklps %xmm2,%xmm0
  addps  %xmm8,%xmm0
  shufps $0xe5,%xmm8,%xmm8
  movlps %xmm0,(%r8)
  movaps %xmm8,%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,0x8(%r8)
  cmp    %esi,-0x3c(%rsp)
  jle    L45
  pxor   %xmm1,%xmm1
  pxor   %xmm0,%xmm0
  pxor   %xmm2,%xmm2
  add    %ecx,%esi
  movslq %esi,%rsi
  pxor   %xmm8,%xmm8
  mov    (%rbx,%rsi,4),%eax
  and    $0xfff,%eax
  sub    $0x800,%eax
  cvtsi2ss %eax,%xmm1
  mov    0x0(%rbp,%rsi,4),%eax
  mulss  D27(%rip),%xmm1
  and    $0xfff,%eax
  cvtsi2ss %eax,%xmm0
  mov    (%r10,%rsi,4),%eax
  and    $0xfff,%eax
  cvtsi2ss %eax,%xmm2
  mov    (%r11,%rsi,4),%eax
  movss  %xmm3,0x1c(%r8)
  and    $0xfff,%eax
  sub    $0x800,%eax
  cvtsi2ss %eax,%xmm8
  addss  %xmm2,%xmm0
  pxor   %xmm2,%xmm2
  mulss  D30(%rip),%xmm0
  unpcklps %xmm0,%xmm8
  mulss  D118(%rip),%xmm0
  mulps  %xmm13,%xmm8
  unpcklps %xmm2,%xmm0
  addps  %xmm8,%xmm0
  shufps $0xe5,%xmm8,%xmm8
  movlps %xmm0,0x10(%r8)
  movaps %xmm8,%xmm0
  addss  %xmm1,%xmm0
  movss  %xmm0,0x18(%r8)
L45:
  mov    -0x24(%rsp),%ecx
  addl   $0x2,-0x4c(%rsp)
  add    %ecx,-0x40(%rsp)
  mov    -0x4c(%rsp),%eax
  mov    -0x30(%rsp),%rcx
  add    %rcx,-0x48(%rsp)
  cmp    %eax,-0x38(%rsp)
  jg     L50
L40:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L24:
  xor    %eax,%eax
  xor    %esi,%esi
  jmp    L56
```

tool_calls: name: unpack_data
arguments: tag: D24
data_type: f32
name: unpack_data
arguments: tag: D157
data_type: byte[8]
name: unpack_data
arguments: tag: D49
data_type: byte[16]
name: unpack_data
arguments: tag: D30
data_type: byte[16]
name: unpack_data
arguments: tag: D118
data_type: byte[16]
name: unpack_data
arguments: tag: D27
data_type: byte[16]
name: unpack_data
arguments: tag: D20
data_type: byte[16]

tool: D24: 1

tool: {"D157": [0x00,0x00,0x00,0x3a,0x00,0x00,0x80,0x39]}

tool: {"D49": [0xff,0x0f,0x00,0x00,0xff,0x0f,0x00,0x00,0xff,0x0f,0x00,0x00,0xff,0x0f,0x00,0x00]}

tool: {"D30": [0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x3f]}

tool: {"D118": [0x00,0x00,0x80,0x39,0x00,0x00,0x80,0x39,0x00,0x00,0x80,0x39,0x00,0x00,0x80,0x39]}

tool: {"D27": [0x00,0x00,0x00,0x3a,0x00,0x00,0x00,0x3a,0x00,0x00,0x00,0x3a,0x00,0x00,0x00,0x3a]}

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

assistant: ```c
void redcode_ycbcr2rgb_quarterscale(int **planes, int width, int height, float *out) {
  int x, y;
  int pix_max = 4096;
  int mask = pix_max - 1;
  for (y = 0; y < height; y += 2) {
    float *o = out + (width / 2) * (height / 2 - y / 2 - 1);
    for (x = 0; x < width; x += 2) {
      int i = y * width + x;
      float y1 = planes[0][i] & mask;
      float cb = (planes[1][i] & mask) - pix_max / 2;
      float cr = (planes[2][i] & mask) - pix_max / 2;
      float y2 = planes[3][i] & mask;
      float b_ = cb / (pix_max / 2);
      float r_ = cr / (pix_max / 2);
      float g_ = 0.0;
      float y = (y1 + y2) / 2 / pix_max;
      *o++ = r_ + y;
      *o++ = g_ + y;
      *o++ = b_ + y;
      *o++ = 1.0;
    }
  }
}
```