user: What is the c source code of the assembly code below?

```asm
<NV12TileToNV12>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edx,%ebx
  mov    %ecx,%edx
  mov    %ebx,%r13d
  sub    $0x58,%rsp
  mov    %rdi,0x30(%rsp)
  mov    %rsi,0x38(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  and    $0x1,%edx
  lea    -0x1(%rcx),%eax
  cmove  %ecx,%eax
  mov    %edx,0x2c(%rsp)
  shr    $0x1f,%r13d
  add    %ebx,%r13d
  mov    %eax,0x28(%rsp)
  mov    %eax,%ecx
  mov    %ebx,%eax
  sar    %r13d
  shl    $0xb,%eax
  mov    %r13d,(%rsp)
  movslq %eax,%rdx
  mov    %ebx,%eax
  shl    $0xc,%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,0x18(%rsp)
  test   %ecx,%ecx
  jle    L85
  lea    0x100(%rdi),%rax
  mov    %rsi,0x8(%rsp)
  mov    %rax,0x10(%rsp)
  lea    -0x100(,%rdx,4),%rax
  movl   $0x0,0x4(%rsp)
  mov    %rax,0x20(%rsp)
  nopw   0x0(%rax,%rax,1)
L101:
  mov    0x8(%rsp),%rax
  mov    %rax,0x40(%rsp)
  cmp    $0x1,%ebx
  jle    L97
  mov    0x20(%rsp),%r12
  mov    0x10(%rsp),%r14
  xor    %r15d,%r15d
  lea    0x40(%rsp),%rbp
  add    %r14,%r12
  jmp    L14
  nopw   0x0(%rax,%rax,1)
L47:
  mov    %r13,%rdi
  call   <copyTile@plt>
  mov    %ebx,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <copyTile@plt>
  mov    %ebx,%edx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <copyTile@plt>
  lea    0x100(%r12),%rdi
  mov    %ebx,%edx
  mov    %rbp,%rsi
  call   <copyTile@plt>
L12:
  add    $0x1,%r15d
  add    $0x200,%r14
  add    $0x200,%r12
  cmp    (%rsp),%r15d
  jge    L97
L14:
  lea    -0x100(%r14),%r13
  mov    %ebx,%edx
  mov    %rbp,%rsi
  test   $0x1,%r15b
  je     L47
  mov    %r12,%rdi
  call   <copyTile@plt>
  lea    0x100(%r12),%rdi
  mov    %ebx,%edx
  mov    %rbp,%rsi
  call   <copyTile@plt>
  mov    %ebx,%edx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <copyTile@plt>
  mov    %ebx,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <copyTile@plt>
  jmp    L12
  nopl   0x0(%rax)
L97:
  mov    0x18(%rsp),%rcx
  addl   $0x2,0x4(%rsp)
  add    %rcx,0x8(%rsp)
  mov    0x4(%rsp),%eax
  add    %rcx,0x10(%rsp)
  cmp    %eax,0x28(%rsp)
  jg     L101
L85:
  mov    0x28(%rsp),%ecx
  xor    %edx,%edx
  mov    0x30(%rsp),%rbp
  lea    0x1(%rcx),%eax
  shr    %eax
  cmp    $0xffffffff,%ecx
  cmovl  %rdx,%rax
  imul   0x18(%rsp),%rax
  mov    0x2c(%rsp),%edx
  add    %rax,%rbp
  add    0x38(%rsp),%rax
  test   %edx,%edx
  je     L98
  mov    %rax,0x40(%rsp)
  test   %ebx,%ebx
  jle    L98
  lea    -0x1(%rbx),%r12d
  lea    0x40(%rsp),%r13
  add    $0x1,%r12
  shl    $0x8,%r12
  add    %rbp,%r12
  nopl   0x0(%rax)
L76:
  mov    %rbp,%rdi
  mov    %ebx,%edx
  mov    %r13,%rsi
  add    $0x100,%rbp
  call   <copyTile@plt>
  cmp    %rbp,%r12
  jne    L76
L98:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L102
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L102:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void NV12TileToNV12(uint8_t *dst_head, uint8_t *src_head, int wTiles, int hTiles) {
  int loop = 0;
  int Z = 0;
  uint8_t *src = src_head;
  uint8_t *dst = dst_head;
  for (loop = 0; loop < (hTiles % 2 == 0 ? hTiles : hTiles - 1); loop = loop + 2) {
    src = src_head;
    for (Z = 0; Z < (wTiles / 2); Z++) {
      dst = dst_head;
      if (Z % 2 == 0) {
        dst = dst + (Z * 2 * 64);
        copyTile(dst, &src, wTiles);
        dst = dst + 64;
        copyTile(dst, &src, wTiles);
        dst = dst_head + (wTiles * (64 * 32));
        dst = dst + (Z * 2 * 64);
        copyTile(dst, &src, wTiles);
        dst = dst + 64;
        copyTile(dst, &src, wTiles);
      } else {
        dst = dst_head + (wTiles * (64 * 32));
        dst = dst + (Z * 2 * 64);
        copyTile(dst, &src, wTiles);
        dst = dst + 64;
        copyTile(dst, &src, wTiles);
        dst = dst_head + (Z * 2 * 64);
        copyTile(dst, &src, wTiles);
        dst = dst + 64;
        copyTile(dst, &src, wTiles);
      }
    }
    src_head = src_head + (2 * (64 * 32) * wTiles);
    dst_head = dst_head + (2 * wTiles * (64 * 32));
  }
  if (hTiles % 2) {
    src = src_head;
    for (loop = 0; loop < wTiles; loop++) {
      dst = dst_head + (loop * 64);
      copyTile(dst, &src, wTiles);
    }
  }
}
```