HalpEfiLockOutRuntimeCallsForSystemSleep

INT64 __fastcall HalpEfiLockOutRuntimeCallsForSystemSleep(CHAR a1){
  INT64 result; 
  __int64 v3; 
  __int64 v4; 
  __int64 v5; 
  result = HalQueryMaximumProcessorCount();
  if( (_DWORD)result )
  {
    v3 = 0i64;
    v4 = (unsigned int)result;
    do
    {
      result = HalpInterruptProcessorPcr;
      v5 = *(_QWORD *)(v3 + HalpInterruptProcessorPcr);
      if( v5 )
      {
        if( a1 )
        {
          _InterlockedAnd((volatile signed __int32 *)(v5 + 224), 0x7FFFFFFFu);
        }
        else
        {
          _m_prefetchw((const void *)(v5 + 224));
          for( result = (unsigned int)_InterlockedOr((volatile signed __int32 *)(v5 + 224), 0x80000000);
                (result & 0x1FF) != 0;
                result = *(unsigned int *)(v5 + 224) )
          {
            _mm_pause();
          }
        }
      }
      v3 += 8i64;
      --v4;
    }
    while( v4 );
  }
  return result;
}

Referenced by:

HalpDispatchSystemStateTransition