PopComputeCounterShifts

VOID __stdcall PopComputeCounterShifts(
        INT64 CounterFrequency,
        UINT64 *DistributionShift,
        UINT64 *CounterShift,
        UINT64 a4){
  bool v4; 
  int v5; 
  int v6; 
  *(_DWORD *)DistributionShift = 0;
  *(_DWORD *)CounterShift = 0;
  v4 = !_BitScanReverse((unsigned int *)&v5, HIDWORD(CounterFrequency));
  if( !v4 )
  {
    *(_DWORD *)DistributionShift = v5 + 18;
    v6 = v5 + 13;
    goto LABEL_7;
  }
  v4 = !_BitScanReverse((unsigned int *)&CounterFrequency, CounterFrequency);
  if( !v4 )
  {
    if( (unsigned int)CounterFrequency > 0xE )
      *(_DWORD *)DistributionShift = CounterFrequency - 14;
    if( (unsigned int)CounterFrequency > 0x13 )
    {
      v6 = CounterFrequency - 19;
LABEL_7:
      *(_DWORD *)CounterShift = v6;
    }
  }
}

Referenced by:

PoInitSystem