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

```asm
<SDL_imageFilterMultByByte>:
  endbr64
  push   %r14
  xor    %eax,%eax
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  mov    %edx,%ebp
  movzbl %r12b,%r14d
  push   %rbx
  mov    %rdi,%rbx
  call   <SDL_imageFilterMMXdetect@plt>
  test   %rax,%rax
  je     L156
  cmp    $0x7,%ebp
  jg     L211
L156:
  xor    %ecx,%ecx
L93:
  cmp    %ebp,%ecx
  jae    L17
  lea    0x1(%rbx),%rdx
  mov    %r13,%rax
  mov    %ebp,%edi
  sub    %rdx,%rax
  sub    %ecx,%edi
  cmp    $0xe,%rax
  jbe    L205
  lea    -0x1(%rdi),%eax
  cmp    $0xe,%eax
  jbe    L205
  movd   %r12d,%xmm3
  mov    %edi,%edx
  pxor   %xmm4,%xmm4
  xor    %eax,%eax
  punpcklbw %xmm3,%xmm3
  shr    $0x4,%edx
  movdqa D4(%rip),%xmm2
  pxor   %xmm5,%xmm5
  punpcklwd %xmm3,%xmm3
  shl    $0x4,%rdx
  pshufd $0x0,%xmm3,%xmm3
  movdqa %xmm3,%xmm6
  punpckhbw %xmm4,%xmm3
  punpcklbw %xmm4,%xmm6
  nopw   0x0(%rax,%rax,1)
L23:
  movdqu (%rbx,%rax,1),%xmm7
  movdqa %xmm7,%xmm1
  punpckhbw %xmm4,%xmm7
  punpcklbw %xmm4,%xmm1
  pmullw %xmm3,%xmm7
  pmullw %xmm6,%xmm1
  movdqa %xmm1,%xmm0
  psubusw %xmm2,%xmm0
  pcmpeqw %xmm5,%xmm0
  pand   %xmm0,%xmm1
  pandn  %xmm2,%xmm0
  por    %xmm1,%xmm0
  movdqa %xmm7,%xmm1
  psubusw %xmm2,%xmm1
  pand   %xmm2,%xmm0
  pcmpeqw %xmm5,%xmm1
  pand   %xmm1,%xmm7
  pandn  %xmm2,%xmm1
  por    %xmm7,%xmm1
  pand   %xmm2,%xmm1
  packuswb %xmm1,%xmm0
  movups %xmm0,0x0(%r13,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L23
  mov    %edi,%esi
  lea    0x1(%rcx),%eax
  and    $0xfffffff0,%esi
  mov    %esi,%edx
  add    %rdx,%rbx
  add    %r13,%rdx
  cmp    %esi,%edi
  je     L17
  movzbl (%rbx),%ecx
  mov    $0xff,%edi
  imul   %r14d,%ecx
  cmp    %edi,%ecx
  cmovg  %edi,%ecx
  add    %esi,%eax
  mov    %cl,(%rdx)
  cmp    %ebp,%eax
  jae    L17
  movzbl 0x1(%rbx),%ecx
  mov    $0xff,%esi
  imul   %r14d,%ecx
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  mov    %cl,0x1(%rdx)
  lea    0x1(%rax),%ecx
  cmp    %ebp,%ecx
  jae    L17
  movzbl 0x2(%rbx),%ecx
  imul   %r14d,%ecx
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  mov    %cl,0x2(%rdx)
  lea    0x2(%rax),%ecx
  cmp    %ecx,%ebp
  jbe    L17
  movzbl 0x3(%rbx),%ecx
  imul   %r14d,%ecx
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  mov    %cl,0x3(%rdx)
  lea    0x3(%rax),%ecx
  cmp    %ecx,%ebp
  jbe    L17
  movzbl 0x4(%rbx),%ecx
  imul   %r14d,%ecx
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  mov    %cl,0x4(%rdx)
  lea    0x4(%rax),%ecx
  cmp    %ecx,%ebp
  jbe    L17
  movzbl 0x5(%rbx),%ecx
  imul   %r14d,%ecx
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  mov    %cl,0x5(%rdx)
  lea    0x5(%rax),%ecx
  cmp    %ecx,%ebp
  jbe    L17
  movzbl 0x6(%rbx),%ecx
  imul   %r14d,%ecx
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  mov    %cl,0x6(%rdx)
  lea    0x6(%rax),%ecx
  cmp    %ecx,%ebp
  jbe    L17
  movzbl 0x7(%rbx),%ecx
  imul   %r14d,%ecx
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  mov    %cl,0x7(%rdx)
  lea    0x7(%rax),%ecx
  cmp    %ecx,%ebp
  jbe    L17
  movzbl 0x8(%rbx),%ecx
  imul   %r14d,%ecx
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  mov    %cl,0x8(%rdx)
  lea    0x8(%rax),%ecx
  cmp    %ecx,%ebp
  jbe    L17
  movzbl 0x9(%rbx),%ecx
  imul   %r14d,%ecx
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  mov    %cl,0x9(%rdx)
  lea    0x9(%rax),%ecx
  cmp    %ecx,%ebp
  jbe    L17
  movzbl 0xa(%rbx),%ecx
  imul   %r14d,%ecx
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  mov    %cl,0xa(%rdx)
  lea    0xa(%rax),%ecx
  cmp    %ecx,%ebp
  jbe    L17
  movzbl 0xb(%rbx),%ecx
  imul   %r14d,%ecx
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  mov    %cl,0xb(%rdx)
  lea    0xb(%rax),%ecx
  cmp    %ecx,%ebp
  jbe    L17
  movzbl 0xc(%rbx),%ecx
  imul   %r14d,%ecx
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  mov    %cl,0xc(%rdx)
  lea    0xc(%rax),%ecx
  cmp    %ecx,%ebp
  jbe    L17
  movzbl 0xd(%rbx),%ecx
  imul   %r14d,%ecx
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  add    $0xd,%eax
  mov    %cl,0xd(%rdx)
  cmp    %eax,%ebp
  jbe    L17
  movzbl 0xe(%rbx),%eax
  mov    $0xff,%ecx
  imul   %r14d,%eax
  cmp    %ecx,%eax
  cmovg  %ecx,%eax
  mov    %al,0xe(%rdx)
L17:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L211:
  mov    %r14d,%ecx
  mov    %ebp,%edx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  call   <SDL_imageFilterMultByByteMMX@plt>
  test   $0x7,%bpl
  je     L17
  mov    %ebp,%ecx
  and    $0xfffffff8,%ecx
  mov    %ecx,%eax
  add    %rax,%rbx
  add    %rax,%r13
  jmp    L93
  nopl   0x0(%rax,%rax,1)
L205:
  sub    $0x1,%ebp
  xor    %edx,%edx
  sub    %ecx,%ebp
  nopw   0x0(%rax,%rax,1)
L4:
  movzbl (%rbx,%rdx,1),%eax
  mov    $0xff,%ecx
  imul   %r14d,%eax
  cmp    %ecx,%eax
  cmovg  %ecx,%eax
  mov    %al,0x0(%r13,%rdx,1)
  mov    %rdx,%rax
  add    $0x1,%rdx
  cmp    %rax,%rbp
  jne    L4
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D4
type_guessed: byte[16]

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

assistant: ```c
int SDL_imageFilterMultByByte(unsigned char *Src1, unsigned char *Dest, int length, unsigned char C) {
  unsigned int i, istart;
  int iC;
  unsigned char *cursrc1;
  unsigned char *curdest;
  int result;
  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
    SDL_imageFilterMultByByteMMX(Src1, Dest, length, C);
    if ((length & 7) > 0) {
      istart = length & 0xfffffff8;
      cursrc1 = &Src1[istart];
      curdest = &Dest[istart];
    } else {
      return (0);
    }
  } else {
    istart = 0;
    cursrc1 = Src1;
    curdest = Dest;
  }
  iC = (int)C;
  for (i = istart; i < length; i++) {
    result = (int)*cursrc1 * iC;
    if (result > 255)
      result = 255;
    *curdest = (unsigned char)result;
    cursrc1++;
    curdest++;
  }
  return (0);
}
```