user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<s_memcpy1rgb>:
  endbr64
  mov    %rsi,%r10
  mov    $0x8,%esi
  push   %r15
  mov    %esi,%r11d
  push   %r14
  push   %r13
  sub    %ecx,%r11d
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,%ebx
  mov    0x38(%rsp),%ebp
  sub    %r9d,%esi
  mov    0x40(%rsp),%r13d
  mov    0x48(%rsp),%r14d
  sub    %r8d,%ebx
  test   %edx,%edx
  je     L178
  mov    %edx,%r8d
  mov    %edx,%r12d
  lea    -0x1(%rdx),%r15d
  lea    (%r10,%r8,4),%rax
  lea    (%rdi,%r8,1),%rdx
  cmp    %rax,%rdi
  setae  %al
  cmp    %rdx,%r10
  setae  %dl
  or     %dl,%al
  je     L19
  cmp    $0xe,%r15d
  jbe    L19
  mov    %r12d,%ecx
  mov    %r10,%rax
  mov    %rdi,%rdx
  movdqa D6(%rip),%xmm8
  movdqa D4(%rip),%xmm9
  shr    $0x4,%ecx
  sub    $0x1,%ecx
  shl    $0x6,%rcx
  lea    (%rcx,%r10,1),%r9
  movslq %ebx,%rcx
  movq   %rcx,%xmm14
  movslq %r13d,%rcx
  movq   %rcx,%xmm15
  movslq %esi,%rcx
  movq   %rcx,%xmm13
  movslq %r14d,%rcx
  movq   %rcx,%xmm12
  movslq %r11d,%rcx
  movq   %rcx,%xmm11
  movslq %ebp,%rcx
  movq   %rcx,%xmm10
  nopl   0x0(%rax,%rax,1)
