RtlGenerateQpcToIncrementConstants

UINT64 __stdcall RtlGenerateQpcToIncrementConstants(UINT64 QpcFrequency, PSTR LeftShift){
  UINT64 result; 
  char v4; 
  CHAR LeftShifta; 

  LeftShifta = 0;
  result = RtlpComputeFraction(0x989680ui64, (unsigned int)QpcFrequency, &LeftShifta);
  v4 = LeftShifta;
  if( LeftShifta < 0 )
  {
    if( result + (unsigned int)(1 << ~LeftShifta) >= result )
      result += (unsigned int)(1 << ~LeftShifta);
    result >>= -LeftShifta;
    v4 = 0;
  }
  *LeftShift = v4;
  return result;
}

Referenced by:

KeSetTimeAdjustment
KiSetupTimeIncrement