user: Please show me the C implementation that matches the assembly code listed below:

```asm
<bitvector_shr_to>:
  endbr64
  test   %rdx,%rdx
  je     L21
  push   %r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %ecx,%ebx
  test   %ecx,%ecx
  je     L37
  mov    %ecx,%edx
  sar    $0x5,%edx
  jne    L2
  mov    %r13,%rdi
  sub    $0x1,%rdi
  je     L121
L99:
  lea    0x4(%rbp),%rdx
  mov    %r12,%rax
  mov    $0x20,%esi
  sub    %rdx,%rax
  sub    %ebx,%esi
  cmp    $0xc,%rax
  jbe    L87
  cmp    $0x2,%r13
  je     L87
  lea    -0x2(%r13),%rax
  cmp    $0x2,%rax
  jbe    L157
  movslq %ebx,%rcx
  mov    %rdi,%rdx
  xor    %eax,%eax
  shr    $0x2,%rdx
  movq   %rcx,%xmm3
  movslq %esi,%rcx
  shl    $0x4,%rdx
  movq   %rcx,%xmm2
L50:
  movdqu 0x0(%rbp,%rax,1),%xmm0
  movdqu 0x4(%rbp,%rax,1),%xmm1
  psrad  %xmm3,%xmm0
  pslld  %xmm2,%xmm1
  por    %xmm1,%xmm0
  movups %xmm0,(%r12,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L50
  mov    %rdi,%rdx
  and    $0xfffffffffffffffc,%rdx
  test   $0x3,%dil
  je     L93
  sub    %rdx,%r13
  lea    -0x1(%r13),%rcx
  cmp    $0x2,%r13
  je     L41
L143:
  movq   0x4(%rbp,%rdx,4),%xmm0
  movq   0x0(%rbp,%rdx,4),%xmm1
  mov    %rcx,%rax
  and    $0xfffffffffffffffe,%rax
  pslld  %xmm2,%xmm0
  psrad  %xmm3,%xmm1
  por    %xmm1,%xmm0
  movq   %xmm0,(%r12,%rdx,4)
  add    %rax,%rdx
  cmp    %rax,%rcx
  je     L93
L41:
  mov    0x4(%rbp,%rdx,4),%eax
  mov    %esi,%ecx
  mov    0x0(%rbp,%rdx,4),%esi
  shl    %cl,%eax
  mov    %ebx,%ecx
  sar    %cl,%esi
  or     %esi,%eax
  mov    %eax,(%r12,%rdx,4)
L93:
  shl    $0x2,%rdi
  add    %rdi,%rbp
  add    %rdi,%r12
L121:
  mov    0x0(%rbp),%eax
  mov    %ebx,%ecx
  sar    %cl,%eax
  mov    %eax,(%r12)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L21:
  ret
  nopl   0x0(%rax)
L2:
  movslq %edx,%r14
  xor    %esi,%esi
  shl    $0x2,%edx
  and    $0x1f,%ebx
  sub    %r14,%r13
  lea    0x0(%rbp,%r14,4),%rbp
  lea    (%rdi,%r13,4),%rdi
  call   <memset@plt>
  mov    %r13,%rdi
  sub    $0x1,%rdi
  jne    L99
  jmp    L121
  nopl   0x0(%rax,%rax,1)
L37:
  pop    %rbx
  lea    0x0(,%rdx,4),%rdx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    1070 <memcpy@plt>
  nopl   (%rax)
L87:
  lea    -0x4(,%r13,4),%r8
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L76:
  mov    0x4(%rbp,%rax,1),%edx
  mov    0x0(%rbp,%rax,1),%r9d
  mov    %esi,%ecx
  shl    %cl,%edx
  mov    %ebx,%ecx
  sar    %cl,%r9d
  or     %r9d,%edx
  mov    %edx,(%r12,%rax,1)
  add    $0x4,%rax
  cmp    %rax,%r8
  jne    L76
  jmp    L93
L157:
  movslq %ebx,%rax
  mov    %rdi,%rcx
  xor    %edx,%edx
  movq   %rax,%xmm3
  movslq %esi,%rax
  movq   %rax,%xmm2
  jmp    L143
```

assistant: ```c
void bitvector_shr_to(u_int32_t *dest, u_int32_t *b, size_t n, u_int32_t s) {
  u_int32_t i, j;
  if (n == 0)
    return;
  if (s == 0) {
    memcpy(dest, b, n * 4);
    return;
  }
  j = (s >> 5);
  if (j) {
    n -= j;
    memset(&dest[n], 0, j * 4);
    s &= 31;
    b = &b[j];
  }
  for (i = 0; i < n - 1; i++) {
    dest[i] = (b[i] >> s) | (b[i + 1] << (32 - s));
  }
  dest[i] = b[i] >> s;
}
```