/* Assign code to each symbol based on the code length array. */
VOID MakeCode(IN INT32 LoopVar8, IN UINT8 Len[], OUT UINT16 Code[])
/* Assign code to each symbol based on the code length array. */
VOID MakeCode(IN INT32 LoopVar8, IN UINT8 Len[], OUT UINT16 Code[])
{
  INT32   LoopVar1;
  UINT16  Start[18];
  Start[1] = 0;
  for (LoopVar1 = 1; LoopVar1 <= 16; LoopVar1++) {
    Start[LoopVar1 + 1] = (UINT16)((Start[LoopVar1] + mLenCnt[LoopVar1]) << 1);
  }
  for (LoopVar1 = 0; LoopVar1 < LoopVar8; LoopVar1++) {
    Code[LoopVar1] = Start[Len[LoopVar1]]++;
  }
}