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

```asm
<IntegerUnpacker_8>:
  endbr64
  cmp    $0x8,%edx
  jg     L231
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  cmp    %ecx,%edx
  jl     L237
  test   %r9d,%r9d
  lea    0x1f(%r9),%eax
  mov    %rsi,%r15
  cmovns %r9d,%eax
  sar    $0x5,%eax
  cltq
  lea    (%rdi,%rax,4),%rcx
  mov    %r9d,%eax
  sar    $0x1f,%eax
  mov    (%rcx),%esi
  shr    $0x1b,%eax
  lea    (%r9,%rax,1),%edx
  and    $0x1f,%edx
  sub    %edx,%eax
  lea    0x20(%rax),%r14d
  je     L296
  mov    0x4(%rcx),%eax
  mov    %rsi,%rdx
  lea    0x8(%rcx),%rdi
  mov    %r9d,%ecx
  shl    $0x20,%rdx
  and    $0x1f,%ecx
  or     %rdx,%rax
  mov    %rax,%rdx
  shl    %cl,%rdx
  cmp    $0x20,%r14d
  cmovl  %rdx,%rax
L331:
  cmp    $0x3,%r8d
  jle    L283
  sub    $0x4,%r8d
  mov    $0x40,%esi
  mov    %r8d,%r10d
  sub    %ebp,%esi
  shr    $0x2,%r10d
  lea    0x1(%r10),%edx
  lea    (%r15,%rdx,4),%r9
  jmp    L89
  nopl   0x0(%rax)
L310:
  cmp    %r15,%r9
  je     L221
L89:
  mov    %rax,%rdx
  mov    %esi,%ecx
  add    $0x4,%r15
  shr    %cl,%rdx
  mov    %ebp,%ecx
  shl    %cl,%rax
  mov    %esi,%ecx
  mov    %dl,-0x4(%r15)
  mov    %r14d,%edx
  mov    %rax,%rbx
  sub    %ebp,%edx
  shr    %cl,%rbx
  mov    %ebp,%ecx
  sub    %ebp,%edx
  shl    %cl,%rax
  mov    %bl,-0x3(%r15)
  mov    %esi,%ecx
  sub    %ebp,%edx
  mov    %rax,%rbx
  mov    %edx,%r14d
  shr    %cl,%rbx
  mov    %ebp,%ecx
  sub    %ebp,%r14d
  shl    %cl,%rax
  mov    %bl,-0x2(%r15)
  mov    %esi,%ecx
  mov    %rax,%rbx
  shr    %cl,%rbx
  mov    %ebp,%ecx
  mov    %bl,-0x1(%r15)
  shl    %cl,%rax
  test   %r14d,%r14d
  jg     L310
  lea    0x4(%rdi),%r11
  mov    (%rdi),%edi
  jne    L120
  or     %rdi,%rax
L80:
  add    $0x20,%r14d
  mov    %r11,%rdi
  cmp    %r15,%r9
  jne    L89
L221:
  neg    %r10d
  lea    (%r8,%r10,4),%r8d
L283:
  test   %r8d,%r8d
  jle    L237
  mov    $0x40,%esi
  movslq %r8d,%r8
  sub    %ebp,%esi
  add    %r15,%r8
L29:
  mov    %rax,%rdx
  mov    %esi,%ecx
  add    $0x1,%r15
  shr    %cl,%rdx
  mov    %ebp,%ecx
  mov    %dl,-0x1(%r15)
  mov    %r14d,%edx
  shl    %cl,%rax
  sub    %ebp,%edx
  test   %edx,%edx
  jle    L184
  mov    %edx,%r14d
L52:
  cmp    %r8,%r15
  jne    L29
L237:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L296:
  lea    0x4(%rcx),%rax
  mov    %rax,-0x58(%rsp)
  cmp    $0x8,%ebp
  je     L13
  cmp    $0x6,%ebp
  jne    L180
  cmp    $0xf,%r8d
  jle    L267
  mov    %rax,%rdi
  lea    -0x10(%r8),%eax
  mov    %esi,-0x50(%rsp)
  mov    %eax,-0x30(%rsp)
  shr    $0x4,%eax
  mov    %eax,-0x28(%rsp)
  add    $0x1,%eax
  mov    %rax,-0x20(%rsp)
  shl    $0x4,%rax
  add    %r15,%rax
  mov    %r14d,-0x18(%rsp)
  mov    %rax,-0x38(%rsp)
  mov    %ebp,-0xc(%rsp)
L81:
  mov    (%rdi),%r8d
  mov    0x4(%rdi),%eax
  add    $0x10,%r15
  add    $0xc,%rdi
  mov    -0x50(%rsp),%ecx
  mov    -0x4(%rdi),%ebx
  mov    %r8d,%edx
  mov    %r8d,%r14d
  mov    %r8d,%r11d
  mov    %r8d,%r10d
  mov    %ecx,%esi
  mov    %ecx,%ebp
  mov    %ecx,%r12d
  mov    %ecx,%r13d
  mov    %ebx,-0x50(%rsp)
  mov    %ecx,%ebx
  shl    $0x4,%ecx
  mov    %eax,%r9d
  shr    $0x1c,%edx
  and    $0x30,%ecx
  shr    $0x16,%r14d
  shr    $0x1e,%r9d
  or     %edx,%ecx
  mov    %r8d,%edx
  and    $0x3f,%r14d
  shr    $0x10,%edx
  shl    $0x2,%r8d
  movzbl %cl,%ecx
  shr    $0x2,%r13b
  and    $0x3f,%edx
  and    $0x3c,%r8d
  shr    $0xa,%r11d
  shl    $0x8,%rdx
  or     %r9d,%r8d
  mov    %eax,%r9d
  shr    $0x4,%r10d
  or     %r14,%rdx
  shr    $0x18,%r9d
  movzbl %r13b,%r13d
  mov    %r11d,-0x68(%rsp)
  shl    $0x8,%rdx
  mov    %r10d,-0x48(%rsp)
  shr    $0x8,%r12d
  mov    %eax,%r10d
  or     %rcx,%rdx
  mov    %r8b,-0x40(%rsp)
  mov    %eax,%r11d
  mov    %r9d,%r8d
  shl    $0x8,%rdx
  mov    %eax,%r9d
  shr    $0x1a,%esi
  and    $0x3f,%r12d
  or     %r13,%rdx
  shr    $0x14,%ebx
  movzbl -0x40(%rsp),%ecx
  movzbl %sil,%esi
  shr    $0xe,%ebp
  shr    $0x12,%r9d
  shr    $0xc,%r10d
  shr    $0x6,%r11d
  shl    $0x8,%rdx
  and    $0x3f,%eax
  and    $0x3f,%r11d
  and    $0x3f,%r10d
  shl    $0x8,%rax
  and    $0x3f,%r9d
  and    $0x3f,%r8d
  or     %r12,%rdx
  or     %r11,%rax
  and    $0x3f,%ebp
  shl    $0x8,%rdx
  and    $0x3f,%ebx
  shl    $0x8,%rax
  or     %rbp,%rdx
  or     %r10,%rax
  shl    $0x8,%rdx
  shl    $0x8,%rax
  or     %rbx,%rdx
  or     %r9,%rax
  shl    $0x8,%rdx
  shl    $0x8,%rax
  or     %rsi,%rdx
  or     %r8,%rax
  shl    $0x8,%rax
  or     %rcx,%rax
  mov    -0x48(%rsp),%ecx
  shl    $0x8,%rax
  and    $0x3f,%ecx
  or     %rcx,%rax
  mov    -0x68(%rsp),%ecx
  mov    %rdx,-0x68(%rsp)
  shl    $0x8,%rax
  and    $0x3f,%ecx
  or     %rcx,%rax
  mov    %rax,-0x60(%rsp)
  movdqa -0x68(%rsp),%xmm0
  movups %xmm0,-0x10(%r15)
  cmp    %r15,-0x38(%rsp)
  jne    L81
  mov    -0x20(%rsp),%rax
  mov    -0x58(%rsp),%rdi
  mov    -0x50(%rsp),%esi
  mov    -0x30(%rsp),%r8d
  lea    (%rax,%rax,2),%rax
  mov    -0x18(%rsp),%r14d
  mov    -0xc(%rsp),%ebp
  lea    (%rdi,%rax,4),%rax
  mov    %rax,-0x50(%rsp)
  mov    -0x28(%rsp),%eax
  shl    $0x4,%eax
  sub    %eax,%r8d
L165:
  mov    -0x50(%rsp),%rax
  mov    %rax,-0x58(%rsp)
L28:
  mov    -0x58(%rsp),%rax
  mov    %rsi,%rdx
  shl    $0x20,%rdx
  lea    0x4(%rax),%rdi
  mov    (%rax),%eax
  or     %rdx,%rax
  jmp    L331
  nopw   0x0(%rax,%rax,1)
L120:
  mov    %ebp,%ecx
  sub    %edx,%ecx
  shr    %cl,%rax
  or     %rdi,%rax
  shl    %cl,%rax
  jmp    L80
  nopw   0x0(%rax,%rax,1)
L184:
  lea    0x4(%rdi),%r9
  mov    (%rdi),%edi
  jne    L251
  or     %rdi,%rax
L343:
  lea    0x20(%rdx),%r14d
  mov    %r9,%rdi
  jmp    L52
  nop
L251:
  mov    %ebp,%ecx
  sub    %r14d,%ecx
  shr    %cl,%rax
  or     %rdi,%rax
  shl    %cl,%rax
  jmp    L343
L13:
  cmp    $0x7,%r8d
  jle    L345
  sub    $0x8,%r8d
  mov    %rax,%rdx
  mov    %r15,%rax
  mov    %r8d,%edi
  shr    $0x3,%edi
  mov    %edi,%r9d
  lea    0xc(%rcx,%r9,8),%r10
  mov    %esi,%ecx
L201:
  mov    %ecx,%esi
  mov    %ch,0x2(%rax)
  add    $0x8,%rdx
  add    $0x8,%rax
  shr    $0x18,%esi
  mov    %cl,-0x5(%rax)
  mov    %sil,-0x8(%rax)
  mov    %ecx,%esi
  shr    $0x10,%esi
  mov    %sil,-0x7(%rax)
  mov    -0x8(%rdx),%ecx
  mov    %ecx,%esi
  mov    %ch,-0x2(%rax)
  shr    $0x18,%esi
  mov    %sil,-0x4(%rax)
  mov    %ecx,%esi
  shr    $0x10,%esi
  mov    %sil,-0x3(%rax)
  mov    %cl,-0x1(%rax)
  mov    -0x4(%rdx),%ecx
  cmp    %rdx,%r10
  jne    L201
  lea    0x8(,%r9,8),%rax
  add    %rax,-0x58(%rsp)
  neg    %edi
  mov    %ecx,%esi
  add    %rax,%r15
  lea    (%r8,%rdi,8),%r8d
L345:
  mov    -0x58(%rsp),%rdi
  mov    %rdi,-0x50(%rsp)
  cmp    $0x1,%ebp
  jne    L165
  cmp    $0x1f,%r8d
  jle    L28
  lea    -0x20(%r8),%eax
  mov    %r15,-0x48(%rsp)
  mov    %eax,-0x28(%rsp)
  shr    $0x5,%eax
  mov    %eax,-0x38(%rsp)
  add    $0x1,%eax
  mov    %rax,-0x30(%rsp)
  lea    (%rdi,%rax,4),%rax
  mov    %rax,-0x58(%rsp)
  mov    %r14d,-0x20(%rsp)
  mov    %r15,-0x18(%rsp)
  mov    %ebp,-0xc(%rsp)
  nopl   0x0(%rax,%rax,1)
L303:
  mov    %esi,%edx
  mov    %esi,%r15d
  mov    %esi,%r14d
  mov    %esi,%r13d
  shr    $0x18,%edx
  shr    $0x19,%r15d
  mov    %esi,%r12d
  mov    %esi,%ebp
  and    $0x1,%edx
  and    $0x1,%r15d
  shr    $0x1a,%r14d
  mov    %esi,%edi
  shl    $0x8,%rdx
  and    $0x1,%r14d
  shr    $0x1b,%r13d
  mov    %esi,%r10d
  or     %r15,%rdx
  and    $0x1,%r13d
  shr    $0x1c,%r12d
  mov    %esi,%r11d
  shl    $0x8,%rdx
  and    $0x1,%r12d
  shr    $0x17,%edi
  mov    %esi,%eax
  or     %r14,%rdx
  shr    $0x16,%r10d
  mov    %edi,-0x68(%rsp)
  mov    %esi,%ecx
  shl    $0x8,%rdx
  shr    $0x12,%r11d
  mov    %r10d,-0x40(%rsp)
  mov    %esi,%ebx
  or     %r13,%rdx
  shr    $0x1d,%ebp
  mov    %esi,%edi
  mov    %esi,%r8d
  shl    $0x8,%rdx
  mov    %esi,%r9d
  mov    %r11d,%r10d
  shr    $0x10,%eax
  or     %r12,%rdx
  mov    %esi,%r11d
  and    $0x1,%ebp
  addq   $0x20,-0x48(%rsp)
  shl    $0x8,%rdx
  shr    $0x1f,%ecx
  mov    %esi,%r12d
  mov    %esi,%r13d
  shr    $0x1e,%ebx
  shr    $0x15,%edi
  movzbl %cl,%ecx
  mov    %esi,%r15d
  shr    $0x14,%r8d
  shr    $0x13,%r9d
  mov    %esi,%r14d
  shr    $0x11,%r11d
  or     %rbp,%rdx
  and    $0x1,%eax
  and    $0x1,%r10d
  and    $0x1,%r11d
  shl    $0x8,%rax
  and    $0x1,%r9d
  and    $0x1,%r8d
  or     %r11,%rax
  and    $0x1,%edi
  and    $0x1,%ebx
  shl    $0x8,%rdx
  shl    $0x8,%rax
  or     %rbx,%rdx
  mov    %esi,%ebp
  shr    $0xc,%r12d
  shl    $0x8,%rdx
  or     %r10,%rax
  shr    $0xd,%ebp
  mov    %esi,%r10d
  shl    $0x8,%rax
  or     %rcx,%rdx
  mov    %esi,%r11d
  mov    %esi,%ecx
  or     %r9,%rax
  mov    %esi,%r9d
  shl    $0x8,%rax
  or     %r8,%rax
  mov    %esi,%r8d
  shl    $0x8,%rax
  or     %rdi,%rax
  mov    -0x40(%rsp),%edi
  shl    $0x8,%rax
  and    $0x1,%edi
  or     %rdi,%rax
  mov    -0x68(%rsp),%edi
  mov    %rdx,-0x68(%rsp)
  mov    %esi,%edx
  shl    $0x8,%rax
  shr    $0xf,%edx
  and    $0x1,%edi
  mov    %rax,%rbx
  mov    -0x48(%rsp),%rax
  or     %rdi,%rbx
  mov    %esi,%edi
  mov    %rbx,-0x60(%rsp)
  mov    %esi,%ebx
  movdqa -0x68(%rsp),%xmm2
  shr    $0xe,%ebx
  shr    $0xb,%r13d
  and    $0x1,%r12d
  and    $0x1,%ebp
  shr    $0x8,%edi
  movups %xmm2,-0x20(%rax)
  shr    $0x9,%r15d
  and    $0x1,%r13d
  mov    %edi,%eax
  and    $0x1,%r15d
  shr    $0xa,%r14d
  mov    %esi,%edi
  and    $0x1,%eax
  and    $0x1,%r14d
  shr    $0x7,%dil
  and    $0x1,%ebx
  shl    $0x8,%rax
  shr    $0x5,%r10d
  mov    %dil,-0x68(%rsp)
  and    $0x1,%edx
  shr    $0x6,%ecx
  or     %r15,%rax
  mov    %r10d,%edi
  mov    %esi,%r10d
  shl    $0x8,%rax
  shr    $0x4,%r8d
  shr    $0x3,%r9d
  or     %r14,%rax
  shr    $0x2,%r10d
  shl    $0x8,%rax
  shr    %r11d
  or     %r13,%rax
  shl    $0x8,%rax
  or     %r12,%rax
  shl    $0x8,%rax
  or     %rbp,%rax
  shl    $0x8,%rax
  or     %rbx,%rax
  shl    $0x8,%rax
  and    $0x1,%esi
  and    $0x1,%r11d
  and    $0x1,%r10d
  shl    $0x8,%rsi
  and    $0x1,%r9d
  addq   $0x4,-0x50(%rsp)
  or     %r11,%rsi
  shl    $0x8,%rsi
  or     %r10,%rsi
  shl    $0x8,%rsi
  or     %rsi,%r9
  mov    %r8d,%esi
  mov    %r9,%r8
  and    $0x1,%esi
  shl    $0x8,%r8
  or     %rsi,%r8
  mov    %edi,%esi
  shl    $0x8,%r8
  and    $0x1,%esi
  mov    %r8,%rdi
  or     %rsi,%rdi
  mov    %ecx,%esi
  mov    %rdi,%rcx
  and    $0x1,%esi
  mov    %rax,%rdi
  mov    -0x48(%rsp),%rax
  shl    $0x8,%rcx
  or     %rdx,%rdi
  or     %rsi,%rcx
  movzbl -0x68(%rsp),%esi
  mov    %rdi,-0x68(%rsp)
  shl    $0x8,%rcx
  or     %rsi,%rcx
  mov    %rcx,-0x60(%rsp)
  movdqa -0x68(%rsp),%xmm3
  movups %xmm3,-0x10(%rax)
  mov    -0x50(%rsp),%rax
  mov    -0x4(%rax),%esi
  cmp    -0x58(%rsp),%rax
  jne    L303
  mov    -0x30(%rsp),%rax
  mov    -0x18(%rsp),%r15
  mov    -0x28(%rsp),%r8d
  mov    -0x20(%rsp),%r14d
  shl    $0x5,%rax
  mov    -0xc(%rsp),%ebp
  add    %rax,%r15
  mov    -0x38(%rsp),%eax
  shl    $0x5,%eax
  sub    %eax,%r8d
  jmp    L28
  nopw   0x0(%rax,%rax,1)
L231:
  ret
  nopl   0x0(%rax)
L180:
  cmp    $0x4,%ebp
  jne    L306
  cmp    $0x7,%r8d
  jle    L28
  sub    $0x8,%r8d
  mov    %rax,%rcx
  mov    %r8d,%eax
  shr    $0x3,%eax
  mov    %eax,-0x68(%rsp)
  add    $0x1,%eax
  mov    %rax,-0x50(%rsp)
  lea    0x0(,%rax,4),%rbx
  xor    %eax,%eax
  xchg   %ax,%ax
L202:
  mov    %esi,%edx
  mov    %esi,%edi
  mov    %esi,%r9d
  mov    %esi,%r10d
  mov    %esi,%r11d
  mov    %esi,%r12d
  mov    %esi,%r13d
  shr    $0x4,%dl
  shr    $0x8,%r13d
  and    $0xf,%esi
  movzbl %dl,%edx
  shr    $0xc,%r12d
  shl    $0x8,%rsi
  and    $0xf,%r13d
  and    $0xf,%r12d
  shr    $0x10,%r11d
  shr    $0x14,%r10d
  or     %rsi,%rdx
  and    $0xf,%r11d
  shr    $0x18,%r9d
  shl    $0x8,%rdx
  and    $0xf,%r10d
  and    $0xf,%r9d
  shr    $0x1c,%edi
  or     %r13,%rdx
  movzbl %dil,%edi
  shl    $0x8,%rdx
  or     %r12,%rdx
  shl    $0x8,%rdx
  or     %r11,%rdx
  shl    $0x8,%rdx
  or     %r10,%rdx
  shl    $0x8,%rdx
  or     %r9,%rdx
  shl    $0x8,%rdx
  or     %rdi,%rdx
  mov    %rdx,(%r15,%rax,2)
  mov    (%rcx,%rax,1),%esi
  add    $0x4,%rax
  cmp    %rbx,%rax
  jne    L202
  mov    -0x68(%rsp),%r13d
  mov    -0x50(%rsp),%rdi
  add    %rax,-0x58(%rsp)
  neg    %r13d
  lea    (%r15,%rdi,8),%r15
  lea    (%r8,%r13,8),%r8d
  jmp    L28
L306:
  cmp    $0x2,%ebp
  jne    L345
  cmp    $0xf,%r8d
  jle    L28
  lea    -0x10(%r8),%eax
  mov    %r14d,-0x20(%rsp)
  xor    %ecx,%ecx
  mov    %eax,-0x30(%rsp)
  shr    $0x4,%eax
  mov    %eax,-0x38(%rsp)
  add    $0x1,%eax
  mov    %rax,-0x28(%rsp)
  shl    $0x2,%rax
  mov    %rax,-0x40(%rsp)
  mov    %r15,-0x48(%rsp)
  mov    %ebp,-0x18(%rsp)
  nopw   0x0(%rax,%rax,1)
L330:
  mov    %esi,%eax
  mov    %esi,%r15d
  mov    %esi,%r14d
  mov    %esi,%r13d
  shr    $0x10,%eax
  shr    $0x12,%r15d
  mov    %esi,%r12d
  mov    %esi,%ebp
  and    $0x3,%eax
  and    $0x3,%r15d
  shr    $0x14,%r14d
  mov    %esi,%edi
  shl    $0x8,%rax
  and    $0x3,%r14d
  shr    $0x16,%r13d
  mov    %esi,%r11d
  or     %r15,%rax
  and    $0x3,%r13d
  shr    $0x18,%r12d
  mov    %esi,%ebx
  shl    $0x8,%rax
  and    $0x3,%r12d
  shr    $0x1a,%ebp
  mov    %esi,%edx
  or     %r14,%rax
  shr    $0xe,%edi
  and    $0x3,%ebp
  mov    %esi,%r8d
  shl    $0x8,%rax
  shr    $0xc,%r11d
  mov    %edi,-0x68(%rsp)
  mov    %esi,%r9d
  or     %r13,%rax
  mov    %r11d,-0x50(%rsp)
  shr    $0x1c,%ebx
  mov    %esi,%edi
  shl    $0x8,%rax
  mov    %esi,%r10d
  mov    %esi,%r11d
  shr    $0x1e,%edx
  or     %r12,%rax
  shr    $0xa,%edi
  and    $0x3,%ebx
  movzbl %dl,%edx
  shl    $0x8,%rax
  shr    $0x8,%r8d
  shr    $0x6,%r9b
  or     %rbp,%rax
  shr    $0x4,%r10d
  shr    $0x2,%r11d
  shl    $0x8,%rax
  and    $0x3,%esi
  and    $0x3,%r10d
  and    $0x3,%r11d
  shl    $0x8,%rsi
  movzbl %r9b,%r9d
  and    $0x3,%r8d
  or     %r11,%rsi
  and    $0x3,%edi
  or     %rbx,%rax
  shl    $0x8,%rsi
  shl    $0x8,%rax
  or     %r10,%rsi
  or     %rdx,%rax
  shl    $0x8,%rsi
  or     %r9,%rsi
  shl    $0x8,%rsi
  or     %r8,%rsi
  shl    $0x8,%rsi
  or     %rdi,%rsi
  mov    -0x50(%rsp),%edi
  shl    $0x8,%rsi
  and    $0x3,%edi
  or     %rdi,%rsi
  mov    -0x68(%rsp),%edi
  mov    %rax,-0x68(%rsp)
  shl    $0x8,%rsi
  mov    -0x48(%rsp),%rax
  and    $0x3,%edi
  or     %rdi,%rsi
  mov    %rsi,-0x60(%rsp)
  movdqa -0x68(%rsp),%xmm1
  movups %xmm1,(%rax,%rcx,4)
  mov    -0x58(%rsp),%rax
  mov    (%rax,%rcx,1),%esi
  add    $0x4,%rcx
  cmp    -0x40(%rsp),%rcx
  jne    L330
  mov    -0x28(%rsp),%rax
  mov    -0x48(%rsp),%r15
  mov    -0x30(%rsp),%r8d
  add    %rcx,-0x58(%rsp)
  shl    $0x4,%rax
  mov    -0x20(%rsp),%r14d
  mov    -0x18(%rsp),%ebp
  add    %rax,%r15
  mov    -0x38(%rsp),%eax
  shl    $0x4,%eax
  sub    %eax,%r8d
  jmp    L28
L267:
  mov    %rax,-0x50(%rsp)
  jmp    L165
```

