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

```asm
<uyvy2rgb>:
  endbr64
  add    %edx,%edx
  test   %edx,%edx
  jle    L19
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%r8
  sub    $0x1,%edx
  shr    $0x2,%edx
  mov    %edx,%edx
  lea    0x4(%rdi,%rdx,4),%rbp
L18:
  movzbl (%r8),%eax
  add    $0xffffff80,%eax
  movzbl 0x1(%r8),%edi
  movzbl 0x2(%r8),%r12d
  add    $0xffffff80,%r12d
  movzbl 0x3(%r8),%r10d
  mov    %r12d,%r14d
  shl    $0x4,%r14d
  lea    (%r12,%r12,1),%r13d
  lea    (%r12,%r12,4),%edx
  shl    $0x8,%edx
  mov    %r12d,%ecx
  shl    $0x7,%ecx
  add    %ecx,%edx
  add    %r14d,%edx
  lea    0x0(,%r12,8),%ecx
  add    %ecx,%edx
  add    %r13d,%edx
  sar    $0xb,%edx
  lea    (%rdx,%rdi,1),%ebx
  lea    (%rax,%rax,1),%r11d
  lea    (%r11,%rax,1),%r9d
  shl    $0x7,%r9d
  mov    %eax,%r15d
  shl    $0x4,%r15d
  add    %r15d,%r9d
  lea    (%r9,%rax,4),%r9d
  add    %r11d,%r9d
  sar    $0xb,%r9d
  add    %r12d,%ecx
  shl    $0x6,%ecx
  add    %r14d,%ecx
  add    %r13d,%ecx
  add    %r12d,%ecx
  sar    $0xb,%ecx
  mov    %edi,%r12d
  sub    %r9d,%r12d
  sub    %ecx,%r12d
  imul   $0x820,%eax,%eax
  sub    %r11d,%eax
  sar    $0xb,%eax
  add    %eax,%edi
  test   %ebx,%ebx
  mov    $0x0,%r11d
  cmovs  %r11d,%ebx
  test   %r12d,%r12d
  cmovns %r12d,%r11d
  test   %edi,%edi
  mov    $0x0,%r12d
  cmovs  %r12d,%edi
  mov    $0xff,%r12d
  cmp    %r12d,%ebx
  cmovg  %r12d,%ebx
  mov    %bl,(%rsi)
  mov    $0xff,%ebx
  cmp    %ebx,%r11d
  cmovg  %ebx,%r11d
  mov    %r11b,0x1(%rsi)
  mov    $0xff,%r11d
  cmp    %r11d,%edi
  cmovg  %r11d,%edi
  mov    %dil,0x2(%rsi)
  add    %r10d,%edx
  mov    %r10d,%edi
  sub    %r9d,%edi
  sub    %ecx,%edi
  add    %r10d,%eax
  test   %edx,%edx
  mov    $0x0,%ecx
  cmovs  %ecx,%edx
  test   %edi,%edi
  cmovns %edi,%ecx
  test   %eax,%eax
  mov    $0x0,%edi
  cmovs  %edi,%eax
  mov    $0xff,%edi
  cmp    %edi,%edx
  cmovg  %edi,%edx
  mov    %dl,0x3(%rsi)
  mov    $0xff,%edx
  cmp    %edx,%ecx
  cmovg  %edx,%ecx
  mov    %cl,0x4(%rsi)
  cmp    %edx,%eax
  cmovg  %edx,%eax
  mov    %al,0x5(%rsi)
  add    $0x4,%r8
  add    $0x6,%rsi
  cmp    %rbp,%r8
  jne    L18
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L19:
  ret
```

assistant: ```c
void uyvy2rgb(char *YUV, char *RGB, int NumPixels) {
  int i, j;
  register int y0, y1, u, v;
  register int r, g, b;
  for (i = 0, j = 0; i < (NumPixels << 1); i += 4, j += 6) {
    u = (unsigned char)YUV[i + 0] - 128;
    y0 = (unsigned char)YUV[i + 1];
    v = (unsigned char)YUV[i + 2] - 128;
    y1 = (unsigned char)YUV[i + 3];
    r = y0 + (((v << 10) + (v << 8) + (v << 7) + (v << 4) + (v << 3) + (v << 1)) >> 11);
    g = y0 - (((u << 8) + (u << 7) + (u << 4) + (u << 2) + (u << 1)) >> 11) - (((v << 9) + (v << 6) + (v << 4) + (v << 1) + v) >> 11);
    b = y0 + (((u << 11) + (u << 5) - (u << 1)) >> 11);
    r = r < 0 ? 0 : r;
    g = g < 0 ? 0 : g;
    b = b < 0 ? 0 : b;
    r = r > 255 ? 255 : r;
    g = g > 255 ? 255 : g;
    b = b > 255 ? 255 : b;
    RGB[j + 0] = r;
    RGB[j + 1] = g;
    RGB[j + 2] = b;
    r = y1 + (((v << 10) + (v << 8) + (v << 7) + (v << 4) + (v << 3) + (v << 1)) >> 11);
    g = y1 - (((u << 8) + (u << 7) + (u << 4) + (u << 2) + (u << 1)) >> 11) - (((v << 9) + (v << 6) + (v << 4) + (v << 1) + v) >> 11);
    b = y1 + (((u << 11) + (u << 5) - (u << 1)) >> 11);
    r = r < 0 ? 0 : r;
    g = g < 0 ? 0 : g;
    b = b < 0 ? 0 : b;
    r = r > 255 ? 255 : r;
    g = g > 255 ? 255 : g;
    b = b > 255 ? 255 : b;
    RGB[j + 3] = r;
    RGB[j + 4] = g;
    RGB[j + 5] = b;
  }
}
```