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

```asm
<YMOutput_ConvertTempData>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  mov    %edx,%edi
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0xa8,%rsp
  call   <YMOutput_ValidateVersion@plt>
  mov    %eax,0x9c(%rsp)
  test   %ebx,%ebx
  jle    L174
  lea    -0x1(%rbx),%edx
  movslq %ebx,%r13
  mov    %ebx,%r9d
  mov    %r12,%rsi
  mov    %edx,%ecx
  mov    %edx,%eax
  mov    %r13,%r14
  mov    %rdx,%r11
  and    $0xfffffff0,%ecx
  shr    $0x4,%eax
  lea    0x1(%rbp,%rdx,1),%rdx
  xor    %r8d,%r8d
  mov    %ecx,%edi
  mov    %ecx,%r10d
  sub    $0x1,%eax
  mov    %rdx,0x80(%rsp)
  shl    $0x4,%r10d
  mov    %rdi,0x10(%rsp)
  lea    0x1(%rcx),%edi
  add    $0x1,%rax
  mov    %edi,0x18(%rsp)
  lea    0x10(%r10),%edi
  shl    $0x8,%rax
  shl    $0x4,%r14
  mov    %edi,0x1c(%rsp)
  lea    0x2(%rcx),%edi
  sub    $0xf,%r14
  add    %rbp,%r13
  mov    %edi,0x20(%rsp)
  lea    0x20(%r10),%edi
  mov    %edi,0x24(%rsp)
  lea    0x3(%rcx),%edi
  mov    %edi,0x28(%rsp)
  lea    0x30(%r10),%edi
  mov    %edi,0x2c(%rsp)
  lea    0x4(%rcx),%edi
  mov    %edi,0x30(%rsp)
  lea    0x40(%r10),%edi
  mov    %edi,0x38(%rsp)
  lea    0x5(%rcx),%edi
  mov    %edi,0x34(%rsp)
  lea    0x50(%r10),%edi
  mov    %edi,0x3c(%rsp)
  lea    0x6(%rcx),%edi
  mov    %edi,0x40(%rsp)
  lea    0x60(%r10),%edi
  mov    %edi,0x44(%rsp)
  lea    0x7(%rcx),%edi
  mov    %edi,0x48(%rsp)
  lea    0x70(%r10),%edi
  mov    %edi,0x4c(%rsp)
  lea    0x8(%rcx),%edi
  mov    %edi,0x50(%rsp)
  lea    0x80(%r10),%edi
  mov    %edi,0x58(%rsp)
  lea    0x9(%rcx),%edi
  mov    %edi,0x5c(%rsp)
  lea    0x90(%r10),%edi
  mov    %edi,0x60(%rsp)
  lea    0xa(%rcx),%edi
  mov    %edi,0x64(%rsp)
  lea    0xa0(%r10),%edi
  mov    %edi,0x68(%rsp)
  lea    0xb(%rcx),%edi
  mov    %edi,0x6c(%rsp)
  lea    0xb0(%r10),%edi
  mov    %edi,0x70(%rsp)
  lea    0xc(%rcx),%edi
  mov    %edi,0x74(%rsp)
  lea    0xc0(%r10),%edi
  mov    %edi,0x78(%rsp)
  lea    0xd(%rcx),%edi
  mov    %edi,0x7c(%rsp)
  lea    0xd0(%r10),%edi
  mov    %edi,0x88(%rsp)
  lea    0xe(%rcx),%edi
  mov    %edi,0x8c(%rsp)
  lea    0xe0(%r10),%edi
  mov    %edi,0x90(%rsp)
  lea    0xf(%rcx),%edi
  xor    %ecx,%ecx
  mov    %edi,0x94(%rsp)
  lea    0xf0(%r10),%edi
  mov    %edi,0x98(%rsp)
  mov    %rbp,%rdi
  mov    %rax,0x8(%rsp)
  movdqa D9(%rip),%xmm0
  nopl   (%rax)
L64:
  lea    (%r14,%rsi,1),%rax
  cmp    %rax,%rdi
  lea    0x0(%r13,%r8,1),%rax
  setae  %dl
  cmp    %rax,%rsi
  setae  %al
  or     %dl,%al
  je     L166
  mov    0x8(%rsp),%rax
  mov    %rdi,%rdx
  lea    (%rax,%rsi,1),%r15
  mov    %rsi,%rax
  cmp    $0xf,%r11d
  jbe    L166
  cs nopw 0x0(%rax,%rax,1)
L131:
  movdqu (%rax),%xmm1
  movdqu 0x10(%rax),%xmm2
  add    $0x100,%rax
  add    $0x10,%rdx
  movdqu -0xd0(%rax),%xmm3
  movdqu -0x90(%rax),%xmm4
  pand   %xmm0,%xmm2
  pand   %xmm0,%xmm1
  movdqu -0x10(%rax),%xmm5
  packuswb %xmm2,%xmm1
  movdqu -0xe0(%rax),%xmm2
  pand   %xmm0,%xmm3
  pand   %xmm0,%xmm4
  pand   %xmm0,%xmm1
  pand   %xmm0,%xmm5
  pand   %xmm0,%xmm2
  packuswb %xmm3,%xmm2
  movdqu -0xb0(%rax),%xmm3
  pand   %xmm0,%xmm2
  packuswb %xmm2,%xmm1
  movdqu -0xc0(%rax),%xmm2
  pand   %xmm0,%xmm3
  pand   %xmm0,%xmm1
  pand   %xmm0,%xmm2
  packuswb %xmm3,%xmm2
  movdqu -0xa0(%rax),%xmm3
  pand   %xmm0,%xmm2
  pand   %xmm0,%xmm3
  packuswb %xmm4,%xmm3
  movdqu -0x50(%rax),%xmm4
  pand   %xmm0,%xmm3
  packuswb %xmm3,%xmm2
  movdqu -0x70(%rax),%xmm3
  pand   %xmm0,%xmm4
  pand   %xmm0,%xmm2
  packuswb %xmm2,%xmm1
  movdqu -0x80(%rax),%xmm2
  pand   %xmm0,%xmm3
  pand   %xmm0,%xmm1
  pand   %xmm0,%xmm2
  packuswb %xmm3,%xmm2
  movdqu -0x60(%rax),%xmm3
  pand   %xmm0,%xmm2
  pand   %xmm0,%xmm3
  packuswb %xmm4,%xmm3
  movdqu -0x30(%rax),%xmm4
  pand   %xmm0,%xmm3
  packuswb %xmm3,%xmm2
  movdqu -0x40(%rax),%xmm3
  pand   %xmm0,%xmm4
  pand   %xmm0,%xmm2
  pand   %xmm0,%xmm3
  packuswb %xmm4,%xmm3
  movdqu -0x20(%rax),%xmm4
  pand   %xmm0,%xmm3
  pand   %xmm0,%xmm4
  packuswb %xmm5,%xmm4
  pand   %xmm0,%xmm4
  packuswb %xmm4,%xmm3
  pand   %xmm0,%xmm3
  packuswb %xmm3,%xmm2
  pand   %xmm0,%xmm2
  packuswb %xmm2,%xmm1
  movups %xmm1,-0x10(%rdx)
  cmp    %r15,%rax
  jne    L131
  lea    (%r10,%rcx,1),%edx
  mov    0x10(%rsp),%rax
  movslq %edx,%rdx
  movzbl (%r12,%rdx,1),%edx
  add    %r8,%rax
  mov    %dl,0x0(%rbp,%rax,1)
  cmp    0x18(%rsp),%ebx
  jle    L38
  mov    0x1c(%rsp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,0x1(%rbp,%rax,1)
  cmp    0x20(%rsp),%ebx
  jle    L38
  mov    0x24(%rsp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,0x2(%rbp,%rax,1)
  cmp    0x28(%rsp),%ebx
  jle    L38
  mov    0x2c(%rsp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,0x3(%rbp,%rax,1)
  cmp    0x30(%rsp),%ebx
  jle    L38
  mov    0x38(%rsp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,0x4(%rbp,%rax,1)
  cmp    0x34(%rsp),%ebx
  jle    L38
  mov    0x3c(%rsp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,0x5(%rbp,%rax,1)
  cmp    0x40(%rsp),%ebx
  jle    L38
  mov    0x44(%rsp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,0x6(%rbp,%rax,1)
  cmp    0x48(%rsp),%ebx
  jle    L38
  mov    0x4c(%rsp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,0x7(%rbp,%rax,1)
  cmp    0x50(%rsp),%ebx
  jle    L38
  mov    0x58(%rsp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,0x8(%rbp,%rax,1)
  cmp    0x5c(%rsp),%ebx
  jle    L38
  mov    0x60(%rsp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,0x9(%rbp,%rax,1)
  cmp    0x64(%rsp),%ebx
  jle    L38
  mov    0x68(%rsp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,0xa(%rbp,%rax,1)
  cmp    0x6c(%rsp),%ebx
  jle    L38
  mov    0x70(%rsp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,0xb(%rbp,%rax,1)
  cmp    0x74(%rsp),%ebx
  jle    L38
  mov    0x78(%rsp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,0xc(%rbp,%rax,1)
  cmp    0x7c(%rsp),%ebx
  jle    L38
  mov    0x88(%rsp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,0xd(%rbp,%rax,1)
  cmp    0x8c(%rsp),%ebx
  jle    L38
  mov    0x90(%rsp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,0xe(%rbp,%rax,1)
  cmp    0x94(%rsp),%ebx
  jle    L38
  mov    0x98(%rsp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  movzbl (%r12,%rdx,1),%edx
  mov    %dl,0xf(%rbp,%rax,1)
  nopw   0x0(%rax,%rax,1)
L38:
  add    $0x1,%ecx
  add    %r9,%r8
  add    %r9,%rdi
  add    $0x1,%rsi
  cmp    $0xe,%ecx
  jne    L64
L174:
  cmpl   $0x5,0x9c(%rsp)
  je     L183
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L166:
  mov    0x80(%rsp),%r15
  mov    %ecx,0x54(%rsp)
  mov    %rdi,%rax
  mov    %rsi,%rdx
  add    %r8,%r15
  nopl   (%rax)
L185:
  movzbl (%rdx),%ecx
  add    $0x1,%rax
  add    $0x10,%rdx
  mov    %cl,-0x1(%rax)
  cmp    %r15,%rax
  jne    L185
  mov    0x54(%rsp),%ecx
  jmp    L38
L183:
  add    $0xa8,%rsp
  lea    (%rbx,%rbx,1),%edx
  mov    %rbp,%rdi
  xor    %esi,%esi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <memset@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D9
type_guessed: byte[16]

tool: {"D9": [0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00]}

assistant: ```c
void YMOutput_ConvertTempData(const unsigned char *pSrcData, unsigned char *pOutputData, int nVersion, int nVBL) {
  int j, i;
  unsigned long nPos = 0;
  nVersion = YMOutput_ValidateVersion(nVersion);
  for (j = 0; j < 14; j++) {
    for (i = 0; i < nVBL; i++) {
      unsigned char Data = pSrcData[(i * 16) + j];
      pOutputData[nPos] = Data;
      nPos++;
    }
  }
  if (nVersion == 5) {
    memset(pOutputData, 0, (nVBL * 2));
  }
}
```