KiSetDpcRequestFlag

NTSTATUS __stdcall KiSetDpcRequestFlag(UINT16 *a1, INT16 a2){
  unsigned __int16 v2; 
  UINT16 v3; 
  unsigned __int16 *v5; 
  __int16 v6; 
  unsigned __int16 v7; 
  unsigned int v8; 

  v8 = 0;
  _m_prefetchw(a1);
  v2 = *a1;
  v3 = *a1;
  if( v3 != _InterlockedCompareExchange16((volatile signed __int16 *)a1, a2 | v2, v2) )
  {
    do
    {
      RtlBackoff(&v8);
      _m_prefetchw(v5);
      v2 = *v5;
      v7 = *v5;
    }
    while( v7 != _InterlockedCompareExchange16((volatile signed __int16 *)v5, v6 | v2, v2) );
  }
  return v2;
}

Referenced by:

KiInsertQueueDpc
KiRequestTimer2Expiration