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

```asm
<rgb482uyvy>:
  endbr64
  lea    (%rdx,%rdx,2),%eax
  lea    -0x1(%rax,%rax,1),%r8d
  test   %r8d,%r8d
  jle    L14
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x1(%rdx,%rdx,1),%eax
  movslq %r8d,%rdx
  add    %rdx,%rdi
  cltq
  add    %rax,%rsi
  mov    %rdi,%rcx
  sub    %edi,%r8d
L18:
  movzbl -0x1(%rcx),%r10d
  movzbl -0x3(%rcx),%edx
  movzbl -0x5(%rcx),%eax
  imul   $0x132,%eax,%r9d
  imul   $0x259,%edx,%edi
  add    %edi,%r9d
  imul   $0x75,%r10d,%edi
  add    %edi,%r9d
  sar    $0xa,%r9d
  imul   $0xffffff54,%eax,%edi
  imul   $0xfffffeac,%edx,%r11d
  add    %r11d,%edi
  mov    %r10d,%r11d
  shl    $0x9,%r11d
  add    %r11d,%edi
  sar    $0xa,%edi
  sub    $0xffffff80,%edi
  shl    $0x9,%eax
  imul   $0xfffffe53,%edx,%edx
  add    %eax,%edx
  imul   $0xffffffad,%r10d,%r10d
  add    %r10d,%edx
  sar    $0xa,%edx
  sub    $0xffffff80,%edx
  test   %r9d,%r9d
  mov    $0x0,%eax
  cmovs  %eax,%r9d
  test   %edi,%edi
  cmovs  %eax,%edi
  test   %edx,%edx
  cmovs  %eax,%edx
  movzbl -0x7(%rcx),%ebx
  movzbl -0x9(%rcx),%ebp
  movzbl -0xb(%rcx),%eax
  imul   $0x132,%eax,%r11d
  imul   $0x259,%ebp,%r10d
  add    %r10d,%r11d
  imul   $0x75,%ebx,%r10d
  add    %r10d,%r11d
  sar    $0xa,%r11d
  imul   $0xffffff54,%eax,%r10d
  imul   $0xfffffeac,%ebp,%r12d
  add    %r12d,%r10d
  mov    %ebx,%r12d
  shl    $0x9,%r12d
  add    %r12d,%r10d
  sar    $0xa,%r10d
  sub    $0xffffff80,%r10d
  shl    $0x9,%eax
  imul   $0xfffffe53,%ebp,%ebp
  add    %ebp,%eax
  imul   $0xffffffad,%ebx,%ebx
  add    %ebx,%eax
  sar    $0xa,%eax
  sub    $0xffffff80,%eax
  test   %r11d,%r11d
  mov    $0x0,%ebx
  cmovs  %ebx,%r11d
  test   %r10d,%r10d
  cmovs  %ebx,%r10d
  test   %eax,%eax
  cmovs  %ebx,%eax
  mov    $0xff,%ebx
  cmp    %ebx,%r9d
  cmovg  %ebx,%r9d
  mov    %r9b,(%rsi)
  mov    $0xff,%r9d
  cmp    %r9d,%edx
  cmovg  %r9d,%edx
  cmp    %r9d,%eax
  cmovg  %r9d,%eax
  add    %eax,%edx
  sar    %edx
  mov    %dl,-0x1(%rsi)
  mov    $0xff,%eax
  cmp    %eax,%r11d
  cmovg  %eax,%r11d
  mov    %r11b,-0x2(%rsi)
  cmp    %eax,%edi
  cmovg  %eax,%edi
  cmp    %eax,%r10d
  cmovg  %eax,%r10d
  add    %r10d,%edi
  sar    %edi
  mov    %dil,-0x3(%rsi)
  sub    $0xc,%rcx
  sub    $0x4,%rsi
  lea    (%r8,%rcx,1),%eax
  test   %eax,%eax
  jg     L18
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L14:
  ret
```

assistant: ```c
void rgb482uyvy(unsigned char *src, unsigned char *dest, unsigned long long int NumPixels) {
  register int i = ((NumPixels + (NumPixels << 1)) << 1) - 1;
  register int j = (NumPixels << 1) - 1;
  register int y0, y1, u0, u1, v0, v1;
  register int r, g, b;
  while (i > 0) {
    i--;
    b = (unsigned char)src[i--];
    i--;
    g = (unsigned char)src[i--];
    i--;
    r = (unsigned char)src[i--];
    i--;
    y0 = (306 * r + 601 * g + 117 * b) >> 10;
    u0 = ((-172 * r - 340 * g + 512 * b) >> 10) + 128;
    v0 = ((512 * r - 429 * g - 83 * b) >> 10) + 128;
    y0 = y0 < 0 ? 0 : y0;
    u0 = u0 < 0 ? 0 : u0;
    v0 = v0 < 0 ? 0 : v0;
    y0 = y0 > 255 ? 255 : y0;
    u0 = u0 > 255 ? 255 : u0;
    v0 = v0 > 255 ? 255 : v0;
    b = (unsigned char)src[i--];
    i--;
    g = (unsigned char)src[i--];
    i--;
    r = (unsigned char)src[i--];
    y1 = (306 * r + 601 * g + 117 * b) >> 10;
    u1 = ((-172 * r - 340 * g + 512 * b) >> 10) + 128;
    v1 = ((512 * r - 429 * g - 83 * b) >> 10) + 128;
    y1 = y1 < 0 ? 0 : y1;
    u1 = u1 < 0 ? 0 : u1;
    v1 = v1 < 0 ? 0 : v1;
    y1 = y1 > 255 ? 255 : y1;
    u1 = u1 > 255 ? 255 : u1;
    v1 = v1 > 255 ? 255 : v1;
    dest[j--] = y0;
    dest[j--] = (v0 + v1) >> 1;
    dest[j--] = y1;
    dest[j--] = (u0 + u1) >> 1;
  }
}
```