L97:
  movdqu 0x10(%rax),%xmm6
  movdqu (%rax),%xmm3
  mov    %rax,%rcx
  add    $0x10,%rdx
  movdqu 0x20(%rax),%xmm2
  movdqu 0x30(%rax),%xmm5
  add    $0x40,%rax
  movdqa %xmm6,%xmm0
  psrld  $0x10,%xmm3
  psrld  $0x10,%xmm0
  pand   %xmm8,%xmm3
  pand   %xmm8,%xmm0
  psrad  %xmm14,%xmm3
  psrad  %xmm14,%xmm0
  pslld  %xmm15,%xmm3
  pslld  %xmm15,%xmm0
  movdqa %xmm3,%xmm4
  punpcklwd %xmm0,%xmm3
  punpckhwd %xmm0,%xmm4
  movdqa %xmm3,%xmm0
  punpcklwd %xmm4,%xmm3
  punpckhwd %xmm4,%xmm0
  movdqa %xmm5,%xmm4
  punpcklwd %xmm0,%xmm3
  psrld  $0x10,%xmm4
  movdqa %xmm2,%xmm0
  psrld  $0x10,%xmm0
  pand   %xmm8,%xmm4
  pand   %xmm9,%xmm3
  pand   %xmm8,%xmm0
  psrad  %xmm14,%xmm4
  psrad  %xmm14,%xmm0
  pslld  %xmm15,%xmm4
  pslld  %xmm15,%xmm0
  movdqa %xmm0,%xmm7
  punpcklwd %xmm4,%xmm0
  punpckhwd %xmm4,%xmm7
  movdqa %xmm0,%xmm4
  punpckhwd %xmm7,%xmm4
  punpcklwd %xmm7,%xmm0
  punpcklwd %xmm4,%xmm0
  movdqa %xmm6,%xmm4
  psrld  $0x8,%xmm4
  psrld  $0x18,%xmm6
  pand   %xmm9,%xmm0
  packuswb %xmm0,%xmm3
  movdqu -0x40(%rax),%xmm0
  pand   %xmm8,%xmm4
  psrad  %xmm13,%xmm4
  psrad  %xmm11,%xmm6
  psrld  $0x8,%xmm0
  pslld  %xmm12,%xmm4
  pslld  %xmm10,%xmm6
  pand   %xmm8,%xmm0
  psrad  %xmm13,%xmm0
  pslld  %xmm12,%xmm0
  movdqa %xmm0,%xmm7
  punpcklwd %xmm4,%xmm0
  punpckhwd %xmm4,%xmm7
  movdqa %xmm0,%xmm4
  punpckhwd %xmm7,%xmm4
  punpcklwd %xmm7,%xmm0
  movdqa %xmm5,%xmm7
  psrld  $0x8,%xmm7
  psrld  $0x18,%xmm5
  punpcklwd %xmm4,%xmm0
  movdqa %xmm2,%xmm4
  pand   %xmm8,%xmm7
  pand   %xmm9,%xmm0
  psrld  $0x8,%xmm4
  psrad  %xmm13,%xmm7
  psrld  $0x18,%xmm2
  psrad  %xmm11,%xmm5
  pand   %xmm8,%xmm4
  psrad  %xmm13,%xmm4
  pslld  %xmm12,%xmm7
  psrad  %xmm11,%xmm2
  pslld  %xmm10,%xmm5
  pslld  %xmm12,%xmm4
  pslld  %xmm10,%xmm2
  movdqa %xmm4,%xmm1
  punpcklwd %xmm7,%xmm4
  punpckhwd %xmm7,%xmm1
  movdqa %xmm4,%xmm7
  punpckhwd %xmm1,%xmm7
  punpcklwd %xmm1,%xmm4
  movdqu -0x40(%rax),%xmm1
  punpcklwd %xmm7,%xmm4
  psrld  $0x18,%xmm1
  pand   %xmm9,%xmm4
  psrad  %xmm11,%xmm1
  packuswb %xmm4,%xmm0
  por    %xmm3,%xmm0
  pslld  %xmm10,%xmm1
  movdqa %xmm1,%xmm3
  punpcklwd %xmm6,%xmm1
  punpckhwd %xmm6,%xmm3
  movdqa %xmm1,%xmm4
  punpckhwd %xmm3,%xmm4
  punpcklwd %xmm3,%xmm1
  movdqa %xmm2,%xmm3
  punpcklwd %xmm5,%xmm2
  punpcklwd %xmm4,%xmm1
  punpckhwd %xmm5,%xmm3
  movdqa %xmm2,%xmm4
  punpcklwd %xmm3,%xmm2
  pand   %xmm9,%xmm1
  punpckhwd %xmm3,%xmm4
  punpcklwd %xmm4,%xmm2
  pand   %xmm9,%xmm2
  packuswb %xmm2,%xmm1
  por    %xmm1,%xmm0
  movups %xmm0,-0x10(%rdx)
  cmp    %r9,%rcx
  jne    L97
  mov    %r12d,%eax
  and    $0xfffffff0,%eax
  mov    %eax,%edx
  sub    %eax,%r15d
  add    %rdx,%rdi
  lea    (%r10,%rdx,4),%rdx
  cmp    %eax,%r12d
  je     L178
  mov    (%rdx),%r9d
  mov    %esi,%ecx
  mov    %r9d,%eax
  mov    %r9d,%r10d
  shr    $0x18,%r9d
  movzbl %ah,%eax
  shr    $0x10,%r10d
  sar    %cl,%eax
  mov    %r14d,%ecx
  movzbl %r10b,%r10d
  shl    %cl,%eax
  mov    %ebx,%ecx
  sar    %cl,%r10d
  mov    %r13d,%ecx
  shl    %cl,%r10d
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %ebp,%ecx
  or     %r10d,%eax
  shl    %cl,%r9d
  or     %r9d,%eax
  mov    %al,(%rdi)
  test   %r15d,%r15d
  je     L178
  mov    0x4(%rdx),%r9d
  mov    %ebx,%ecx
  mov    %r9d,%eax
  shr    $0x10,%eax
  movzbl %al,%eax
  sar    %cl,%eax
  mov    %r13d,%ecx
  shl    %cl,%eax
  mov    %r9d,%ecx
  shr    $0x18,%r9d
  movzbl %ch,%ecx
  mov    %ecx,%r10d
  mov    %esi,%ecx
  sar    %cl,%r10d
  mov    %r14d,%ecx
  shl    %cl,%r10d
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %ebp,%ecx
  or     %r10d,%eax
  shl    %cl,%r9d
  or     %r9d,%eax
  mov    %al,0x1(%rdi)
  cmp    $0x1,%r15d
  je     L178
  mov    0x8(%rdx),%r9d
  mov    %ebx,%ecx
  mov    %r9d,%eax
  shr    $0x10,%eax
  movzbl %al,%eax
  sar    %cl,%eax
  mov    %r13d,%ecx
  shl    %cl,%eax
  mov    %r9d,%ecx
  shr    $0x18,%r9d
  movzbl %ch,%ecx
  mov    %ecx,%r10d
  mov    %esi,%ecx
  sar    %cl,%r10d
  mov    %r14d,%ecx
  shl    %cl,%r10d
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %ebp,%ecx
  or     %r10d,%eax
  shl    %cl,%r9d
  or     %r9d,%eax
  mov    %al,0x2(%rdi)
  cmp    $0x2,%r15d
  je     L178
  mov    0xc(%rdx),%r9d
  mov    %ebx,%ecx
  mov    %r9d,%eax
  shr    $0x10,%eax
  movzbl %al,%eax
  sar    %cl,%eax
  mov    %r13d,%ecx
  shl    %cl,%eax
  mov    %r9d,%ecx
  shr    $0x18,%r9d
  movzbl %ch,%ecx
  mov    %ecx,%r10d
  mov    %esi,%ecx
  sar    %cl,%r10d
  mov    %r14d,%ecx
  shl    %cl,%r10d
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %ebp,%ecx
  or     %r10d,%eax
  shl    %cl,%r9d
  or     %r9d,%eax
  mov    %al,0x3(%rdi)
  cmp    $0x3,%r15d
  je     L178
  mov    0x10(%rdx),%r9d
  mov    %ebx,%ecx
  mov    %r9d,%eax
  shr    $0x10,%eax
  movzbl %al,%eax
  sar    %cl,%eax
  mov    %r13d,%ecx
  shl    %cl,%eax
  mov    %r9d,%ecx
  shr    $0x18,%r9d
  movzbl %ch,%ecx
  mov    %ecx,%r10d
  mov    %esi,%ecx
  sar    %cl,%r10d
  mov    %r14d,%ecx
  shl    %cl,%r10d
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %ebp,%ecx
  or     %r10d,%eax
  shl    %cl,%r9d
  or     %r9d,%eax
  mov    %al,0x4(%rdi)
  cmp    $0x4,%r15d
  je     L178
  mov    0x14(%rdx),%r9d
  mov    %ebx,%ecx
  mov    %r9d,%eax
  shr    $0x10,%eax
  movzbl %al,%eax
  sar    %cl,%eax
  mov    %r13d,%ecx
  shl    %cl,%eax
  mov    %r9d,%ecx
  shr    $0x18,%r9d
  movzbl %ch,%ecx
  mov    %ecx,%r10d
  mov    %esi,%ecx
  sar    %cl,%r10d
  mov    %r14d,%ecx
  shl    %cl,%r10d
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %ebp,%ecx
  or     %r10d,%eax
  shl    %cl,%r9d
  or     %r9d,%eax
  mov    %al,0x5(%rdi)
  cmp    $0x5,%r15d
  je     L178
  mov    0x18(%rdx),%r9d
  mov    %ebx,%ecx
  mov    %r9d,%eax
  shr    $0x10,%eax
  movzbl %al,%eax
  sar    %cl,%eax
  mov    %r13d,%ecx
  shl    %cl,%eax
  mov    %r9d,%ecx
  shr    $0x18,%r9d
  movzbl %ch,%ecx
  mov    %ecx,%r10d
  mov    %esi,%ecx
  sar    %cl,%r10d
  mov    %r14d,%ecx
  shl    %cl,%r10d
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %ebp,%ecx
  or     %r10d,%eax
  shl    %cl,%r9d
  or     %r9d,%eax
  mov    %al,0x6(%rdi)
  cmp    $0x6,%r15d
  je     L178
  mov    0x1c(%rdx),%r9d
  mov    %ebx,%ecx
  mov    %r9d,%eax
  shr    $0x10,%eax
  movzbl %al,%eax
  sar    %cl,%eax
  mov    %r13d,%ecx
  shl    %cl,%eax
  mov    %r9d,%ecx
  shr    $0x18,%r9d
  movzbl %ch,%ecx
  mov    %ecx,%r10d
  mov    %esi,%ecx
  sar    %cl,%r10d
  mov    %r14d,%ecx
  shl    %cl,%r10d
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %ebp,%ecx
  or     %r10d,%eax
  shl    %cl,%r9d
  or     %r9d,%eax
  mov    %al,0x7(%rdi)
  cmp    $0x7,%r15d
  je     L178
  mov    0x20(%rdx),%r9d
  mov    %ebx,%ecx
  mov    %r9d,%eax
  shr    $0x10,%eax
  movzbl %al,%eax
  sar    %cl,%eax
  mov    %r13d,%ecx
  shl    %cl,%eax
  mov    %r9d,%ecx
  shr    $0x18,%r9d
  movzbl %ch,%ecx
  mov    %ecx,%r10d
  mov    %esi,%ecx
  sar    %cl,%r10d
  mov    %r14d,%ecx
  shl    %cl,%r10d
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %ebp,%ecx
  or     %r10d,%eax
  shl    %cl,%r9d
  or     %r9d,%eax
  mov    %al,0x8(%rdi)
  cmp    $0x8,%r15d
  je     L178
  mov    0x24(%rdx),%r9d
  mov    %ebx,%ecx
  mov    %r9d,%eax
  shr    $0x10,%eax
  movzbl %al,%eax
  sar    %cl,%eax
  mov    %r13d,%ecx
  shl    %cl,%eax
  mov    %r9d,%ecx
  shr    $0x18,%r9d
  movzbl %ch,%ecx
  mov    %ecx,%r10d
  mov    %esi,%ecx
  sar    %cl,%r10d
  mov    %r14d,%ecx
  shl    %cl,%r10d
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %ebp,%ecx
  or     %r10d,%eax
  shl    %cl,%r9d
  or     %r9d,%eax
  mov    %al,0x9(%rdi)
  cmp    $0x9,%r15d
  je     L178
  mov    0x28(%rdx),%r9d
  mov    %ebx,%ecx
  mov    %r9d,%eax
  shr    $0x10,%eax
  movzbl %al,%eax
  sar    %cl,%eax
  mov    %r13d,%ecx
  shl    %cl,%eax
  mov    %r9d,%ecx
  shr    $0x18,%r9d
  movzbl %ch,%ecx
  mov    %ecx,%r10d
  mov    %esi,%ecx
  sar    %cl,%r10d
  mov    %r14d,%ecx
  shl    %cl,%r10d
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %ebp,%ecx
  or     %r10d,%eax
  shl    %cl,%r9d
  or     %r9d,%eax
  mov    %al,0xa(%rdi)
  cmp    $0xa,%r15d
  je     L178
  mov    0x2c(%rdx),%r9d
  mov    %ebx,%ecx
  mov    %r9d,%eax
  shr    $0x10,%eax
  movzbl %al,%eax
  sar    %cl,%eax
  mov    %r13d,%ecx
  shl    %cl,%eax
  mov    %r9d,%ecx
  shr    $0x18,%r9d
  movzbl %ch,%ecx
  mov    %ecx,%r10d
  mov    %esi,%ecx
  sar    %cl,%r10d
  mov    %r14d,%ecx
  shl    %cl,%r10d
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %ebp,%ecx
  or     %r10d,%eax
  shl    %cl,%r9d
  or     %r9d,%eax
  mov    %al,0xb(%rdi)
  cmp    $0xb,%r15d
  je     L178
  mov    0x30(%rdx),%r9d
  mov    %ebx,%ecx
  mov    %r9d,%eax
  shr    $0x10,%eax
  movzbl %al,%eax
  sar    %cl,%eax
  mov    %r13d,%ecx
  shl    %cl,%eax
  mov    %r9d,%ecx
  shr    $0x18,%r9d
  movzbl %ch,%ecx
  mov    %ecx,%r10d
  mov    %esi,%ecx
  sar    %cl,%r10d
  mov    %r14d,%ecx
  shl    %cl,%r10d
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %ebp,%ecx
  or     %r10d,%eax
  shl    %cl,%r9d
  or     %r9d,%eax
  mov    %al,0xc(%rdi)
  cmp    $0xc,%r15d
  je     L178
  mov    0x34(%rdx),%r9d
  mov    %ebx,%ecx
  mov    %r9d,%eax
  shr    $0x10,%eax
  movzbl %al,%eax
  sar    %cl,%eax
  mov    %r13d,%ecx
  shl    %cl,%eax
  mov    %r9d,%ecx
  shr    $0x18,%r9d
  movzbl %ch,%ecx
  mov    %ecx,%r10d
  mov    %esi,%ecx
  sar    %cl,%r10d
  mov    %r14d,%ecx
  shl    %cl,%r10d
  mov    %r11d,%ecx
  sar    %cl,%r9d
  mov    %ebp,%ecx
  or     %r10d,%eax
  shl    %cl,%r9d
  or     %r9d,%eax
  mov    %al,0xd(%rdi)
  cmp    $0xd,%r15d
  je     L178
  mov    0x38(%rdx),%edx
  mov    %ebx,%ecx
  mov    %edx,%eax
  movzbl %dh,%ebx
  shr    $0x18,%edx
  shr    $0x10,%eax
  mov    %ebx,%r8d
  movzbl %al,%eax
  sar    %cl,%eax
  mov    %r13d,%ecx
  shl    %cl,%eax
  mov    %esi,%ecx
  sar    %cl,%r8d
  mov    %r14d,%ecx
  mov    %r8d,%esi
  shl    %cl,%esi
  mov    %r11d,%ecx
  sar    %cl,%edx
  mov    %ebp,%ecx
  or     %esi,%eax
  shl    %cl,%edx
  or     %edx,%eax
  mov    %al,0xe(%rdi)
