/* Outputs the code length array for the Extra Set or the Position Set. */
VOID WritePTLen(IN INT32 LoopVar8, IN INT32 nbit, IN INT32 Special)
/* Outputs the code length array for the Extra Set or the Position Set. */
VOID WritePTLen(IN INT32 LoopVar8, IN INT32 nbit, IN INT32 Special)
{
  INT32  LoopVar1;
  INT32  LoopVar3;
  while (LoopVar8 > 0 && mPTLen[LoopVar8 - 1] == 0) {
    LoopVar8--;
  }
  PutBits (nbit, LoopVar8);
  LoopVar1 = 0;
  while (LoopVar1 < LoopVar8) {
    LoopVar3 = mPTLen[LoopVar1++];
    if (LoopVar3 <= 6) {
      PutBits (3, LoopVar3);
    } else {
      PutBits (LoopVar3 - 3, (1U << (LoopVar3 - 3)) - 2);
    }
    if (LoopVar1 == Special) {
      while (LoopVar1 < 6 && mPTLen[LoopVar1] == 0) {
        LoopVar1++;
      }
      PutBits (2, (LoopVar1 - 3) & 3);
    }
  }
}