user: Translate the below assembly code into C programming language:

```asm
<__imlib_AddCopySpanToRGB>:
  endbr64
  test   %edx,%edx
  je     L7
  push   %r13
  mov    %edi,%eax
  mov    %edi,%r11d
  mov    %rsi,%rcx
  push   %r12
  shr    $0x10,%r11d
  mov    %eax,%r12d
  mov    %eax,%r9d
  push   %rbp
  mov    %r11d,%esi
  movzbl %r11b,%edi
  movzbl %al,%r10d
  push   %rbx
  lea    -0x1(%rdx),%ebx
  movzbl %ah,%edx
  movzbl %r11b,%r13d
  mov    %edx,%r8d
  shr    $0x8,%r12w
  movzbl %al,%ebp
  sub    $0x260,%rsp
  cmp    $0xf,%ebx
  jbe    L32
  movd   %r11d,%xmm7
  movd   %eax,%xmm6
  mov    %ebx,%r11d
  mov    %rcx,%rax
  movd   %edx,%xmm11
  shr    $0x4,%r11d
  movd   %ebp,%xmm8
  movd   %r13d,%xmm10
  punpcklbw %xmm7,%xmm7
  movd   %r12d,%xmm9
  punpcklbw %xmm6,%xmm6
  sub    $0x1,%r11d
  punpcklbw %xmm11,%xmm11
  punpcklwd %xmm10,%xmm10
  punpcklwd %xmm7,%xmm7
  shl    $0x6,%r11
  punpcklwd %xmm9,%xmm9
  punpcklwd %xmm11,%xmm11
  punpcklwd %xmm6,%xmm6
  movdqa D1(%rip),%xmm3
  punpcklwd %xmm8,%xmm8
  pshufd $0x0,%xmm10,%xmm10
  pxor   %xmm5,%xmm5
  pshufd $0x0,%xmm7,%xmm7
  pshufd $0x0,%xmm6,%xmm6
  lea    0x40(%rcx,%r11,1),%rbp
  pshufd $0x0,%xmm9,%xmm9
  pshufd $0x0,%xmm11,%xmm11
  pshufd $0x0,%xmm8,%xmm8
  nop
L39:
  movdqu (%rax),%xmm1
  movdqu 0x10(%rax),%xmm0
  movdqa %xmm3,%xmm12
  add    $0x40,%rax
  movdqu -0x10(%rax),%xmm2
  movdqu -0x10(%rax),%xmm4
  pand   %xmm3,%xmm0
  pand   %xmm3,%xmm1
  packuswb %xmm0,%xmm1
  movdqu -0x20(%rax),%xmm0
  pand   %xmm3,%xmm2
  pand   %xmm1,%xmm12
  psrlw  $0x8,%xmm1
  pand   %xmm3,%xmm0
  psrlw  $0x8,%xmm4
  packuswb %xmm2,%xmm0
  movdqa %xmm3,%xmm2
  pand   %xmm0,%xmm2
  psrlw  $0x8,%xmm0
  packuswb %xmm2,%xmm12
  packuswb %xmm0,%xmm1
  movdqu -0x40(%rax),%xmm2
  movdqu -0x30(%rax),%xmm0
  psrlw  $0x8,%xmm2
  psrlw  $0x8,%xmm0
  packuswb %xmm0,%xmm2
  movdqu -0x20(%rax),%xmm0
  pand   %xmm3,%xmm2
  psrlw  $0x8,%xmm0
  packuswb %xmm4,%xmm0
  movdqa %xmm1,%xmm4
  pand   %xmm3,%xmm0
  punpcklbw %xmm5,%xmm4
  packuswb %xmm0,%xmm2
  movdqa %xmm1,%xmm0
  paddw  %xmm10,%xmm4
  punpckhbw %xmm5,%xmm0
  psrlw  $0x8,%xmm4
  paddb  %xmm7,%xmm1
  paddw  %xmm10,%xmm0
  pand   %xmm3,%xmm4
  psrlw  $0x8,%xmm0
  pand   %xmm3,%xmm0
  packuswb %xmm0,%xmm4
  movdqa %xmm5,%xmm0
  psubb  %xmm4,%xmm0
  movdqa %xmm2,%xmm4
  por    %xmm1,%xmm0
  movdqa %xmm2,%xmm1
  punpcklbw %xmm5,%xmm4
  punpckhbw %xmm5,%xmm1
  paddw  %xmm9,%xmm4
  paddb  %xmm11,%xmm2
  paddw  %xmm9,%xmm1
  psrlw  $0x8,%xmm4
  psrlw  $0x8,%xmm1
  pand   %xmm3,%xmm4
  pand   %xmm3,%xmm1
  packuswb %xmm1,%xmm4
  movdqa %xmm5,%xmm1
  psubb  %xmm4,%xmm1
  movdqa %xmm12,%xmm4
  por    %xmm2,%xmm1
  movdqa %xmm12,%xmm2
  punpcklbw %xmm5,%xmm4
  punpckhbw %xmm5,%xmm2
  paddw  %xmm8,%xmm4
  paddb  %xmm6,%xmm12
  paddw  %xmm8,%xmm2
  psrlw  $0x8,%xmm4
  psrlw  $0x8,%xmm2
  pand   %xmm3,%xmm4
  pand   %xmm3,%xmm2
  packuswb %xmm2,%xmm4
  movdqa %xmm5,%xmm2
  psubb  %xmm4,%xmm2
  por    %xmm12,%xmm2
  movd   %xmm2,%r11d
  mov    %r11b,-0x40(%rax)
  movaps %xmm2,0x248(%rsp)
  movzbl 0x249(%rsp),%r11d
  mov    %r11b,-0x3c(%rax)
  movaps %xmm2,0x238(%rsp)
  movzbl 0x23a(%rsp),%r11d
  mov    %r11b,-0x38(%rax)
  movaps %xmm2,0x228(%rsp)
  movzbl 0x22b(%rsp),%r11d
  mov    %r11b,-0x34(%rax)
  movaps %xmm2,0x218(%rsp)
  movzbl 0x21c(%rsp),%r11d
  mov    %r11b,-0x30(%rax)
  movaps %xmm2,0x208(%rsp)
  movzbl 0x20d(%rsp),%r11d
  mov    %r11b,-0x2c(%rax)
  movaps %xmm2,0x1f8(%rsp)
  movzbl 0x1fe(%rsp),%r11d
  mov    %r11b,-0x28(%rax)
  movaps %xmm2,0x1e8(%rsp)
  movzbl 0x1ef(%rsp),%r11d
  mov    %r11b,-0x24(%rax)
  movaps %xmm2,0x1d8(%rsp)
  movzbl 0x1e0(%rsp),%r11d
  mov    %r11b,-0x20(%rax)
  movaps %xmm2,0x1c8(%rsp)
  movzbl 0x1d1(%rsp),%r11d
  mov    %r11b,-0x1c(%rax)
  movaps %xmm2,0x1b8(%rsp)
  movzbl 0x1c2(%rsp),%r11d
  mov    %r11b,-0x18(%rax)
  movaps %xmm2,0x1a8(%rsp)
  movzbl 0x1b3(%rsp),%r11d
  mov    %r11b,-0x14(%rax)
  movaps %xmm2,0x198(%rsp)
  movzbl 0x1a4(%rsp),%r11d
  mov    %r11b,-0x10(%rax)
  movaps %xmm2,0x188(%rsp)
  movzbl 0x195(%rsp),%r11d
  mov    %r11b,-0xc(%rax)
  movaps %xmm2,0x178(%rsp)
  movzbl 0x186(%rsp),%r11d
  mov    %r11b,-0x8(%rax)
  movaps %xmm2,0x168(%rsp)
  movzbl 0x177(%rsp),%r11d
  mov    %r11b,-0x4(%rax)
  movd   %xmm1,%r11d
  mov    %r11b,-0x3f(%rax)
  movaps %xmm1,0x158(%rsp)
  movzbl 0x159(%rsp),%r11d
  mov    %r11b,-0x3b(%rax)
  movaps %xmm1,0x148(%rsp)
  movzbl 0x14a(%rsp),%r11d
  mov    %r11b,-0x37(%rax)
  movaps %xmm1,0x138(%rsp)
  movzbl 0x13b(%rsp),%r11d
  mov    %r11b,-0x33(%rax)
  movaps %xmm1,0x128(%rsp)
  movzbl 0x12c(%rsp),%r11d
  mov    %r11b,-0x2f(%rax)
  movaps %xmm1,0x118(%rsp)
  movzbl 0x11d(%rsp),%r11d
  mov    %r11b,-0x2b(%rax)
  movaps %xmm1,0x108(%rsp)
  movzbl 0x10e(%rsp),%r11d
  mov    %r11b,-0x27(%rax)
  movaps %xmm1,0xf8(%rsp)
  movzbl 0xff(%rsp),%r11d
  mov    %r11b,-0x23(%rax)
  movaps %xmm1,0xe8(%rsp)
  movzbl 0xf0(%rsp),%r11d
  mov    %r11b,-0x1f(%rax)
  movaps %xmm1,0xd8(%rsp)
  movzbl 0xe1(%rsp),%r11d
  mov    %r11b,-0x1b(%rax)
  movaps %xmm1,0xc8(%rsp)
  movzbl 0xd2(%rsp),%r11d
  mov    %r11b,-0x17(%rax)
  movaps %xmm1,0xb8(%rsp)
  movzbl 0xc3(%rsp),%r11d
  mov    %r11b,-0x13(%rax)
  movaps %xmm1,0xa8(%rsp)
  movzbl 0xb4(%rsp),%r11d
  mov    %r11b,-0xf(%rax)
  movaps %xmm1,0x98(%rsp)
  movzbl 0xa5(%rsp),%r11d
  mov    %r11b,-0xb(%rax)
  movaps %xmm1,0x88(%rsp)
  movzbl 0x96(%rsp),%r11d
  mov    %r11b,-0x7(%rax)
  movaps %xmm1,0x78(%rsp)
  movzbl 0x87(%rsp),%r11d
  mov    %r11b,-0x3(%rax)
  movd   %xmm0,%r11d
  mov    %r11b,-0x3e(%rax)
  movaps %xmm0,0x68(%rsp)
  movzbl 0x69(%rsp),%r11d
  mov    %r11b,-0x3a(%rax)
  movaps %xmm0,0x58(%rsp)
  movzbl 0x5a(%rsp),%r11d
  mov    %r11b,-0x36(%rax)
  movaps %xmm0,0x48(%rsp)
  movzbl 0x4b(%rsp),%r11d
  mov    %r11b,-0x32(%rax)
  movaps %xmm0,0x38(%rsp)
  movzbl 0x3c(%rsp),%r11d
  mov    %r11b,-0x2e(%rax)
  movaps %xmm0,0x28(%rsp)
  movzbl 0x2d(%rsp),%r11d
  mov    %r11b,-0x2a(%rax)
  movaps %xmm0,0x18(%rsp)
  movzbl 0x1e(%rsp),%r11d
  mov    %r11b,-0x26(%rax)
  movaps %xmm0,0x8(%rsp)
  movzbl 0xf(%rsp),%r11d
  mov    %r11b,-0x22(%rax)
  movaps %xmm0,-0x8(%rsp)
  movzbl (%rsp),%r11d
  mov    %r11b,-0x1e(%rax)
  movaps %xmm0,-0x18(%rsp)
  movzbl -0xf(%rsp),%r11d
  mov    %r11b,-0x1a(%rax)
  movaps %xmm0,-0x28(%rsp)
  movzbl -0x1e(%rsp),%r11d
  mov    %r11b,-0x16(%rax)
  movaps %xmm0,-0x38(%rsp)
  movzbl -0x2d(%rsp),%r11d
  mov    %r11b,-0x12(%rax)
  movaps %xmm0,-0x48(%rsp)
  movzbl -0x3c(%rsp),%r11d
  mov    %r11b,-0xe(%rax)
  movaps %xmm0,-0x58(%rsp)
  movzbl -0x4b(%rsp),%r11d
  mov    %r11b,-0xa(%rax)
  movaps %xmm0,-0x68(%rsp)
  movzbl -0x5a(%rsp),%r11d
  mov    %r11b,-0x6(%rax)
  movaps %xmm0,-0x78(%rsp)
  movzbl -0x69(%rsp),%r11d
  mov    %r11b,-0x2(%rax)
  cmp    %rax,%rbp
  jne    L39
  mov    %ebx,%eax
  and    $0xfffffff0,%eax
  mov    %eax,%r11d
  sub    %eax,%ebx
  lea    (%rcx,%r11,4),%rcx
L32:
  lea    0x4(%rcx,%rbx,4),%r11
  nop
L25:
  movzbl 0x2(%rcx),%eax
  add    $0x4,%rcx
  mov    %eax,%ebx
  add    %edi,%eax
  shr    $0x8,%eax
  add    %esi,%ebx
  neg    %eax
  or     %ebx,%eax
  mov    %al,-0x2(%rcx)
  movzbl -0x3(%rcx),%eax
  mov    %eax,%ebx
  add    %r8d,%eax
  shr    $0x8,%eax
  add    %edx,%ebx
  neg    %eax
  or     %ebx,%eax
  mov    %al,-0x3(%rcx)
  movzbl -0x4(%rcx),%eax
  mov    %eax,%ebx
  add    %r10d,%eax
  shr    $0x8,%eax
  add    %r9d,%ebx
  neg    %eax
  or     %ebx,%eax
  mov    %al,-0x4(%rcx)
  cmp    %rcx,%r11
  jne    L25
  add    $0x260,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  cs nopw 0x0(%rax,%rax,1)
L7:
  ret
```

tool_calls: name: read_data
arguments: tag: D1
data_type: byte[16]

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

assistant: ```c
void __imlib_AddCopySpanToRGB(unsigned int color, unsigned int *dst, int len) {
  while (len--) {
    unsigned int tmp;
    do {
      tmp = (((unsigned char *)(dst))[2]) + (((unsigned char *)(&color))[2]);
      ((unsigned char *)(dst))[2] = (tmp | (-(tmp >> 8)));
      ;
      tmp = (((unsigned char *)(dst))[1]) + (((unsigned char *)(&color))[1]);
      ((unsigned char *)(dst))[1] = (tmp | (-(tmp >> 8)));
      ;
      tmp = (((unsigned char *)(dst))[0]) + (((unsigned char *)(&color))[0]);
      ((unsigned char *)(dst))[0] = (tmp | (-(tmp >> 8)));
      ;
    } while (0);
    dst++;
  }
}
```