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

```asm
<VIM_HAPI_RGB565toYUV422>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %ecx,%eax
  mov    %dx,-0x24(%rbp)
  mov    %ax,-0x28(%rbp)
  movw   $0x0,-0x4(%rbp)
  jmp    L29
L51:
  movw   $0x0,-0x2(%rbp)
  jmp    L53
L54:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x3,%eax
  mov    %al,-0x7(%rbp)
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x5,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  sar    $0x3,%eax
  and    $0x1c,%eax
  or     %edx,%eax
  mov    %al,-0x6(%rbp)
  addq   $0x1,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  and    $0xfffffff8,%eax
  mov    %al,-0x5(%rbp)
  addq   $0x1,-0x18(%rbp)
  movzwl -0x2(%rbp),%eax
  and    $0x1,%eax
  test   %ax,%ax
  jne    L25
  movzbl -0x5(%rbp),%eax
  imul   $0xffffffd5,%eax,%edx
  movzbl -0x6(%rbp),%eax
  imul   $0xffffffab,%eax,%eax
  add    %eax,%edx
  movzbl -0x7(%rbp),%eax
  shl    $0x7,%eax
  add    %edx,%eax
  lea    0xff(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x8,%eax
  lea    -0x80(%rax),%edx
  mov    -0x20(%rbp),%rax
  mov    %dl,(%rax)
  addq   $0x1,-0x20(%rbp)
  movzbl -0x5(%rbp),%eax
  shl    $0x7,%eax
  mov    %eax,%edx
  movzbl -0x6(%rbp),%eax
  imul   $0xffffff95,%eax,%eax
  add    %eax,%edx
  movzbl -0x7(%rbp),%eax
  imul   $0xffffffeb,%eax,%eax
  add    %edx,%eax
  lea    0xff(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x8,%eax
  add    $0xffffff80,%eax
  mov    %al,-0x8(%rbp)
  jmp    L59
L25:
  mov    -0x20(%rbp),%rax
  movzbl -0x8(%rbp),%edx
  mov    %dl,(%rax)
  addq   $0x1,-0x20(%rbp)
L59:
  movzbl -0x5(%rbp),%eax
  imul   $0x4d,%eax,%edx
  movzbl -0x6(%rbp),%eax
  imul   $0x96,%eax,%eax
  add    %eax,%edx
  movzbl -0x7(%rbp),%eax
  imul   $0x1d,%eax,%eax
  add    %edx,%eax
  lea    0xff(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x8,%eax
  mov    %eax,%edx
  mov    -0x20(%rbp),%rax
  mov    %dl,(%rax)
  addq   $0x1,-0x20(%rbp)
  movzwl -0x2(%rbp),%eax
  add    $0x1,%eax
  mov    %ax,-0x2(%rbp)
L53:
  movzwl -0x2(%rbp),%eax
  cmp    -0x24(%rbp),%ax
  jb     L54
  movzwl -0x4(%rbp),%eax
  add    $0x1,%eax
  mov    %ax,-0x4(%rbp)
L29:
  movzwl -0x4(%rbp),%eax
  cmp    -0x28(%rbp),%ax
  jb     L51
  mov    $0x0,%eax
  pop    %rbp
  ret
```

assistant: ```c
unsigned short VIM_HAPI_RGB565toYUV422(unsigned char *pRGB, unsigned char *pYUV, unsigned short Width, unsigned short Height) {
  unsigned short i, j;
  unsigned char v0;
  unsigned char r, g, b;
  for (i = 0; i < Height; i++) {
    for (j = 0; j < Width; j++) {
      b = (((*pRGB) & 0x1f) << 3);
      g = ((*(pRGB + 1) & 0x7) << 5) | ((*(pRGB)&0xe0) >> 3);
      pRGB++;
      r = ((*pRGB) & 0xf8);
      pRGB++;
      if (!(j % 2)) {
        *pYUV = (-43 * r - 85 * g + 128 * b) / 256 + 128;
        pYUV++;
        v0 = (128 * r - 107 * g - 21 * b) / 256 + 128;
      } else {
        *pYUV = v0;
        pYUV++;
      }
      *pYUV = (77 * r + 150 * g + 29 * b) / 256;
      pYUV++;
    }
  }
  return 0;
}
```