IopLiveDumpInitiateCorralStateChange

__int64 __fastcall IopLiveDumpInitiateCorralStateChange(__int64 a1, __int32 a2, __int64 *a3){
  __int64 v3; 
  INT64 MillisecondCounter; 
  __int64 result; 
  UINT64 SpinCount; 
  v3 = *(_QWORD *)a1;
  MillisecondCounter = 0i64;
  *a3 = 0i64;
  if( (*(_DWORD *)(v3 + 80) & 0x80u) != 0 )
    MillisecondCounter = IopLiveDumpGetMillisecondCounter(0);
  _InterlockedExchange((volatile __int32 *)(a1 + 16), 0);
  _InterlockedExchange((volatile __int32 *)(a1 + 12), a2);
  if( a2 == 7 )
    _InterlockedIncrement((volatile signed __int32 *)(a1 + 16));
  else
    IopLiveDumpProcessCorralStateChange(a1, a1 + 112);
  LODWORD(SpinCount) = 0;
  while( *(_DWORD *)(a1 + 16) != *(_DWORD *)(a1 + 20) )
    KeYieldProcessorEx(&SpinCount);
  result = *(unsigned int *)(v3 + 80);
  if( (result & 0x80u) != 0i64 )
  {
    result = IopLiveDumpGetMillisecondCounter(0) - MillisecondCounter;
    *a3 = result;
  }
  return result;
}

Referenced by:

IopLiveDumpCorralProcessors
IopLiveDumpStartDumpDataBuffering
IopLiveDumpUncorralProcessors