PopPowerAggregatorRecordIntent

int __fastcall PopPowerAggregatorRecordIntent(
        __int64 a1,
        unsigned int a2,
        unsigned int a3,
        unsigned int a4,
        INT64 a5,
        INT64 a6,
        int a7){
  _OWORD *v7; 
  int v9; 
  _OWORD *v11; 
  char *v13; 
  unsigned __int64 v14; 
  __int128 v15; 
  __int64 v16; 
  UINT64 QpcTimeStamp; 

  v7 = (_OWORD *)a5;
  v9 = a7;
  v11 = (_OWORD *)a6;
  PopPowerAggregatorDiagTraceHandleIntent(a2, a3, a4, a5, a6, a7);
  v13 = (char *)&PopIrpWorkerControlEvent + 144 * ((*(&PopIrpWorkerControlEvent + 3320) - 1) & 0x1F) + 3328;
  if( *(_DWORD *)v13 != 1
    || *((_DWORD *)v13 + 6) != a2
    || *((_DWORD *)v13 + 8) != a4
    || *((_DWORD *)v13 + 34) != v9
    || !PopPowerAggregatorAreTargetStatesEqual((INT64 *)v13 + 5, (INT64)v7)
    || !PopPowerAggregatorAreTargetStatesEqual((INT64 *)v13 + 11, (INT64)v11)
    || (LODWORD(v16) = KeQueryInterruptTimePrecise(&QpcTimeStamp), v14 = v16 - *((_QWORD *)v13 + 1), v14 >= 0x2FAF080) )
  {
    LODWORD(v14) = PopPowerAggregatorAllocateLogEntry((INT64)&PopIrpWorkerControlEvent + 3008, 1i64);
    *(_DWORD *)(v14 + 24) = a2;
    *(_DWORD *)(v14 + 28) = a3;
    *(_DWORD *)(v14 + 32) = a4;
    *(_OWORD *)(v14 + 40) = *v7;
    *(_OWORD *)(v14 + 56) = v7[1];
    *(_OWORD *)(v14 + 72) = v7[2];
    *(_OWORD *)(v14 + 88) = *v11;
    *(_OWORD *)(v14 + 104) = v11[1];
    v15 = v11[2];
    *(_DWORD *)(v14 + 136) = v9;
    *(_OWORD *)(v14 + 120) = v15;
  }
  return v14;
}

Referenced by:

PopPowerAggregatorHandleIntentUnsafe