KeUpdatePendingQosRequest

CHAR __fastcall KeUpdatePendingQosRequest(INT64 a1){
  signed __int32 v1; 
  CHAR v2; 
  if( (*(_DWORD *)(a1 + 236) & 0x300) != 0 )
  {
    v1 = _InterlockedIncrement(&KiPendingVirtualHeteroRequest);
    if( v1 != 1 )
      return v1;
    if( *(_BYTE *)(a1 + 33) )
    {
      v2 = 0;
LABEL_5:
      LOBYTE(v1) = KiSetVirtualHeteroClockIntervalRequest(v2);
      return v1;
    }
  }
  else
  {
    v1 = _InterlockedExchangeAdd(&KiPendingVirtualHeteroRequest, 0xFFFFFFFF);
    if( v1 != 1 )
      return v1;
    if( *(_BYTE *)(a1 + 33) )
    {
      v2 = 1;
      goto LABEL_5;
    }
  }
  if( !qword_140C31DD8 )
    word_140C31DA2 = KiClockTimerOwner + 1280;
  KiInsertQueueDpc((_KDPC *)&KiSetVirtualHeteroClockIntervalRequestDpc, 0i64, 0i64, 0i64, 0);
  return v1;
}

Referenced by:

KeCheckAndApplyBamQos
KeClockInterruptNotify
PpmIdleExecuteTransition