KiIntSteerDistributeInterrupts

NTSTATUS __stdcall KiIntSteerDistributeInterrupts(){
  INT64 v0; 
  ULONG_PTR *v1; 
  INT64 v2; 
  __int64 v3; 
  _GROUP_AFFINITY *i; 
  INT64 v6; 
  INT64 v7; 
  INT64 Mask; 
  INT64 v9[2]; 

  v1 = *(ULONG_PTR **)&KiIntTrackRootList;
  for( *(_OWORD *)v9 = 0i64; v1 != &KiIntTrackRootList; v1 = *(ULONG_PTR **)v1 )
  {
    if( *((_BYTE *)v1 + 132) )
    {
      v2 = *((_QWORD *)v1 + 22);
      v3 = *((_QWORD *)v1 + 20);
      if( v2 != v3 )
      {
        LOWORD(v9[1]) = *((_WORD *)v1 + 92);
        if( LOWORD(v9[1]) == *((_WORD *)v1 + 84) )
          v6 = v2 & ~v3;
        else
          v6 = v2;
        v9[0] = v6;
        KiIntSteerUpdateDeviceInterruptMask((INT64)v9, 0i64, v0);
      }
    }
  }
  for( i = *(_GROUP_AFFINITY **)&KiIntTrackRootList;
        i != (_GROUP_AFFINITY *)&KiIntTrackRootList;
        i = (_GROUP_AFFINITY *)i->Mask )
  {
    if( BYTE4(i[8].Mask) && i[11].Mask != i[10].Mask )
    {
      KiIntSteerSetDestination((ULONG_PTR)i, i + 11);
      LOWORD(v9[1]) = i[11].Group;
      if( i[10].Group == LOWORD(v9[1]) )
        Mask = i[10].Mask & ~i[11].Mask;
      else
        Mask = i[10].Mask;
      v9[0] = Mask;
      KiIntSteerUpdateDeviceInterruptMask((INT64)v9, 1i64, v7);
      i[10].Group = i[11].Group;
      i[10].Mask = i[11].Mask;
    }
  }
  return 0;
}

Referenced by:

KeIntSteerPeriodic