PopPluginDevicePower

CHAR __fastcall PopPluginDevicePower(__int64 a1, char a2, __int64 a3){
  INT64 v3; 
  unsigned int v5; 
  CHAR result; 
  INT64 v7; 
  v3 = *(_QWORD *)(a1 + 56);
  if( a2 )
  {
    v5 = 0;
    if( *(int *)(v3 + 132) > 0 && _InterlockedExchangeAdd((volatile signed __int32 *)(v3 + 132), 0xFFFFFFFF) == 1 )
      PopPepUpdateConstraints(v3, 4i64, 1);
  }
  else
  {
    v5 = 4;
  }
  result = PopPepProcessEvent(v3, 0i64, v5, 6ui64, v7, a3);
  if( result )
  {
    if( !a3 )
      PopFxBugCheck(0x612ui64, 0i64, 0i64, 0i64);
  }
  return result;
}

Referenced by:

PopFxCompleteDevicePowerRequired
PopFxProcessWork