user: 请从给定的汇编指令推导出C源代码:

```asm
<_unpack>:
  endbr64
  mov    %rdi,%r10
  mov    %rsi,%r9
  mov    %rdx,%rdi
  cmp    $0xffffffff,%ecx
  je     L208
  cmp    $0x7f,%ecx
  ja     L75
  test   %rdx,%rdx
  jle    L146
  xor    %edx,%edx
  jmp    L217
  nopl   0x0(%rax,%rax,1)
L202:
  mov    %r8,(%r9,%rdx,8)
  add    $0x1,%rdx
  mov    %rdx,%rax
  cmp    %rdi,%rdx
  je     L107
L217:
  movsbq (%r10,%rdx,1),%r8
  movslq %edx,%rax
  cmp    %ecx,%r8d
  jne    L202
  ret
  nopw   0x0(%rax,%rax,1)
L208:
  test   %rdx,%rdx
  jle    L146
  lea    (%rsi,%rdx,8),%rax
  lea    (%r10,%rdx,1),%rdx
  cmp    %rax,%r10
  setae  %al
  cmp    %rdx,%rsi
  setae  %dl
  or     %dl,%al
  je     L77
  lea    -0x1(%rdi),%rax
  cmp    $0xe,%rax
  jbe    L77
  mov    %rdi,%rcx
  mov    %r10,%rdx
  pxor   %xmm6,%xmm6
  mov    %rsi,%rax
  and    $0xfffffffffffffff0,%rcx
  pxor   %xmm5,%xmm5
  pxor   %xmm4,%xmm4
  add    %r10,%rcx
  nopw   0x0(%rax,%rax,1)
L223:
  movdqu (%rdx),%xmm0
  movdqa %xmm6,%xmm2
  movdqa %xmm5,%xmm7
  add    $0x10,%rdx
  sub    $0xffffffffffffff80,%rax
  pcmpgtb %xmm0,%xmm2
  movdqa %xmm0,%xmm1
  punpcklbw %xmm2,%xmm1
  punpckhbw %xmm2,%xmm0
  movdqa %xmm5,%xmm2
  pcmpgtw %xmm1,%xmm2
  pcmpgtw %xmm0,%xmm7
  movdqa %xmm1,%xmm3
  punpcklwd %xmm2,%xmm3
  punpckhwd %xmm2,%xmm1
  movdqa %xmm0,%xmm2
  punpcklwd %xmm7,%xmm2
  punpckhwd %xmm7,%xmm0
  movdqa %xmm4,%xmm7
  pcmpgtd %xmm3,%xmm7
  movdqa %xmm3,%xmm8
  punpckhdq %xmm7,%xmm3
  punpckldq %xmm7,%xmm8
  movdqa %xmm1,%xmm7
  movups %xmm3,-0x70(%rax)
  movdqa %xmm4,%xmm3
  pcmpgtd %xmm1,%xmm3
  movups %xmm8,-0x80(%rax)
  punpckhdq %xmm3,%xmm1
  punpckldq %xmm3,%xmm7
  movdqa %xmm2,%xmm3
  movups %xmm1,-0x50(%rax)
  movdqa %xmm4,%xmm1
  pcmpgtd %xmm2,%xmm1
  movups %xmm7,-0x60(%rax)
  punpckhdq %xmm1,%xmm2
  punpckldq %xmm1,%xmm3
  movdqa %xmm4,%xmm1
  pcmpgtd %xmm0,%xmm1
  movups %xmm2,-0x30(%rax)
  movdqa %xmm0,%xmm2
  movups %xmm3,-0x40(%rax)
  punpckldq %xmm1,%xmm2
  punpckhdq %xmm1,%xmm0
  movups %xmm2,-0x20(%rax)
  movups %xmm0,-0x10(%rax)
  cmp    %rcx,%rdx
  jne    L223
  mov    %rdi,%rax
  and    $0xfffffffffffffff0,%rax
  test   $0xf,%dil
  je     L229
  movslq %eax,%rcx
  movsbq (%r10,%rcx,1),%rsi
  lea    0x0(,%rcx,8),%rdx
  mov    %rsi,(%r9,%rcx,8)
  lea    0x1(%rax),%ecx
  movslq %ecx,%rcx
  cmp    %rcx,%rdi
  jle    L229
  movsbq (%r10,%rcx,1),%rcx
  mov    %rcx,0x8(%r9,%rdx,1)
  lea    0x2(%rax),%ecx
  movslq %ecx,%rcx
  cmp    %rcx,%rdi
  jle    L229
  movsbq (%r10,%rcx,1),%rcx
  mov    %rcx,0x10(%r9,%rdx,1)
  lea    0x3(%rax),%ecx
  movslq %ecx,%rcx
  cmp    %rcx,%rdi
  jle    L229
  movsbq (%r10,%rcx,1),%rcx
  mov    %rcx,0x18(%r9,%rdx,1)
  lea    0x4(%rax),%ecx
  movslq %ecx,%rcx
  cmp    %rcx,%rdi
  jle    L229
  movsbq (%r10,%rcx,1),%rcx
  mov    %rcx,0x20(%r9,%rdx,1)
  lea    0x5(%rax),%ecx
  movslq %ecx,%rcx
  cmp    %rcx,%rdi
  jle    L229
  movsbq (%r10,%rcx,1),%rcx
  mov    %rcx,0x28(%r9,%rdx,1)
  lea    0x6(%rax),%ecx
  movslq %ecx,%rcx
  cmp    %rcx,%rdi
  jle    L229
  movsbq (%r10,%rcx,1),%rcx
  mov    %rcx,0x30(%r9,%rdx,1)
  lea    0x7(%rax),%ecx
  movslq %ecx,%rcx
  cmp    %rcx,%rdi
  jle    L229
  movsbq (%r10,%rcx,1),%rcx
  mov    %rcx,0x38(%r9,%rdx,1)
  lea    0x8(%rax),%ecx
  movslq %ecx,%rcx
  cmp    %rcx,%rdi
  jle    L229
  movsbq (%r10,%rcx,1),%rcx
  mov    %rcx,0x40(%r9,%rdx,1)
  lea    0x9(%rax),%ecx
  movslq %ecx,%rcx
  cmp    %rcx,%rdi
  jle    L229
  movsbq (%r10,%rcx,1),%rcx
  mov    %rcx,0x48(%r9,%rdx,1)
  lea    0xa(%rax),%ecx
  movslq %ecx,%rcx
  cmp    %rcx,%rdi
  jle    L229
  movsbq (%r10,%rcx,1),%rcx
  mov    %rcx,0x50(%r9,%rdx,1)
  lea    0xb(%rax),%ecx
  movslq %ecx,%rcx
  cmp    %rcx,%rdi
  jle    L229
  movsbq (%r10,%rcx,1),%rcx
  mov    %rcx,0x58(%r9,%rdx,1)
  lea    0xc(%rax),%ecx
  movslq %ecx,%rcx
  cmp    %rcx,%rdi
  jle    L229
  movsbq (%r10,%rcx,1),%rcx
  mov    %rcx,0x60(%r9,%rdx,1)
  lea    0xd(%rax),%ecx
  movslq %ecx,%rcx
  cmp    %rcx,%rdi
  jle    L229
  movsbq (%r10,%rcx,1),%rcx
  add    $0xe,%eax
  cltq
  mov    %rcx,0x68(%r9,%rdx,1)
  cmp    %rax,%rdi
  jle    L229
  movsbq (%r10,%rax,1),%rax
  mov    %rax,0x70(%r9,%rdx,1)
L229:
  mov    %rdi,%rax
  ret
  nopw   0x0(%rax,%rax,1)
L107:
  ret
  nopl   0x0(%rax)
L146:
  xor    %eax,%eax
  ret
L77:
  xor    %eax,%eax
  nopl   (%rax)
L263:
  movsbq (%r10,%rax,1),%rdx
  mov    %rdx,(%r9,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rdi
  jne    L263
  jmp    L229
L75:
  mov    $0xffffffffffffffff,%rax
  ret
```

assistant: ```c
long _unpack(char *cp, long *up, long bc, int tc) {
  int i;
  int narg;
  narg = 4;
  if (narg < 3)
    return (-1);
  if (narg > 3 && tc != -1) {
    if (tc < 0 || tc > 0177)
      return (-1);
    for (i = 0; i < bc; i++) {
      if (cp[i] == tc)
        break;
      up[i] = cp[i];
    }
  } else {
    for (i = 0; i < bc; i++)
      up[i] = cp[i];
  }
  return (i);
}
```