PopDirectedDripsResumeDevices

VOID __fastcall PopDirectedDripsResumeDevices(VOID *a1, CHAR a2){
  __int64 v4; 
  unsigned __int32 v5; 
  EVENT_DESCRIPTOR *v6; 
  unsigned __int32 v7; 
  __int16 v8; 
  signed __int32 v9; 
  signed __int32 v10; 
  v4 = *(_QWORD *)&KUSER_SHARED_DATA.InterruptTime.LowPart;
  _m_prefetchw(a1);
  v5 = *(_DWORD *)a1;
  do
  {
    v6 = (EVENT_DESCRIPTOR *)v5;
    v7 = v5;
    v5 = _InterlockedCompareExchange((volatile signed __int32 *)a1, v5, v5);
  }
  while( v7 != v5 );
  v8 = v5;
  if( (v5 & 0x10) != 0 )
  {
    *((_BYTE *)a1 + 85) = 1;
    PoBroadcastSystemState((__int64)a1 + 60, a2, v6);
    _InterlockedOr((volatile signed __int32 *)a1, 0x20u);
  }
  if( (v8 & 0x80u) != 0 )
    PopDirectedDripsDestroyBroadcast();
  if( !a2 && (v8 & 0x200) == 0 )
  {
    _m_prefetchw(&PopDirectedDripsUmTestDeviceCount);
    v9 = PopDirectedDripsUmTestDeviceCount;
    do
    {
      v10 = v9;
      v9 = _InterlockedCompareExchange(&PopDirectedDripsUmTestDeviceCount, v9, v9);
    }
    while( v10 != v9 );
    if( !v9 )
      PopFxClearDirectedDripsCandidateDeviceList();
  }
  _InterlockedAnd((volatile signed __int32 *)a1, 0xFFFFFF6F);
  if( !a2 )
    PopDirectedDripsReleaseTransitionLock(a1);
  PopDirectedDripsDiagTraceNotifyDevices(
    0,
    0i64,
    (EVENT_DESCRIPTOR *)((*(_QWORD *)&KUSER_SHARED_DATA.InterruptTime.LowPart - v4) / 0x989680ui64));
}

Referenced by:

PopDirectedDripsHandleResiliencyNotification
PopDirectedDripsWorkerRoutine