assistant: ```c
void IntegerUnpacker_8(void *stream, void *dst, int nbits, int nbitt, int n, int offset) {
  unsigned int *packed = (unsigned int *)stream;
  char *unpacked = (char *)dst;
  unsigned long long temp;
  unsigned int token, token1, token2, token3;
  int bleft;
  int signed_offset = 0;
  if (nbits > 8 || nbitt > nbits)
    return;
  packed += offset / 32;
  bleft = 32 - (offset % 32);
  token = *packed++;
  if (nbits == -1)
    signed_offset = -(1 << (nbitt - 1));
  if (bleft == 32) {
    if (nbits == 8) {
      while (n > 7) {
        *unpacked++ = ((token >> 24));
        *unpacked++ = ((token >> 16) & 0xFF);
        *unpacked++ = ((token >> 8) & 0xFF);
        *unpacked++ = (token & 0xFF);
        token = *packed++;
        *unpacked++ = ((token >> 24));
        *unpacked++ = ((token >> 16) & 0xFF);
        *unpacked++ = ((token >> 8) & 0xFF);
        *unpacked++ = (token & 0xFF);
        token = *packed++;
        n -= 8;
      }
    }
    if (nbits == 6) {
      while (n > 15) {
        token2 = *packed++;
        token3 = *packed++;
        token1 = *packed++;
        *unpacked++ = ((token >> 26));
        *unpacked++ = ((token >> 20) & 0x3F);
        *unpacked++ = ((token >> 14) & 0x3F);
        *unpacked++ = ((token >> 8) & 0x3F);
        *unpacked++ = ((token >> 2) & 0x3F);
        *unpacked++ = (((token & 0x3) << 4) | (token2 >> 28));
        *unpacked++ = ((token2 >> 22) & 0x3F);
        *unpacked++ = ((token2 >> 16) & 0x3F);
        *unpacked++ = ((token2 >> 10) & 0x3F);
        *unpacked++ = ((token2 >> 4) & 0x3F);
        *unpacked++ = (((token2 & 0xF) << 2) | (token3 >> 30));
        *unpacked++ = ((token3 >> 24) & 0x3F);
        *unpacked++ = ((token3 >> 18) & 0x3F);
        *unpacked++ = ((token3 >> 12) & 0x3F);
        *unpacked++ = ((token3 >> 6) & 0x3F);
        *unpacked++ = (token3 & 0x3F);
        token = token1;
        n -= 16;
      }
    }
    if (nbits == 4) {
      while (n > 7) {
        *unpacked++ = ((token >> 28));
        *unpacked++ = ((token >> 24) & 0xF);
        *unpacked++ = ((token >> 20) & 0xF);
        *unpacked++ = ((token >> 16) & 0xF);
        *unpacked++ = ((token >> 12) & 0xF);
        *unpacked++ = ((token >> 8) & 0xF);
        *unpacked++ = ((token >> 4) & 0xF);
        *unpacked++ = (token & 0xF);
        token = *packed++;
        n -= 8;
      }
    }
    if (nbits == 2) {
      while (n > 15) {
        *unpacked++ = ((token >> 30));
        *unpacked++ = ((token >> 28) & 0x3);
        *unpacked++ = ((token >> 26) & 0x3);
        *unpacked++ = ((token >> 24) & 0x3);
        *unpacked++ = ((token >> 22) & 0x3);
        *unpacked++ = ((token >> 20) & 0x3);
        *unpacked++ = ((token >> 18) & 0x3);
        *unpacked++ = ((token >> 16) & 0x3);
        *unpacked++ = ((token >> 14) & 0x3);
        *unpacked++ = ((token >> 12) & 0x3);
        *unpacked++ = ((token >> 10) & 0x3);
        *unpacked++ = ((token >> 8) & 0x3);
        *unpacked++ = ((token >> 6) & 0x3);
        *unpacked++ = ((token >> 4) & 0x3);
        *unpacked++ = ((token >> 2) & 0x3);
        *unpacked++ = (token & 0x3);
        token = *packed++;
        n -= 16;
      }
    }
    if (nbits == 1) {
      while (n > 31) {
        *unpacked++ = ((token >> 31) & 1);
        *unpacked++ = ((token >> 30) & 1);
        *unpacked++ = ((token >> 29) & 1);
        *unpacked++ = ((token >> 28) & 1);
        *unpacked++ = ((token >> 27) & 1);
        *unpacked++ = ((token >> 26) & 1);
        *unpacked++ = ((token >> 25) & 1);
        *unpacked++ = ((token >> 24) & 1);
        *unpacked++ = ((token >> 23) & 1);
        *unpacked++ = ((token >> 22) & 1);
        *unpacked++ = ((token >> 21) & 1);
        *unpacked++ = ((token >> 20) & 1);
        *unpacked++ = ((token >> 19) & 1);
        *unpacked++ = ((token >> 18) & 1);
        *unpacked++ = ((token >> 17) & 1);
        *unpacked++ = ((token >> 16) & 1);
        *unpacked++ = ((token >> 15) & 1);
        *unpacked++ = ((token >> 14) & 1);
        *unpacked++ = ((token >> 13) & 1);
        *unpacked++ = ((token >> 12) & 1);
        *unpacked++ = ((token >> 11) & 1);
        *unpacked++ = ((token >> 10) & 1);
        *unpacked++ = ((token >> 9) & 1);
        *unpacked++ = ((token >> 8) & 1);
        *unpacked++ = ((token >> 7) & 1);
        *unpacked++ = ((token >> 6) & 1);
        *unpacked++ = ((token >> 5) & 1);
        *unpacked++ = ((token >> 4) & 1);
        *unpacked++ = ((token >> 3) & 1);
        *unpacked++ = ((token >> 2) & 1);
        *unpacked++ = ((token >> 1) & 1);
        *unpacked++ = (token & 1);
        token = *packed++;
        n -= 32;
      }
    }
  }
  temp = token;
  temp <<= 32;
  temp |= *packed++;
  if (bleft < 32)
    temp <<= (32 - bleft);
  while (n > 3) {
    *unpacked++ = (temp >> (64 - nbits));
    temp <<= nbits;
    bleft -= nbits;
    *unpacked++ = (temp >> (64 - nbits));
    temp <<= nbits;
    bleft -= nbits;
    *unpacked++ = (temp >> (64 - nbits));
    temp <<= nbits;
    bleft -= nbits;
    *unpacked++ = (temp >> (64 - nbits));
    temp <<= nbits;
    bleft -= nbits;
    if (bleft <= 0) {
      token = *packed++;
      if (bleft == 0) {
        temp |= token;
      } else {
        temp = temp >> (-bleft);
        temp |= token;
        temp <<= (-bleft);
      }
      bleft += 32;
    }
    n -= 4;
  }
  while (n-- > 0) {
    *unpacked++ = (temp >> (64 - nbits));
    temp <<= nbits;
    bleft -= nbits;
    if (bleft <= 0) {
      token = *packed++;
      if (bleft == 0) {
        temp |= token;
      } else {
        temp = temp >> (-bleft);
        temp |= token;
        temp <<= (-bleft);
      }
      bleft += 32;
    }
  }
}
```