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

```asm
<SDL_imageFilterAddByte>:
  endbr64
  test   %rdi,%rdi
  je     L230
  push   %r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  test   %rsi,%rsi
  je     L308
  mov    %edx,%r12d
  test   %edx,%edx
  je     L148
  mov    %rdi,%rbp
  mov    %ecx,%r14d
  test   %cl,%cl
  je     L63
  xor    %eax,%eax
  movzbl %r14b,%ebx
  call   <SDL_imageFilterMMXdetect@plt>
  test   %rax,%rax
  je     L297
  cmp    $0x7,%r12d
  ja     L301
L297:
  xor    %edi,%edi
L293:
  mov    %r12d,%eax
  lea    0x1(%rdi),%esi
  movzbl %r14b,%r14d
  sub    %edi,%eax
  lea    -0x1(%rax),%edx
  cmp    $0xe,%edx
  seta   %cl
  cmp    %r12d,%esi
  setbe  %dl
  test   %dl,%cl
  je     L66
  lea    0x1(%rbp),%rcx
  mov    %r13,%rdx
  sub    %rcx,%rdx
  cmp    $0xe,%rdx
  jbe    L66
  cmp    %r12d,%esi
  movd   %r14d,%xmm4
  pxor   %xmm6,%xmm6
  mov    $0x1,%edi
  cmovbe %eax,%edi
  punpcklwd %xmm4,%xmm4
  xor    %eax,%eax
  xor    %edx,%edx
  movdqa D8(%rip),%xmm3
  pshufd $0x0,%xmm4,%xmm4
  pxor   %xmm5,%xmm5
  lea    -0x10(%rdi),%ecx
  shr    $0x4,%ecx
  add    $0x1,%ecx
  nopl   0x0(%rax,%rax,1)
L264:
  movdqu 0x0(%rbp,%rax,1),%xmm2
  add    $0x1,%edx
  movdqa %xmm2,%xmm1
  punpckhbw %xmm6,%xmm2
  punpcklbw %xmm6,%xmm1
  paddw  %xmm4,%xmm2
  paddw  %xmm4,%xmm1
  movdqa %xmm1,%xmm0
  psubusw %xmm3,%xmm0
  pcmpeqw %xmm5,%xmm0
  pand   %xmm0,%xmm1
  pandn  %xmm3,%xmm0
  por    %xmm1,%xmm0
  movdqa %xmm2,%xmm1
  psubusw %xmm3,%xmm1
  pand   %xmm3,%xmm0
  pcmpeqw %xmm5,%xmm1
  pand   %xmm1,%xmm2
  pandn  %xmm3,%xmm1
  por    %xmm2,%xmm1
  pand   %xmm3,%xmm1
  packuswb %xmm1,%xmm0
  movups %xmm0,0x0(%r13,%rax,1)
  add    $0x10,%rax
  cmp    %ecx,%edx
  jb     L264
  shl    $0x4,%ecx
  mov    %ecx,%eax
  add    %rax,%rbp
  add    %r13,%rax
  cmp    %ecx,%edi
  je     L148
  movzbl 0x0(%rbp),%edx
  mov    $0xff,%edi
  add    %ebx,%edx
  cmp    %edi,%edx
  cmovg  %edi,%edx
  add    %esi,%ecx
  mov    %dl,(%rax)
  cmp    %ecx,%r12d
  jbe    L148
  movzbl 0x1(%rbp),%edx
  mov    $0xff,%esi
  add    %ebx,%edx
  cmp    %esi,%edx
  cmovg  %esi,%edx
  mov    %dl,0x1(%rax)
  lea    0x1(%rcx),%edx
  cmp    %r12d,%edx
  jae    L148
  movzbl 0x2(%rbp),%edx
  add    %ebx,%edx
  cmp    %esi,%edx
  cmovg  %esi,%edx
  mov    %dl,0x2(%rax)
  lea    0x2(%rcx),%edx
  cmp    %edx,%r12d
  jbe    L148
  movzbl 0x3(%rbp),%edx
  add    %ebx,%edx
  cmp    %esi,%edx
  cmovg  %esi,%edx
  mov    %dl,0x3(%rax)
  lea    0x3(%rcx),%edx
  cmp    %edx,%r12d
  jbe    L148
  movzbl 0x4(%rbp),%edx
  add    %ebx,%edx
  cmp    %esi,%edx
  cmovg  %esi,%edx
  mov    %dl,0x4(%rax)
  lea    0x4(%rcx),%edx
  cmp    %edx,%r12d
  jbe    L148
  movzbl 0x5(%rbp),%edx
  add    %ebx,%edx
  cmp    %esi,%edx
  cmovg  %esi,%edx
  mov    %dl,0x5(%rax)
  lea    0x5(%rcx),%edx
  cmp    %edx,%r12d
  jbe    L148
  movzbl 0x6(%rbp),%edx
  add    %ebx,%edx
  cmp    %esi,%edx
  cmovg  %esi,%edx
  mov    %dl,0x6(%rax)
  lea    0x6(%rcx),%edx
  cmp    %edx,%r12d
  jbe    L148
  movzbl 0x7(%rbp),%edx
  add    %ebx,%edx
  cmp    %esi,%edx
  cmovg  %esi,%edx
  mov    %dl,0x7(%rax)
  lea    0x7(%rcx),%edx
  cmp    %edx,%r12d
  jbe    L148
  movzbl 0x8(%rbp),%edx
  add    %ebx,%edx
  cmp    %esi,%edx
  cmovg  %esi,%edx
  mov    %dl,0x8(%rax)
  lea    0x8(%rcx),%edx
  cmp    %edx,%r12d
  jbe    L148
  movzbl 0x9(%rbp),%edx
  add    %ebx,%edx
  cmp    %esi,%edx
  cmovg  %esi,%edx
  mov    %dl,0x9(%rax)
  lea    0x9(%rcx),%edx
  cmp    %edx,%r12d
  jbe    L148
  movzbl 0xa(%rbp),%edx
  add    %ebx,%edx
  cmp    %esi,%edx
  cmovg  %esi,%edx
  mov    %dl,0xa(%rax)
  lea    0xa(%rcx),%edx
  cmp    %edx,%r12d
  jbe    L148
  movzbl 0xb(%rbp),%edx
  add    %ebx,%edx
  cmp    %esi,%edx
  cmovg  %esi,%edx
  mov    %dl,0xb(%rax)
  lea    0xb(%rcx),%edx
  cmp    %edx,%r12d
  jbe    L148
  movzbl 0xc(%rbp),%edx
  add    %ebx,%edx
  cmp    %esi,%edx
  cmovg  %esi,%edx
  mov    %dl,0xc(%rax)
  lea    0xc(%rcx),%edx
  cmp    %edx,%r12d
  jbe    L148
  movzbl 0xd(%rbp),%edx
  add    %ebx,%edx
  cmp    %esi,%edx
  cmovg  %esi,%edx
  add    $0xd,%ecx
  mov    %dl,0xd(%rax)
  cmp    %ecx,%r12d
  jbe    L148
  movzbl 0xe(%rbp),%edx
  mov    $0xff,%ecx
  add    %ebx,%edx
  cmp    %ecx,%edx
  cmovg  %ecx,%edx
  mov    %dl,0xe(%rax)
  nopl   (%rax)
L148:
  xor    %eax,%eax
L289:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L63:
  call   <memcpy@plt>
  jmp    L148
  nop
L301:
  mov    %ebx,%ecx
  mov    %r12d,%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <SDL_imageFilterAddByteMMX@plt>
  test   $0x7,%r12b
  je     L148
  mov    %r12d,%edi
  and    $0xfffffff8,%edi
  mov    %edi,%eax
  add    %rax,%rbp
  add    %rax,%r13
  cmp    %edi,%r12d
  jbe    L148
  jmp    L293
  xchg   %ax,%ax
L66:
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L246:
  movzbl 0x0(%rbp,%rdx,1),%eax
  mov    $0xff,%ecx
  add    %ebx,%eax
  cmp    %ecx,%eax
  cmovg  %ecx,%eax
  mov    %al,0x0(%r13,%rdx,1)
  add    $0x1,%rdx
  lea    (%rdi,%rdx,1),%eax
  cmp    %eax,%r12d
  ja     L246
  jmp    L148
L308:
  mov    $0xffffffff,%eax
  jmp    L289
L230:
  or     $0xffffffff,%eax
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D8
type_guessed: byte[16]

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

assistant: ```c
int SDL_imageFilterAddByte(unsigned char *Src1, unsigned char *Dest, unsigned int length, unsigned char C) {
  unsigned int i, istart;
  int iC;
  unsigned char *cursrc1, *curdest;
  int result;
  if ((Src1 == NULL) || (Dest == NULL))
    return (-1);
  if (length == 0)
    return (0);
  if (C == 0) {
    memcpy(Src1, Dest, length);
    return (0);
  }
  if ((SDL_imageFilterMMXdetect()) && (length > 7)) {
    SDL_imageFilterAddByteMMX(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);
}
```