L178:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L19:
  xor    %r9d,%r9d
  nopl   0x0(%rax,%rax,1)
L68:
  mov    (%r10,%r9,4),%edx
  mov    %esi,%ecx
  movzbl %dh,%eax
  mov    %edx,%r12d
  shr    $0x18,%edx
  sar    %cl,%eax
  shr    $0x10,%r12d
  mov    %r14d,%ecx
  shl    %cl,%eax
  movzbl %r12b,%r12d
  mov    %ebx,%ecx
  sar    %cl,%r12d
  mov    %r13d,%ecx
  shl    %cl,%r12d
  mov    %r11d,%ecx
  sar    %cl,%edx
  mov    %ebp,%ecx
  or     %r12d,%eax
  shl    %cl,%edx
  or     %edx,%eax
  mov    %al,(%rdi,%r9,1)
  add    $0x1,%r9
  cmp    %r8,%r9
  jne    L68
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: read_data
arguments: tag: D6
data_type: byte[16]
name: read_data
arguments: tag: D4
data_type: byte[16]

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

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

assistant: ```c
void s_memcpy1rgb(void *dest, unsigned int *rgb, int n, int rl, int gl, int bl, int ro, int go, int bo) {
  unsigned char dr;
  unsigned char dg;
  unsigned char db;
  unsigned char *d = (unsigned char *)dest;
  unsigned int *s = (unsigned int *)rgb;
  rl = 8 - rl;
  gl = 8 - gl;
  bl = 8 - bl;
  while (n--) {
    dr = *s >> 0x18;
    dg = *s >> 0x10;
    db = *s >> 0x08;
    *d = ((dr >> rl) << ro) | ((dg >> gl) << go) | ((db >> bl) << bo);
    d++;
    s++;
  };
}
```