user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<PCX_D>:
  endbr64
  mov    %rsi,%r9
  push   %r12
  mov    %rdi,%rcx
  mov    %edx,%esi
  push   %rbp
  mov    %r9,%rax
  push   %rbx
  jmp    L77
  nopl   (%rax)
L52:
  sub    $0x1,%esi
  mov    %dl,(%rax)
  add    $0x1,%rcx
  add    $0x1,%rax
  test   %esi,%esi
  je     L1
L77:
  movzbl (%rcx),%edx
  mov    %edx,%edi
  and    $0xc0,%edi
  cmp    $0xc0,%edi
  jne    L52
  and    $0x3f,%edx
  lea    0x2(%rcx),%r11
  lea    -0x1(%rdx),%r8d
  mov    %edx,%ebx
  mov    %r8d,%edi
  test   %dl,%dl
  je     L169
  movsbq %dl,%r10
  lea    0x1(%rcx),%r11
  add    %rax,%r10
  cmp    %r10,%r11
  lea    0x2(%rcx),%r11
  setae  %r10b
  cmp    %r11,%rax
  setae  %bpl
  or     %bpl,%r10b
  je     L80
  cmp    $0x6,%r8b
  jbe    L80
  cmp    $0xe,%r8b
  jbe    L111
  movzbl 0x1(%rcx),%edi
  mov    %edx,%r10d
  shr    $0x4,%r10b
  movd   %edi,%xmm0
  punpcklbw %xmm0,%xmm0
  punpcklwd %xmm0,%xmm0
  pshufd $0x0,%xmm0,%xmm0
  movups %xmm0,(%rax)
  cmp    $0x1,%r10b
  je     L133
  movups %xmm0,0x10(%rax)
  cmp    $0x3,%r10b
  jne    L133
  movups %xmm0,0x20(%rax)
L133:
  mov    %edx,%ebp
  mov    %rdx,%r12
  mov    %r8d,%edi
  and    $0xfffffff0,%ebp
  and    $0x30,%r12d
  lea    (%rax,%r12,1),%r10
  sub    %ebp,%edi
  cmp    %bpl,%dl
  je     L92
  mov    %edx,%ebx
  sub    %ebp,%ebx
  lea    -0x1(%rbx),%edx
  cmp    $0x6,%dl
  jbe    L105
L60:
  movzbl 0x1(%rcx),%ebp
  mov    %ebp,%edx
  shl    $0x8,%edx
  or     %ebp,%edx
  mov    %rbx,%rbp
  movd   %edx,%xmm1
  mov    %ebx,%edx
  and    $0xf8,%ebp
  pshuflw $0x0,%xmm1,%xmm0
  and    $0xfffffff8,%edx
  add    %rbp,%r10
  movq   %xmm0,(%rax,%r12,1)
  sub    %edx,%edi
  cmp    %dl,%bl
  je     L92
L105:
  movzbl 0x1(%rcx),%edx
  lea    -0x1(%rdi),%ebx
  mov    %dl,(%r10)
  test   %dil,%dil
  jle    L92
  mov    %dl,0x1(%r10)
  lea    -0x2(%rdi),%ebp
  test   %bl,%bl
  jle    L92
  movzbl 0x1(%rcx),%edx
  lea    -0x3(%rdi),%ebx
  mov    %dl,0x2(%r10)
  test   %bpl,%bpl
  jle    L92
  mov    %dl,0x3(%r10)
  lea    -0x4(%rdi),%ebp
  test   %bl,%bl
  jle    L92
  movzbl 0x1(%rcx),%edx
  sub    $0x5,%edi
  mov    %dl,0x4(%r10)
  test   %bpl,%bpl
  jle    L92
  mov    %dl,0x5(%r10)
  test   %dil,%dil
  jle    L92
  movzbl 0x1(%rcx),%edx
  mov    %dl,0x6(%r10)
L92:
  movzbl %r8b,%r8d
L62:
  lea    0x1(%rax,%r8,1),%rax
L169:
  sub    $0x2,%esi
  mov    %r11,%rcx
  test   %esi,%esi
  jne    L77
L1:
  pop    %rbx
  sub    %r9d,%eax
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L80:
  movzbl %r8b,%r8d
  mov    %rax,%rdx
  lea    0x1(%rax,%r8,1),%r10
  nopl   0x0(%rax)
L91:
  movzbl 0x1(%rcx),%edi
  add    $0x1,%rdx
  mov    %dil,-0x1(%rdx)
  cmp    %r10,%rdx
  jne    L91
  jmp    L62
L111:
  mov    %rax,%r10
  xor    %r12d,%r12d
  jmp    L60
```

assistant: ```c
int PCX_D(void *src_raw, void *dest_raw, unsigned src_size) {
  char *src = src_raw;
  char *dest = dest_raw;
  char num;
  char *orig_dest = dest;
  do {
    if ((*src & 0xc0) == 0xc0) {
      num = *(src++) & 0x3f;
      src_size--;
      while ((num--) > 0) {
        *(dest++) = *src;
      }
      src++;
      src_size--;
    } else {
      (*dest++) = *(src++);
      src_size--;
    };
  } while (src_size);
  return (dest - orig_dest);
}
```