PopFxDerefAndCompleteDirectedPowerTransition

NTSTATUS __stdcall PopFxDerefAndCompleteDirectedPowerTransition(ULONG_PTR BugCheckParameter3){
  NTSTATUS result; 
  int v3; 

  result = _InterlockedCompareExchange((volatile signed __int32 *)(*(_QWORD *)&BugCheckParameter3 + 824i64), 0, 0);
  if( (result & 0x20) == 0 )
    PopFxBugCheck(0x910u, 1u, BugCheckParameter3, 0);
  v3 = _InterlockedDecrement((volatile signed __int32 *)(*(_QWORD *)&BugCheckParameter3 + 1160i64));
  if( !v3 )
    result = PopFxCompleteDirectedPowerTransition(BugCheckParameter3);
  if( v3 < 0 )
    PopFxBugCheck(0x910u, 2u, BugCheckParameter3, 0);
  return result;
}

Referenced by:

PoFxCompleteDirectedPowerDown
PoFxReportDevicePoweredOn
PopFxNotifyPreDIrpCompletion