HalpReleaseSecondaryIcEntryShared

signed __int32 __fastcall HalpReleaseSecondaryIcEntryShared(INT64 a1, char a2){
  signed __int32 result; 

  result = _InterlockedDecrement((volatile signed __int32 *)(a1 + 112));
  if( a2 )
  {
    if( result == 1 )
    {
      result = _InterlockedCompareExchange((volatile signed __int32 *)(a1 + 116), 0, 0);
      if( result )
      {
        if( KeGetCurrentIrql() <= 2u )
          return KeSetEvent((PRKEVENT)(a1 + 120), 0, 0);
        else
          return HalpInsertSecondarySignalList(a1);
      }
    }
  }
  return result;
}

Referenced by:

HalpDisableSecondaryInterrupt
HalpEnableSecondaryInterrupt
HalpHandleMaskUnmaskSecondaryInterrupt
HalpInterruptRequestSecondaryInterrupt
HalpQueryPrimaryInterruptInformation
HalpUnregisterSecondaryIcInterface