KeCountSetBitsAffinityEx

UINT64 __stdcall KeCountSetBitsAffinityEx(_KAFFINITY_EX *Affinity){
  unsigned int Count; 
  unsigned int v2; 
  unsigned __int64 *Bitmap; 
  __int64 v4; 
  unsigned __int64 v5; 
  Count = Affinity->Count;
  v2 = 0;
  if( (_WORD)Count )
  {
    Bitmap = Affinity->Bitmap;
    v4 = Count;
    do
    {
      v5 = *Bitmap++;
      v2 += (unsigned int)((0x101010101010101i64
                          * ((((v5 - ((v5 >> 1) & 0x5555555555555555i64)) & 0x3333333333333333i64)
                            + (((v5 - ((v5 >> 1) & 0x5555555555555555i64)) >> 2) & 0x3333333333333333i64)
                            + ((((v5 - ((v5 >> 1) & 0x5555555555555555i64)) & 0x3333333333333333i64)
                              + (((v5 - ((v5 >> 1) & 0x5555555555555555i64)) >> 2) & 0x3333333333333333i64)) >> 4)) & 0xF0F0F0F0F0F0F0Fi64)) >> 32) >> 24;
      --v4;
    }
    while( v4 );
  }
  return v2;
}

Referenced by:

KeFlushProcessWriteBuffers
KeSynchronizeAddressPolicy
KeSynchronizeSecurityDomain
KiForceIdleUpdateSchedulerParkState
KiForwardTick
KiInitializeKernel
PpmHeteroUpdateHgsConfiguration
PpmIdleInitializeConcurrency
PpmParkReportParkedCores
PpmParkReportUnparkedCores
PpmParkUnblockIdle
PpmPerfApplyProcessorStates