user: 请将以下的汇编代码转换成C语言代码：

```asm
<IntegerPacker_16>:
  endbr64
  cmp    $0x10,%edx
  jg     L486
  mov    %rdi,%r11
  mov    %rsi,%rdi
  mov    %edx,%r10d
  cmp    %ecx,%edx
  jl     L486
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    0x1f(%r9),%eax
  test   %r9d,%r9d
  cmovns %r9d,%eax
  sar    $0x5,%eax
  cltq
  lea    (%r11,%rax,4),%r11
  mov    %r9d,%eax
  sar    $0x1f,%eax
  shr    $0x1b,%eax
  add    %eax,%r9d
  and    $0x1f,%r9d
  sub    %r9d,%eax
  lea    0x20(%rax),%r9d
  mov    $0xffffffff,%edx
  shl    %cl,%edx
  not    %edx
  test   %eax,%eax
  je     L507
  mov    $0x0,%eax
  cmp    $0x1f,%r9d
  jg     L267
  mov    (%r11),%eax
  mov    %r9d,%ecx
  shr    %cl,%eax
L267:
  cmp    $0x1,%r8d
  jle    L298
  lea    -0x2(%r8),%r12d
  shr    %r12d
  lea    0x1(%r12),%ecx
  lea    (%rdi,%rcx,4),%rbp
  jmp    L344
L507:
  cmp    $0x10,%r10d
  je     L355
  cmp    $0xc,%r10d
  jne    L6
  cmp    $0x7,%r8d
  jle    L453
  lea    -0x8(%r8),%r12d
  shr    $0x3,%r12d
  lea    0x1(%r12),%ebp
  mov    %ebp,%ebp
  lea    0x0(%rbp,%rbp,2),%rax
  lea    (%r11,%rax,4),%rbx
L250:
  movzwl 0x4(%rsi),%eax
  and    %edx,%eax
  movzwl 0x6(%rsi),%r13d
  and    %edx,%r13d
  movzwl (%rsi),%ecx
  and    %edx,%ecx
  shl    $0x14,%ecx
  movzwl 0x2(%rsi),%r14d
  and    %edx,%r14d
  shl    $0x8,%r14d
  or     %r14d,%ecx
  mov    %eax,%r14d
  shr    $0x4,%r14d
  or     %r14d,%ecx
  mov    %ecx,(%r11)
  movzwl 0xa(%rsi),%ecx
  and    %edx,%ecx
  shl    $0x1c,%eax
  shl    $0x10,%r13d
  or     %r13d,%eax
  movzwl 0x8(%rsi),%r13d
  and    %edx,%r13d
  shl    $0x4,%r13d
  or     %r13d,%eax
  mov    %ecx,%r13d
  shr    $0x8,%r13d
  or     %r13d,%eax
  mov    %eax,0x4(%r11)
  movzwl 0xc(%rsi),%eax
  and    %edx,%eax
  add    $0x10,%rsi
  add    $0xc,%r11
  shl    $0x18,%ecx
  shl    $0xc,%eax
  or     %eax,%ecx
  movzwl -0x2(%rsi),%eax
  and    %edx,%eax
  or     %eax,%ecx
  mov    %ecx,-0x4(%r11)
  cmp    %r11,%rbx
  jne    L250
  shl    $0x4,%rbp
  add    %rbp,%rdi
  neg    %r12d
  lea    -0x8(%r8,%r12,8),%r8d
  mov    %r11,%rcx
L159:
  cmp    $0x4,%r10d
  jne    L121
  cmp    $0x7,%r8d
  jle    L398
  lea    -0x8(%r8),%ebp
  shr    $0x3,%ebp
  lea    0x1(%rbp),%r12d
  mov    %r12d,%r12d
  lea    (%rcx,%r12,4),%r11
  mov    %rdi,%rax
L434:
  movzwl (%rax),%esi
  and    %edx,%esi
  shl    $0x4,%esi
  movzwl 0x2(%rax),%ebx
  and    %edx,%ebx
  or     %esi,%ebx
  shl    $0x4,%ebx
  movzwl 0x4(%rax),%esi
  and    %edx,%esi
  or     %ebx,%esi
  shl    $0x4,%esi
  movzwl 0x6(%rax),%ebx
  and    %edx,%ebx
  or     %esi,%ebx
  shl    $0x4,%ebx
  movzwl 0x8(%rax),%esi
  and    %edx,%esi
  or     %ebx,%esi
  shl    $0x4,%esi
  movzwl 0xa(%rax),%ebx
  and    %edx,%ebx
  or     %esi,%ebx
  shl    $0x4,%ebx
  movzwl 0xc(%rax),%esi
  and    %edx,%esi
  or     %ebx,%esi
  shl    $0x4,%esi
  add    $0x10,%rax
  add    $0x4,%rcx
  movzwl -0x2(%rax),%ebx
  and    %edx,%ebx
  or     %ebx,%esi
  mov    %esi,-0x4(%rcx)
  cmp    %r11,%rcx
  jne    L434
  shl    $0x4,%r12
  add    %r12,%rdi
  neg    %ebp
  lea    -0x8(%r8,%rbp,8),%r8d
L27:
  mov    $0x0,%eax
  jmp    L267
L355:
  cmp    $0x3,%r8d
  jle    L407
  lea    -0x4(%r8),%ebp
  shr    $0x2,%ebp
  lea    0x1(%rbp),%r12d
  mov    %r12d,%r12d
  shl    $0x3,%r12
  lea    (%r11,%r12,1),%rbx
L331:
  movzwl (%rsi),%ecx
  and    %edx,%ecx
  movzwl 0x2(%rsi),%r14d
  and    %edx,%r14d
  movzwl 0x4(%rsi),%eax
  and    %edx,%eax
  add    $0x8,%rsi
  movzwl -0x2(%rsi),%r13d
  and    %edx,%r13d
  shl    $0x10,%ecx
  or     %r14d,%ecx
  mov    %ecx,(%r11)
  add    $0x8,%r11
  shl    $0x10,%eax
  or     %r13d,%eax
  mov    %eax,-0x4(%r11)
  cmp    %r11,%rbx
  jne    L331
  add    %r12,%rdi
  neg    %ebp
  lea    -0x4(%r8,%rbp,4),%r8d
  mov    %r11,%rcx
L362:
  cmp    $0x6,%r10d
  jne    L159
  cmp    $0xf,%r8d
  jle    L338
  lea    -0x10(%r8),%ebp
  shr    $0x4,%ebp
  lea    0x1(%rbp),%r12d
  mov    %r12d,%r12d
  lea    (%r12,%r12,2),%rax
  lea    (%rcx,%rax,4),%rbx
  mov    %rdi,%rax
L31:
  movzwl 0xa(%rax),%r11d
  and    %edx,%r11d
  movzwl 0xc(%rax),%r14d
  and    %edx,%r14d
  movzwl 0xe(%rax),%r13d
  and    %edx,%r13d
  movzwl (%rax),%esi
  and    %edx,%esi
  shl    $0x1a,%esi
  movzwl 0x2(%rax),%r15d
  and    %edx,%r15d
  shl    $0x14,%r15d
  or     %r15d,%esi
  movzwl 0x4(%rax),%r15d
  and    %edx,%r15d
  shl    $0xe,%r15d
  or     %r15d,%esi
  movzwl 0x6(%rax),%r15d
  and    %edx,%r15d
  shl    $0x8,%r15d
  or     %r15d,%esi
  movzwl 0x8(%rax),%r15d
  and    %edx,%r15d
  shl    $0x2,%r15d
  or     %r15d,%esi
  mov    %r11d,%r15d
  shr    $0x4,%r15d
  or     %r15d,%esi
  mov    %esi,(%rcx)
  movzwl 0x14(%rax),%esi
  and    %edx,%esi
  shl    $0x1c,%r11d
  shl    $0x16,%r14d
  or     %r14d,%r11d
  shl    $0x10,%r13d
  or     %r13d,%r11d
  movzwl 0x10(%rax),%r13d
  and    %edx,%r13d
  shl    $0xa,%r13d
  or     %r13d,%r11d
  movzwl 0x12(%rax),%r13d
  and    %edx,%r13d
  shl    $0x4,%r13d
  or     %r13d,%r11d
  mov    %esi,%r13d
  shr    $0x2,%r13d
  or     %r13d,%r11d
  mov    %r11d,0x4(%rcx)
  movzwl 0x16(%rax),%r15d
  and    %edx,%r15d
  movzwl 0x18(%rax),%r14d
  and    %edx,%r14d
  movzwl 0x1a(%rax),%r13d
  and    %edx,%r13d
  movzwl 0x1c(%rax),%r11d
  and    %edx,%r11d
  add    $0x20,%rax
  add    $0xc,%rcx
  shl    $0x1e,%esi
  shl    $0x18,%r15d
  or     %r15d,%esi
  shl    $0x12,%r14d
  or     %r14d,%esi
  shl    $0xc,%r13d
  or     %r13d,%esi
  shl    $0x6,%r11d
  or     %r11d,%esi
  movzwl -0x2(%rax),%r11d
  and    %edx,%r11d
  or     %r11d,%esi
  mov    %esi,-0x4(%rcx)
  cmp    %rcx,%rbx
  jne    L31
  shl    $0x5,%r12
  add    %r12,%rdi
  neg    %ebp
  shl    $0x4,%ebp
  lea    -0x10(%r8,%rbp,1),%r8d
L338:
  cmp    $0x1,%r10d
  jne    L176
  cmp    $0x1f,%r8d
  jle    L168
  lea    0x40(%rdi),%rbx
  lea    -0x20(%r8),%r12d
  shr    $0x5,%r12d
  lea    0x1(%r12),%r13d
  mov    %r13d,%r13d
  lea    (%rcx,%r13,4),%r11
  mov    $0x0,%ebp
  jmp    L308
L6:
  cmp    $0x8,%r10d
  jne    L495
  cmp    $0x7,%r8d
  jle    L14
  lea    -0x8(%r8),%ebx
  shr    $0x3,%ebx
  lea    0x1(%rbx),%ebp
  mov    %ebp,%ebp
  lea    (%r11,%rbp,8),%rsi
  mov    %rdi,%rcx
L74:
  movzwl (%rcx),%eax
  and    %edx,%eax
  shl    $0x18,%eax
  movzwl 0x2(%rcx),%r12d
  and    %edx,%r12d
  shl    $0x10,%r12d
  or     %r12d,%eax
  movzwl 0x6(%rcx),%r12d
  and    %edx,%r12d
  or     %r12d,%eax
  movzwl 0x4(%rcx),%r12d
  and    %edx,%r12d
  shl    $0x8,%r12d
  or     %r12d,%eax
  mov    %eax,(%r11)
  movzwl 0x8(%rcx),%eax
  and    %edx,%eax
  movzwl 0xa(%rcx),%r13d
  and    %edx,%r13d
  movzwl 0xc(%rcx),%r12d
  and    %edx,%r12d
  add    $0x10,%rcx
  add    $0x8,%r11
  shl    $0x18,%eax
  shl    $0x10,%r13d
  or     %r13d,%eax
  shl    $0x8,%r12d
  or     %r12d,%eax
  movzwl -0x2(%rcx),%r12d
  and    %edx,%r12d
  or     %r12d,%eax
  mov    %eax,-0x4(%r11)
  cmp    %r11,%rsi
  jne    L74
  shl    $0x4,%rbp
  add    %rbp,%rdi
  neg    %ebx
  lea    -0x8(%r8,%rbx,8),%r8d
  mov    %r11,%rcx
L121:
  cmp    $0x2,%r10d
  jne    L338
  cmp    $0xf,%r8d
  jle    L203
  lea    -0x10(%r8),%ebp
  shr    $0x4,%ebp
  lea    0x1(%rbp),%r12d
  mov    %r12d,%r12d
  lea    (%rcx,%r12,4),%r11
  mov    %rdi,%rax
L13:
  movzwl (%rax),%esi
  and    %edx,%esi
  shl    $0x2,%esi
  movzwl 0x2(%rax),%ebx
  and    %edx,%ebx
  or     %esi,%ebx
  shl    $0x2,%ebx
  movzwl 0x4(%rax),%esi
  and    %edx,%esi
  or     %ebx,%esi
  shl    $0x2,%esi
  movzwl 0x6(%rax),%ebx
  and    %edx,%ebx
  or     %esi,%ebx
  shl    $0x2,%ebx
  movzwl 0x8(%rax),%esi
  and    %edx,%esi
  or     %ebx,%esi
  shl    $0x2,%esi
  movzwl 0xa(%rax),%ebx
  and    %edx,%ebx
  or     %esi,%ebx
  shl    $0x2,%ebx
  movzwl 0xc(%rax),%esi
  and    %edx,%esi
  or     %ebx,%esi
  shl    $0x2,%esi
  movzwl 0xe(%rax),%ebx
  and    %edx,%ebx
  or     %esi,%ebx
  shl    $0x2,%ebx
  movzwl 0x10(%rax),%esi
  and    %edx,%esi
  or     %ebx,%esi
  shl    $0x2,%esi
  movzwl 0x12(%rax),%ebx
  and    %edx,%ebx
  or     %esi,%ebx
  shl    $0x2,%ebx
  movzwl 0x14(%rax),%esi
  and    %edx,%esi
  or     %ebx,%esi
  shl    $0x2,%esi
  movzwl 0x16(%rax),%ebx
  and    %edx,%ebx
  or     %esi,%ebx
  shl    $0x2,%ebx
  movzwl 0x18(%rax),%esi
  and    %edx,%esi
  or     %ebx,%esi
  shl    $0x2,%esi
  movzwl 0x1a(%rax),%ebx
  and    %edx,%ebx
  or     %esi,%ebx
  shl    $0x2,%ebx
  movzwl 0x1c(%rax),%esi
  and    %edx,%esi
  or     %ebx,%esi
  shl    $0x2,%esi
  add    $0x20,%rax
  add    $0x4,%rcx
  movzwl -0x2(%rax),%ebx
  and    %edx,%ebx
  or     %ebx,%esi
  mov    %esi,-0x4(%rcx)
  cmp    %r11,%rcx
  jne    L13
  shl    $0x5,%r12
  add    %r12,%rdi
  neg    %ebp
  shl    $0x4,%ebp
  lea    -0x10(%r8,%rbp,1),%r8d
  jmp    L27
L495:
  mov    %r11,%rcx
  jmp    L362
L221:
  add    $0x4,%rcx
  mov    %eax,-0x4(%rcx)
  add    $0x40,%rbx
  cmp    %r11,%rcx
  je     L89
L308:
  lea    -0x40(%rbx),%rsi
  mov    %ebp,%eax
L147:
  add    %eax,%eax
  movzwl (%rsi),%r14d
  and    $0x1,%r14d
  or     %eax,%r14d
  add    %r14d,%r14d
  movzwl 0x2(%rsi),%eax
  and    $0x1,%eax
  or     %r14d,%eax
  add    %eax,%eax
  movzwl 0x4(%rsi),%r14d
  and    $0x1,%r14d
  or     %eax,%r14d
  add    %r14d,%r14d
  add    $0x8,%rsi
  movzwl -0x2(%rsi),%eax
  and    $0x1,%eax
  or     %r14d,%eax
  cmp    %rbx,%rsi
  jne    L147
  jmp    L221
L89:
  neg    %r12d
  shl    $0x5,%r12d
  lea    -0x20(%r8,%r12,1),%r8d
  shl    $0x6,%r13
  add    %r13,%rdi
  jmp    L27
L180:
  mov    %r10d,%ecx
  sub    %r9d,%ecx
  mov    %rax,%r15
  shr    %cl,%r15
  test   %esi,%esi
  cmovs  %r15,%rax
  mov    %eax,(%r11)
  add    $0x20,%esi
  mov    %rbx,%rax
  lea    0x4(%r11),%r11
  jmp    L447
L493:
  cmp    %rdi,%rbp
  je     L38
L344:
  mov    %r9d,%esi
  sub    %r10d,%esi
  mov    %r10d,%ecx
  shl    %cl,%rax
  mov    %edx,%ebx
  and    (%rdi),%bx
  movzwl %bx,%ebx
  or     %rbx,%rax
  test   %esi,%esi
  jle    L180
L447:
  add    $0x4,%rdi
  mov    %esi,%r9d
  sub    %r10d,%r9d
  mov    %r10d,%ecx
  shl    %cl,%rax
  mov    %edx,%ebx
  and    -0x2(%rdi),%bx
  movzwl %bx,%ebx
  or     %rbx,%rax
  test   %r9d,%r9d
  jg     L493
  mov    %r10d,%ecx
  sub    %esi,%ecx
  mov    %rax,%rsi
  shr    %cl,%rsi
  test   %r9d,%r9d
  cmovs  %rsi,%rax
  mov    %eax,(%r11)
  add    $0x20,%r9d
  mov    %rbx,%rax
  lea    0x4(%r11),%r11
  jmp    L493
L38:
  neg    %r12d
  lea    -0x2(%r8,%r12,2),%r8d
L298:
  test   %r8d,%r8d
  jle    L422
  mov    %r8d,%r8d
  lea    (%rdi,%r8,2),%rbx
  mov    %r9d,%r8d
L485:
  add    $0x2,%rdi
  mov    %r8d,%r9d
  sub    %r10d,%r9d
  mov    %r10d,%ecx
  shl    %cl,%rax
  mov    %edx,%esi
  and    -0x2(%rdi),%si
  movzwl %si,%esi
  or     %rsi,%rax
  test   %r9d,%r9d
  jle    L483
L465:
  cmp    %rbx,%rdi
  jne    L395
L422:
  cmp    $0x1f,%r9d
  jg     L326
  mov    %r9d,%ecx
  shl    %cl,%rax
  mov    %eax,(%r11)
L326:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L395:
  mov    %r9d,%r8d
  jmp    L485
L483:
  mov    %r10d,%ecx
  sub    %r8d,%ecx
  mov    %rax,%r8
  shr    %cl,%r8
  test   %r9d,%r9d
  cmovs  %r8,%rax
  mov    %eax,(%r11)
  add    $0x20,%r9d
  mov    %rsi,%rax
  lea    0x4(%r11),%r11
  jmp    L465
L176:
  mov    %rcx,%r11
  jmp    L27
L168:
  mov    %rcx,%r11
  jmp    L27
L203:
  mov    %rcx,%r11
  jmp    L27
L398:
  mov    %rcx,%r11
  jmp    L27
L14:
  mov    %r11,%rcx
  jmp    L121
L453:
  mov    %r11,%rcx
  jmp    L159
L407:
  mov    %r11,%rcx
  jmp    L362
L486:
  ret
```

