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

```asm
<bs_conv_14le_8>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r14
  mov    %esi,0x4(%rsp)
  mov    %rdx,%r13
  lea    0x7(%rsi),%eax
  test   %esi,%esi
  cmovns %esi,%eax
  mov    %eax,%ecx
  sar    $0x3,%ecx
  mov    %esi,%edx
  sar    $0x1f,%edx
  shr    $0x1d,%edx
  add    %edx,%esi
  and    $0x7,%esi
  sub    %edx,%esi
  mov    %esi,0x8(%rsp)
  and    $0xfffffff8,%eax
  sub    %ecx,%eax
  add    %esi,%eax
  mov    %eax,(%rsp)
  lea    -0x1(%rcx),%eax
  mov    %eax,0xc(%rsp)
  test   %ecx,%ecx
  je     L34
  lea    -0x1(%rcx),%eax
  lea    0x8(%rdi,%rax,8),%r15
  mov    %r13,%r12
  mov    %rdi,%rbp
L1:
  mov    0x0(%rbp),%edi
  call   <spdif_swab_s32@plt>
  mov    %eax,%ebx
  mov    0x4(%rbp),%edi
  call   <spdif_swab_s32@plt>
  mov    %eax,%edx
  shr    $0x8,%eax
  and    $0xff00ff,%eax
  shl    $0x8,%edx
  and    $0xff00ff00,%edx
  or     %edx,%eax
  mov    %ebx,%ecx
  shr    $0x8,%ecx
  and    $0xff00ff,%ecx
  shl    $0x8,%ebx
  mov    %ebx,%edx
  and    $0xff00ff00,%edx
  or     %ecx,%edx
  mov    %eax,%ebx
  shr    $0x2,%ebx
  and    $0xfffc000,%ebx
  and    $0x3fff,%eax
  shl    $0x1c,%ecx
  or     %ecx,%eax
  or     %eax,%ebx
  lea    0x0(,%rdx,4),%edi
  and    $0xfffc0000,%edi
  shl    $0x4,%edx
  and    $0x3fff0,%edx
  or     %edx,%edi
  call   <spdif_swab_s32@plt>
  mov    %eax,(%r12)
  mov    %ebx,%edi
  call   <spdif_swab_s32@plt>
  mov    %eax,0x3(%r12)
  add    $0x8,%rbp
  add    $0x7,%r12
  cmp    %r15,%rbp
  jne    L1
  mov    0xc(%rsp),%eax
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  add    %rdx,%r14
  sub    %rax,%rdx
  add    %rdx,%r13
L34:
  testb  $0x7,0x4(%rsp)
  je     L63
  mov    0x8(%rsp),%eax
  mov    %eax,%edx
  test   %eax,%eax
  je     L60
  lea    -0x1(%rax),%esi
  mov    $0x0,%eax
L61:
  movzbl (%r14,%rax,1),%ecx
  mov    %cl,0x0(%r13,%rax,1)
  mov    %rax,%rcx
  add    $0x1,%rax
  cmp    %rsi,%rcx
  jne    L61
  cmpl   $0x7,0x8(%rsp)
  ja     L28
L60:
  mov    %edx,%eax
  movb   $0x0,0x0(%r13,%rax,1)
  add    $0x1,%edx
  cmp    $0x7,%edx
  jbe    L60
L28:
  mov    0x0(%r13),%edi
  call   <spdif_swab_s32@plt>
  mov    %eax,%ebx
  mov    0x4(%r13),%edi
  call   <spdif_swab_s32@plt>
  mov    %eax,%edx
  shr    $0x8,%eax
  and    $0xff00ff,%eax
  shl    $0x8,%edx
  and    $0xff00ff00,%edx
  or     %edx,%eax
  mov    %ebx,%edx
  shr    $0x8,%edx
  and    $0xff00ff,%edx
  shl    $0x8,%ebx
  and    $0xff00ff00,%ebx
  or     %edx,%ebx
  mov    %eax,%ebp
  shr    $0x2,%ebp
  and    $0xfffc000,%ebp
  and    $0x3fff,%eax
  shl    $0x1c,%edx
  or     %edx,%eax
  or     %eax,%ebp
  lea    0x0(,%rbx,4),%edi
  and    $0xfffc0000,%edi
  shl    $0x4,%ebx
  and    $0x3fff0,%ebx
  or     %ebx,%edi
  call   <spdif_swab_s32@plt>
  mov    %eax,0x0(%r13)
  mov    %ebp,%edi
  call   <spdif_swab_s32@plt>
  mov    %eax,0x3(%r13)
L63:
  mov    (%rsp),%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int bs_conv_14le_8(const unsigned char *in_buf, int size, unsigned char *out_buf) {
  int n = size / 8;
  int r = size % 8;
  const unsigned char *src = in_buf;
  unsigned char *dst = out_buf;
  unsigned int i, w1, w2;
  size = n * 7 + r;
  while (n--) {
    w1 = spdif_swab_s32(*(unsigned int *)(src + 0));
    w2 = spdif_swab_s32(*(unsigned int *)(src + 4));
    w2 = ((w2 & 0xff00ff00) >> 8) | ((w2 & 0x00ff00ff) << 8);
    w1 = ((w1 & 0xff00ff00) >> 8) | ((w1 & 0x00ff00ff) << 8);
    w2 = ((w2 & 0x3fff0000) >> 2) | (w2 & 0x00003fff) | (w1 << 28);
    w1 = ((w1 & 0x3fff0000) << 2) | ((w1 & 0x00003fff) << 4);
    (*(unsigned int *)(dst + 0)) = spdif_swab_s32(w1);
    (*(unsigned int *)(dst + 3)) = spdif_swab_s32(w2);
    src += 8;
    dst += 7;
  }
  if (r) {
    i = 0;
    for (; i < r; i++)
      dst[i] = src[i];
    for (; i < 8; i++)
      dst[i] = 0;
    w1 = spdif_swab_s32(*(unsigned int *)(dst + 0));
    w2 = spdif_swab_s32(*(unsigned int *)(dst + 4));
    w2 = ((w2 & 0xff00ff00) >> 8) | ((w2 & 0x00ff00ff) << 8);
    w1 = ((w1 & 0xff00ff00) >> 8) | ((w1 & 0x00ff00ff) << 8);
    w2 = ((w2 & 0x3fff0000) >> 2) | (w2 & 0x00003fff) | (w1 << 28);
    w1 = ((w1 & 0x3fff0000) << 2) | ((w1 & 0x00003fff) << 4);
    (*(unsigned int *)(dst + 0)) = spdif_swab_s32(w1);
    (*(unsigned int *)(dst + 3)) = spdif_swab_s32(w2);
  }
  return size;
}
```