user: 请将以下的汇编代码转换成C语言代码:

```asm
<v4lconvert_spca508_to_yuv420>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,-0x48(%rsp)
  mov    %ecx,-0x10(%rsp)
  mov    %r8d,-0x40(%rsp)
  test   %ecx,%ecx
  jle    L263
  imul   %edx,%ecx
  mov    %edx,%r9d
  mov    %rdi,%rax
  movdqa D32(%rip),%xmm0
  lea    (%r9,%r9,1),%edi
  movdqa D25(%rip),%xmm5
  movdqa D23(%rip),%xmm4
  mov    %edi,-0xc(%rsp)
  movslq %edi,%rdi
  movslq %ecx,%rbx
  mov    %rdi,-0x18(%rsp)
  mov    %rsi,%rdi
  lea    (%rbx,%rbx,4),%ecx
  mov    %rbx,-0x20(%rsp)
  test   %ecx,%ecx
  lea    0x3(%rcx),%edx
  cmovns %ecx,%edx
  mov    %rsi,%rcx
  movslq %r9d,%rsi
  xor    %ebp,%ebp
  add    %rcx,%rsi
  lea    -0x1(%r9),%ecx
  xor    %r15d,%r15d
  sar    $0x2,%edx
  mov    %ecx,-0x3c(%rsp)
  movslq %edx,%rbx
  mov    %ecx,%edx
  mov    %rbx,-0x28(%rsp)
  mov    %r9d,%ebx
  shr    $0x3,%edx
  shr    $0x1f,%ebx
  lea    0x1(%rdx),%ecx
  add    %r9d,%ebx
  mov    %ecx,%r10d
  mov    %ecx,-0x30(%rsp)
  and    $0xfffffffe,%ecx
  sar    %ebx
  mov    %ecx,%r14d
  mov    %ecx,-0x2c(%rsp)
  shr    %r10d
  lea    -0x1(%rbx),%edx
  shl    $0x3,%r14
  shr    $0x3,%edx
  lea    0x1(%rdx),%ecx
  mov    %ecx,%r8d
  mov    %ecx,-0x38(%rsp)
  and    $0xfffffffe,%ecx
  mov    %ecx,-0x34(%rsp)
  mov    %ecx,%r13d
  shr    %r8d
  shl    $0x3,%r13
  nopl   0x0(%rax,%rax,1)
L62:
  test   %r9d,%r9d
  jle    L115
  cmpl   $0x1f,-0x3c(%rsp)
  seta   %cl
  cmp    $0x7ffffff8,%r9d
  setle  %dl
  test   %dl,%cl
  je     L45
  lea    0x8(%rax),%rdx
  cmp    %rdi,%rdx
  je     L45
  movq   %rdx,%xmm6
  movq   %rax,%xmm3
  xor    %edx,%edx
  xor    %ecx,%ecx
  punpcklqdq %xmm6,%xmm3
  nopw   0x0(%rax,%rax,1)
L129:
  movdqa %xmm3,%xmm1
  add    $0x1,%ecx
  paddq  %xmm0,%xmm3
  movdqa %xmm1,%xmm2
  movdqu (%rax,%rdx,1),%xmm1
  paddq  %xmm5,%xmm2
  pxor   %xmm4,%xmm1
  movups %xmm1,(%rdi,%rdx,1)
  add    $0x10,%rdx
  cmp    %r10d,%ecx
  jb     L129
  movhlps %xmm2,%xmm7
  mov    -0x2c(%rsp),%r12d
  add    %r14,%rax
  lea    (%rdi,%r14,1),%rcx
  movq   %xmm7,%r11
  cmp    %r12d,-0x30(%rsp)
  je     L341
  movabs $0x8080808080808080,%rdx
  xor    (%rax),%rdx
  lea    0x8(%rax),%r11
  mov    %rdx,(%rcx)
L341:
  test   %ebp,%ebp
  lea    0x3(%rbp),%edx
  mov    -0x40(%rsp),%r12d
  cmovns %ebp,%edx
  sar    $0x2,%edx
  movslq %edx,%rcx
  mov    %rcx,-0x50(%rsp)
  test   %r12d,%r12d
  je     L116
  mov    -0x28(%rsp),%rax
  add    %rax,%rcx
  mov    %r11,%rax
  add    -0x48(%rsp),%rcx
  cmp    $0x1,%r9d
  jle    L318
L155:
  lea    -0x21(%rbx),%eax
  cmp    $0x7fffffd7,%eax
  ja     L156
  lea    0x8(%r11),%rax
  cmp    %rax,%rcx
  je     L156
  movq   %rax,%xmm6
  movq   %r11,%xmm3
  mov    -0x50(%rsp),%rdx
  xor    %eax,%eax
  punpcklqdq %xmm6,%xmm3
  xor    %r12d,%r12d
  xchg   %ax,%ax
L313:
  movdqa %xmm3,%xmm1
  add    $0x1,%r12d
  paddq  %xmm0,%xmm3
  movdqa %xmm1,%xmm2
  movdqu (%r11,%rax,1),%xmm1
  paddq  %xmm5,%xmm2
  pxor   %xmm4,%xmm1
  movups %xmm1,(%rcx,%rax,1)
  add    $0x10,%rax
  cmp    %r12d,%r8d
  ja     L313
  movhlps %xmm2,%xmm7
  mov    %rdx,-0x50(%rsp)
  add    %r13,%r11
  mov    -0x34(%rsp),%edx
  movq   %xmm7,%rax
  add    %r13,%rcx
  cmp    %edx,-0x38(%rsp)
  je     L210
  movabs $0x8080808080808080,%r12
  xor    (%r11),%r12
  lea    0x8(%r11),%rax
  mov    %r12,(%rcx)
L210:
  mov    -0x40(%rsp),%edx
  test   %edx,%edx
  je     L235
L318:
  mov    -0x50(%rsp),%rdx
  add    -0x20(%rsp),%rdx
  add    -0x48(%rsp),%rdx
  cmp    $0x1,%r9d
  jle    L214
L77:
  lea    -0x21(%rbx),%ecx
  cmp    $0x7fffffd7,%ecx
  ja     L108
  lea    0x8(%rax),%rcx
  cmp    %rcx,%rdx
  je     L108
  movq   %rcx,%xmm6
  movq   %rax,%xmm3
  xor    %ecx,%ecx
  xor    %r11d,%r11d
  punpcklqdq %xmm6,%xmm3
  movdqa D25(%rip),%xmm7
  movdqa D23(%rip),%xmm6
L323:
  movdqa %xmm3,%xmm1
  add    $0x1,%r11d
  paddq  %xmm0,%xmm3
  movdqa %xmm1,%xmm2
  movdqu (%rax,%rcx,1),%xmm1
  paddq  %xmm7,%xmm2
  pxor   %xmm6,%xmm1
  movups %xmm1,(%rdx,%rcx,1)
  add    $0x10,%rcx
  cmp    %r8d,%r11d
  jb     L323
  movhlps %xmm2,%xmm7
  mov    -0x34(%rsp),%r12d
  add    %r13,%rax
  add    %r13,%rdx
  movq   %xmm7,%rcx
  cmp    %r12d,-0x38(%rsp)
  je     L307
  movabs $0x8080808080808080,%r11
  xor    (%rax),%r11
  lea    0x8(%rax),%rcx
  mov    %r11,(%rdx)
L307:
  cmp    $0x7ffffff8,%r9d
  setle  %dl
  cmpl   $0x1f,-0x3c(%rsp)
  seta   %al
  test   %al,%dl
  je     L301
  lea    0x8(%rcx),%rax
  cmp    %rsi,%rax
  je     L301
  movq   %rax,%xmm6
  movq   %rcx,%xmm3
  xor    %eax,%eax
  xor    %edx,%edx
  punpcklqdq %xmm6,%xmm3
  nopl   0x0(%rax)
L197:
  movdqa %xmm3,%xmm1
  add    $0x1,%edx
  paddq  %xmm0,%xmm3
  movdqa %xmm1,%xmm2
  movdqu (%rcx,%rax,1),%xmm1
  paddq  %xmm5,%xmm2
  pxor   %xmm4,%xmm1
  movups %xmm1,(%rsi,%rax,1)
  add    $0x10,%rax
  cmp    %r10d,%edx
  jb     L197
  movhlps %xmm2,%xmm7
  mov    -0x2c(%rsp),%r12d
  add    %r14,%rcx
  lea    (%rsi,%r14,1),%r11
  movq   %xmm7,%rax
  cmp    %r12d,-0x30(%rsp)
  je     L310
  movabs $0x8080808080808080,%rdx
  xor    (%rcx),%rdx
  lea    0x8(%rcx),%rax
  mov    %rdx,(%r11)
L310:
  mov    -0x18(%rsp),%rcx
  add    $0x2,%r15d
  add    -0xc(%rsp),%ebp
  add    %rcx,%rdi
  add    %rcx,%rsi
  cmp    %r15d,-0x10(%rsp)
  jg     L62
L263:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L116:
  mov    -0x20(%rsp),%rax
  add    %rax,%rcx
  add    -0x48(%rsp),%rcx
  cmp    $0x1,%r9d
  jg     L155
  mov    %r11,%rax
  nopw   0x0(%rax,%rax,1)
L235:
  mov    -0x50(%rsp),%rdx
  add    -0x28(%rsp),%rdx
  add    -0x48(%rsp),%rdx
  cmp    $0x1,%r9d
  jg     L77
L214:
  jne    L310
  mov    %rax,%rcx
  jmp    L307
  nopl   0x0(%rax,%rax,1)
L301:
  movabs $0x8080808080808080,%r11
  mov    %rcx,%rax
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L24:
  mov    (%rax),%rcx
  add    $0x8,%rax
  xor    %r11,%rcx
  mov    %rcx,(%rsi,%rdx,1)
  add    $0x8,%rdx
  cmp    %edx,%r9d
  jg     L24
  jmp    L310
  nopl   0x0(%rax)
L156:
  mov    -0x50(%rsp),%rdx
  mov    %r11,%rax
  xor    %r11d,%r11d
  nopl   0x0(%rax,%rax,1)
L139:
  movabs $0x8080808080808080,%r12
  xor    (%rax),%r12
  add    $0x8,%rax
  mov    %r12,(%rcx,%r11,1)
  add    $0x8,%r11
  cmp    %r11d,%ebx
  jg     L139
  mov    %rdx,-0x50(%rsp)
  jmp    L210
  nopl   0x0(%rax,%rax,1)
L45:
  movabs $0x8080808080808080,%rcx
  mov    %rax,%r11
  xor    %eax,%eax
  nop
L50:
  mov    (%r11),%rdx
  add    $0x8,%r11
  xor    %rcx,%rdx
  mov    %rdx,(%rdi,%rax,1)
  add    $0x8,%rax
  cmp    %eax,%r9d
  jg     L50
  jmp    L341
  nopl   0x0(%rax)
L108:
  movabs $0x8080808080808080,%r12
  mov    %rax,%rcx
  xor    %eax,%eax
  nop
L122:
  mov    (%rcx),%r11
  add    $0x8,%rcx
  xor    %r12,%r11
  mov    %r11,(%rdx,%rax,1)
  add    $0x8,%rax
  cmp    %eax,%ebx
  jg     L122
  jmp    L307
  nopl   0x0(%rax,%rax,1)
L115:
  mov    %rax,%r11
  jmp    L341
```

