user: Converte this assembly snippet into its equivalent C code:

```asm
<YUV420toYUV444>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x44(%rbp)
  mov    %esi,-0x48(%rbp)
  mov    %rdx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x48(%rbp),%eax
  imul   -0x44(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x48(%rbp),%eax
  imul   -0x44(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x48(%rbp),%eax
  imul   -0x44(%rbp),%eax
  lea    0x3(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x2,%eax
  cltq
  lea    (%rcx,%rax,1),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x20(%rbp)
  movl   $0x0,-0x40(%rbp)
  jmp    L39
L26:
  movl   $0x0,-0x3c(%rbp)
  jmp    L38
L37:
  mov    -0x40(%rbp),%eax
  imul   -0x44(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  add    %rax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x40(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  movslq %eax,%rdx
  mov    -0x3c(%rbp),%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  sar    %eax
  cltq
  add    %rax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x40(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  movslq %eax,%rdx
  mov    -0x3c(%rbp),%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  sar    %eax
  cltq
  add    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  mov    -0x18(%rbp),%rdx
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  mov    -0x10(%rbp),%rdx
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  mov    -0x8(%rbp),%rdx
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x3c(%rbp)
L38:
  mov    -0x3c(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L37
  addl   $0x1,-0x40(%rbp)
L39:
  mov    -0x40(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jl     L26
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void YUV420toYUV444(int width, int height, unsigned char *src, unsigned char *dst) {
  int line, column;
  unsigned char *py, *pu, *pv;
  unsigned char *tmp = dst;
  unsigned char *base_py = src;
  unsigned char *base_pu = src + (height * width);
  unsigned char *base_pv = src + (height * width) + (height * width) / 4;
  for (line = 0; line < height; ++line) {
    for (column = 0; column < width; ++column) {
      py = base_py + (line * width) + column;
      pu = base_pu + (line / 2 * width / 2) + column / 2;
      pv = base_pv + (line / 2 * width / 2) + column / 2;
      *tmp++ = *py;
      *tmp++ = *pu;
      *tmp++ = *pv;
    }
  }
}
```