assistant: ```c
void IntegerPacker_16(void *stream, void *src, int nbits, int nbitt, int n, int offset) {
  unsigned int *packed = (unsigned int *)stream;
  unsigned short *unpacked = (unsigned short *)src;
  unsigned long long temp;
  unsigned int mask, token, token1, token2, token3, token4, token5, token6, token7, token8;
  int bleft, i;
  if (nbits > 16 || nbitt > nbits)
    return;
  packed += offset / 32;
  bleft = 32 - (offset % 32);
  temp = 0;
  mask = ~(0xFFFFFFFF << nbitt);
  if (bleft == 32) {
    if (nbits == 16) {
      while (n > 3) {
        token1 = (*unpacked++) & mask;
        token2 = (*unpacked++) & mask;
        token3 = (*unpacked++) & mask;
        token4 = (*unpacked++) & mask;
        *packed++ = (token1 << 16) | token2;
        *packed++ = (token3 << 16) | token4;
        n -= 4;
      }
    }
    if (nbits == 12) {
      while (n > 7) {
        token1 = (*unpacked++) & mask;
        token2 = (*unpacked++) & mask;
        token3 = (*unpacked++) & mask;
        token4 = (*unpacked++) & mask;
        *packed++ = (token1 << 20) | (token2 << 8) | (token3 >> 4);
        token1 = (*unpacked++) & mask;
        token2 = (*unpacked++) & mask;
        *packed++ = (token3 << 28) | (token4 << 16) | (token1 << 4) | (token2 >> 8);
        token3 = (*unpacked++) & mask;
        token4 = (*unpacked++) & mask;
        *packed++ = (token2 << 24) | (token3 << 12) | token4;
        n -= 8;
      }
    }
    if (nbits == 8) {
      while (n > 7) {
        token1 = (*unpacked++) & mask;
        token2 = (*unpacked++) & mask;
        token3 = (*unpacked++) & mask;
        token4 = (*unpacked++) & mask;
        *packed++ = (token1 << 24) | (token2 << 16) | (token3 << 8) | token4;
        token1 = (*unpacked++) & mask;
        token2 = (*unpacked++) & mask;
        token3 = (*unpacked++) & mask;
        token4 = (*unpacked++) & mask;
        *packed++ = (token1 << 24) | (token2 << 16) | (token3 << 8) | token4;
        n -= 8;
      }
    }
    if (nbits == 6) {
      while (n > 15) {
        token1 = (*unpacked++) & mask;
        token2 = (*unpacked++) & mask;
        token3 = (*unpacked++) & mask;
        token4 = (*unpacked++) & mask;
        token5 = (*unpacked++) & mask;
        token6 = (*unpacked++) & mask;
        token7 = (*unpacked++) & mask;
        token8 = (*unpacked++) & mask;
        *packed++ = (token1 << 26) | (token2 << 20) | (token3 << 14) | (token4 << 8) | (token5 << 2) | (token6 >> 4);
        token1 = (*unpacked++) & mask;
        token2 = (*unpacked++) & mask;
        token3 = (*unpacked++) & mask;
        *packed++ = (token6 << 28) | (token7 << 22) | (token8 << 16) | (token1 << 10) | (token2 << 4) | (token3 >> 2);
        token4 = (*unpacked++) & mask;
        token5 = (*unpacked++) & mask;
        token6 = (*unpacked++) & mask;
        token7 = (*unpacked++) & mask;
        token8 = (*unpacked++) & mask;
        *packed++ = (token3 << 30) | (token4 << 24) | (token5 << 18) | (token6 << 12) | (token7 << 6) | token8;
        n -= 16;
      }
    }
    if (nbits == 4) {
      while (n > 7) {
        token = (*unpacked++) & mask;
        token = (token << 4) | ((*unpacked++) & mask);
        token = (token << 4) | ((*unpacked++) & mask);
        token = (token << 4) | ((*unpacked++) & mask);
        token = (token << 4) | ((*unpacked++) & mask);
        token = (token << 4) | ((*unpacked++) & mask);
        token = (token << 4) | ((*unpacked++) & mask);
        *packed++ = (token << 4) | ((*unpacked++) & mask);
        n -= 8;
      }
    }
    if (nbits == 2) {
      while (n > 15) {
        token = (*unpacked++) & mask;
        token = (token << 2) | ((*unpacked++) & mask);
        token = (token << 2) | ((*unpacked++) & mask);
        token = (token << 2) | ((*unpacked++) & mask);
        token = (token << 2) | ((*unpacked++) & mask);
        token = (token << 2) | ((*unpacked++) & mask);
        token = (token << 2) | ((*unpacked++) & mask);
        token = (token << 2) | ((*unpacked++) & mask);
        token = (token << 2) | ((*unpacked++) & mask);
        token = (token << 2) | ((*unpacked++) & mask);
        token = (token << 2) | ((*unpacked++) & mask);
        token = (token << 2) | ((*unpacked++) & mask);
        token = (token << 2) | ((*unpacked++) & mask);
        token = (token << 2) | ((*unpacked++) & mask);
        token = (token << 2) | ((*unpacked++) & mask);
        *packed++ = (token << 2) | ((*unpacked++) & mask);
        n -= 16;
      }
    }
    if (nbits == 1) {
      while (n > 31) {
        token = 0;
        i = 8;
        while (i-- != 0) {
          token = (token << 1) | ((*unpacked++) & 1);
          token = (token << 1) | ((*unpacked++) & 1);
          token = (token << 1) | ((*unpacked++) & 1);
          token = (token << 1) | ((*unpacked++) & 1);
        }
        *packed++ = token;
        n -= 32;
      }
    }
  }
  if (bleft < 32)
    temp = *packed >> bleft;
  while (n > 1) {
    token = (*unpacked++) & mask;
    bleft -= nbits;
    temp = (temp << nbits) | token;
    if (bleft <= 0) {
      if (bleft < 0)
        temp >>= (-bleft);
      *packed++ = temp;
      bleft += 32;
      temp = token;
    }
    token = (*unpacked++) & mask;
    bleft -= nbits;
    temp = (temp << nbits) | token;
    if (bleft <= 0) {
      if (bleft < 0)
        temp >>= (-bleft);
      *packed++ = temp;
      bleft += 32;
      temp = token;
    }
    n -= 2;
  }
  while (n-- > 0) {
    token = (*unpacked++) & mask;
    bleft -= nbits;
    temp = (temp << nbits) | token;
    if (bleft <= 0) {
      if (bleft < 0)
        temp >>= (-bleft);
      *packed++ = temp;
      bleft += 32;
      temp = token;
    }
  }
  if (bleft < 32)
    *packed = (temp << bleft);
}
```