tool_calls: name: retrieve_data
arguments: label: D32
type_guessed: byte[16]
name: retrieve_data
arguments: label: D25
type_guessed: byte[16]
name: retrieve_data
arguments: label: D23
type_guessed: byte[16]

tool: {"D32": [0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D25": [0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: {"D23": [0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80]}

assistant: ```c
void v4lconvert_spca508_to_yuv420(const unsigned char *src, unsigned char *dst, int width, int height, int yvu) {
  int i, j;
  unsigned long *lsrc = (unsigned long *)src;
  for (i = 0; i < height; i += 2) {
    unsigned long *ldst = (unsigned long *)(dst + i * width);
    for (j = 0; j < width; j += sizeof(long)) {
      *ldst = *lsrc++;
      *ldst++ ^= 0x8080808080808080ULL;
    }
    if (yvu)
      ldst = (unsigned long *)(dst + (width * height * 5) / 4 + i * width / 4);
    else
      ldst = (unsigned long *)(dst + width * height + i * width / 4);
    for (j = 0; j < width / 2; j += sizeof(long)) {
      *ldst = *lsrc++;
      *ldst++ ^= 0x8080808080808080ULL;
    }
    if (yvu)
      ldst = (unsigned long *)(dst + width * height + i * width / 4);
    else
      ldst = (unsigned long *)(dst + (width * height * 5) / 4 + i * width / 4);
    for (j = 0; j < width / 2; j += sizeof(long)) {
      *ldst = *lsrc++;
      *ldst++ ^= 0x8080808080808080ULL;
    }
    ldst = (unsigned long *)(dst + i * width + width);
    for (j = 0; j < width; j += sizeof(long)) {
      *ldst = *lsrc++;
      *ldst++ ^= 0x8080808080808080ULL;
    }
  }
}
```