user: Demonstrate the C code that generates the assembly output below:

```asm
<colormatrix>:
  endbr64
  imul   %edx,%esi
  mov    %rdi,%rax
  shl    $0x2,%esi
  movslq %esi,%rsi
  add    %rdi,%rsi
  cmp    %rsi,%rdi
  jae    L116
  movss  0x14(%rcx),%xmm7
  movss  (%rcx),%xmm14
  movss  0x4(%rcx),%xmm13
  movss  0x8(%rcx),%xmm12
  movss  %xmm7,-0x34(%rsp)
  movss  0x18(%rcx),%xmm7
  movss  0xc(%rcx),%xmm11
  movss  0x10(%rcx),%xmm10
  movss  0x48(%rcx),%xmm9
  movss  %xmm7,-0x30(%rsp)
  movss  0x1c(%rcx),%xmm7
  movss  %xmm7,-0x2c(%rsp)
  movss  0x20(%rcx),%xmm7
  movss  %xmm7,-0x28(%rsp)
  movss  0x24(%rcx),%xmm7
  movss  %xmm7,-0x24(%rsp)
  movss  0x28(%rcx),%xmm7
  movss  %xmm7,-0x20(%rsp)
  movss  0x2c(%rcx),%xmm7
  movss  %xmm7,-0x1c(%rsp)
  movss  0x30(%rcx),%xmm7
  movss  %xmm7,-0x18(%rsp)
  movss  0x34(%rcx),%xmm7
  movss  %xmm7,-0x14(%rsp)
  movss  0x38(%rcx),%xmm7
  movss  %xmm7,-0x10(%rsp)
  movss  0x3c(%rcx),%xmm7
  movss  %xmm7,-0xc(%rsp)
  movss  0x40(%rcx),%xmm7
  movss  %xmm7,-0x8(%rsp)
  movss  0x44(%rcx),%xmm7
  movss  %xmm7,-0x4(%rsp)
  movss  0x4c(%rcx),%xmm8
  pxor   %xmm7,%xmm7
  jmp    L81
  nopw   0x0(%rax,%rax,1)
L0:
  or     $0xff,%dh
L94:
  comiss D40(%rip),%xmm2
  jbe    L82
L118:
  or     $0xff0000,%edx
L93:
  comiss D40(%rip),%xmm0
  jbe    L114
L72:
  or     $0xff000000,%edx
L78:
  add    $0x4,%rax
  mov    %edx,-0x4(%rax)
  cmp    %rax,%rsi
  jbe    L116
L81:
  movzbl (%rax),%edx
  pxor   %xmm0,%xmm0
  pxor   %xmm6,%xmm6
  pxor   %xmm5,%xmm5
  pxor   %xmm1,%xmm1
  movss  -0x34(%rsp),%xmm3
  movss  -0x1c(%rsp),%xmm15
  cvtsi2ss %edx,%xmm0
  movzbl 0x1(%rax),%edx
  cvtsi2ss %edx,%xmm6
  movzbl 0x2(%rax),%edx
  cvtsi2ss %edx,%xmm5
  movzbl 0x3(%rax),%edx
  mulss  %xmm0,%xmm3
  movaps %xmm0,%xmm4
  mulss  %xmm14,%xmm4
  cvtsi2ss %edx,%xmm1
  movaps %xmm6,%xmm2
  mov    $0xff,%edx
  mulss  %xmm13,%xmm2
  mulss  %xmm6,%xmm15
  addss  %xmm2,%xmm4
  movaps %xmm5,%xmm2
  mulss  %xmm12,%xmm2
  addss  %xmm2,%xmm4
  movaps %xmm1,%xmm2
  mulss  %xmm11,%xmm2
  addss  %xmm2,%xmm4
  movss  -0x30(%rsp),%xmm2
  mulss  %xmm6,%xmm2
  mulss  -0x8(%rsp),%xmm6
  addss  %xmm10,%xmm4
  comiss D40(%rip),%xmm4
  addss  %xmm2,%xmm3
  movss  -0x2c(%rsp),%xmm2
  mulss  %xmm5,%xmm2
  addss  %xmm2,%xmm3
  movss  -0x28(%rsp),%xmm2
  mulss  %xmm1,%xmm2
  addss  %xmm2,%xmm3
  movss  -0x20(%rsp),%xmm2
  addss  -0x24(%rsp),%xmm3
  mulss  %xmm0,%xmm2
  mulss  -0xc(%rsp),%xmm0
  addss  %xmm2,%xmm15
  movss  -0x18(%rsp),%xmm2
  addss  %xmm0,%xmm6
  mulss  %xmm5,%xmm2
  mulss  -0x4(%rsp),%xmm5
  addss  %xmm15,%xmm2
  movss  -0x14(%rsp),%xmm15
  addss  %xmm6,%xmm5
  mulss  %xmm1,%xmm15
  mulss  %xmm9,%xmm1
  addss  %xmm15,%xmm2
  addss  -0x10(%rsp),%xmm2
  movaps %xmm1,%xmm0
  addss  %xmm5,%xmm0
  addss  %xmm8,%xmm0
  ja     L64
  xor    %edx,%edx
  comiss %xmm4,%xmm7
  ja     L64
  cvttss2si %xmm4,%edx
L64:
  comiss D40(%rip),%xmm3
  ja     L0
  comiss %xmm3,%xmm7
  ja     L94
  cvttss2si %xmm3,%ecx
  shl    $0x8,%ecx
  or     %ecx,%edx
  comiss D40(%rip),%xmm2
  ja     L118
L82:
  comiss %xmm2,%xmm7
  ja     L93
  cvttss2si %xmm2,%ecx
  shl    $0x10,%ecx
  or     %ecx,%edx
  comiss D40(%rip),%xmm0
  ja     L72
L114:
  comiss %xmm0,%xmm7
  ja     L78
  cvttss2si %xmm0,%ecx
  add    $0x4,%rax
  shl    $0x18,%ecx
  or     %ecx,%edx
  mov    %edx,-0x4(%rax)
  cmp    %rax,%rsi
  ja     L81
L116:
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D40
type: byte[4]

tool: {"D40": [0x00,0x00,0x7f,0x43]}

assistant: ```c
void colormatrix(unsigned char *img, int width, int height, float *m) {
  unsigned char *imgEnd = img + ((width * height) << 2);
  unsigned int *img32 = (unsigned int *)img;
  int r, g, b, a;
  float rr, rg, rb, ra;
  while (img < imgEnd) {
    r = *img;
    g = *(img + 1);
    b = *(img + 2);
    a = *(img + 3);
    rr = r * m[0] + g * m[1] + b * m[2] + a * m[3] + m[4];
    rg = r * m[5] + g * m[6] + b * m[7] + a * m[8] + m[9];
    rb = r * m[10] + g * m[11] + b * m[12] + a * m[13] + m[14];
    ra = r * m[15] + g * m[16] + b * m[17] + a * m[18] + m[19];
    *img32++ = (int)((rr) > 0xff ? 0xff : ((rr) < 0 ? 0 : (rr))) | (int)((rg) > 0xff ? 0xff : ((rg) < 0 ? 0 : (rg))) << 8 | (int)((rb) > 0xff ? 0xff : ((rb) < 0 ? 0 : (rb))) << 16 | (int)((ra) > 0xff ? 0xff : ((ra) < 0 ? 0 : (ra))) << 24;
    img += 4;
  }
}
```