IopSelectNextConfiguration

UINT8 __stdcall IopSelectNextConfiguration(
        _PNP_RESOURCE_REQUEST *RequestTable,
        UINT64 RequestTableCount,
        _LIST_ENTRY *ActiveArbiterList){
  unsigned int v3; 
  unsigned int v5; 
  unsigned int v7; 
  void **p_ReqList; 
  _QWORD *v9; 
  void **v11; 
  void **v12; 

  v3 = 0;
  v5 = RequestTableCount;
  v7 = 0;
  if( (_DWORD)RequestTableCount )
  {
    p_ReqList = &RequestTable->ReqList;
    do
    {
      v9 = *p_ReqList;
      IopAddRemoveReqDescs(
        (_REQ_DESC **)(**((_QWORD **)*p_ReqList + 2) + 24i64),
        *(unsigned int *)(**((_QWORD **)*p_ReqList + 2) + 20i64),
        0i64,
        0);
      v9[2] += 8i64;
      if( v9[2] < v9[3] )
        break;
      ++v7;
      p_ReqList += 8;
      v9[2] = v9 + 5;
    }
    while( v7 < v5 );
  }
  if( v7 == v5 )
    return 0;
  if( v5 )
  {
    v11 = &RequestTable->ReqList;
    do
    {
      v12 = (void **)*v11;
      IopAddRemoveReqDescs(
        (_REQ_DESC **)(**((_QWORD **)*v11 + 2) + 24i64),
        *(unsigned int *)(**((_QWORD **)*v11 + 2) + 20i64),
        ActiveArbiterList,
        1u);
      if( v12[2] != v12 + 5 )
        break;
      ++v3;
      v11 += 8;
    }
    while( v3 < v5 );
  }
  return 1;
}

Referenced by:

PnpFindBestConfigurationWorker