IopCallArbiter

NTSTATUS __stdcall IopCallArbiter(_PI_RESOURCE_ARBITER_ENTRY *ArbiterEntry, _ARBITER_ACTION Command, VOID *Input1){
  _ARBITER_INTERFACE *ArbiterInterface; 
  _ARBITER_ACTION v5; 
  __int128 v6; 
  NTSTATUS result; 
  __int128 *v8; 
  __int128 v9; 
  __int128 v10; 
  __int128 v11; 

  ArbiterInterface = ArbiterEntry->ArbiterInterface;
  v5 = Command;
  v10 = 0i64;
  v11 = 0i64;
  switch( Command )
  {
    case ArbiterActionTestAllocation:
      DWORD2(v10) = 0;
      *(_QWORD *)&Command = 0i64;
      *(_QWORD *)&v11 = 0i64;
LABEL_12:
      *(_QWORD *)&v10 = Input1;
LABEL_13:
      v8 = &v10;
      return ArbiterInterface->ArbiterHandler(
               ArbiterInterface->Context,
               (_ARBITER_ACTION)*(_QWORD *)&Command,
               (_ARBITER_PARAMETERS *)v8);
    case ArbiterActionRetestAllocation:
      *(_QWORD *)&v10 = Input1;
      DWORD2(v10) = 0;
      *(_QWORD *)&v11 = 0i64;
      ArbiterInterface->ArbiterHandler(
        ArbiterInterface->Context,
        ArbiterActionRetestAllocation,
        (_ARBITER_PARAMETERS *)&v10);
LABEL_19:
      *(_QWORD *)&Command = (unsigned int)v5;
      goto LABEL_12;
    case ArbiterActionCommitAllocation:
LABEL_9:
      v8 = 0i64;
      return ArbiterInterface->ArbiterHandler(
               ArbiterInterface->Context,
               (_ARBITER_ACTION)*(_QWORD *)&Command,
               (_ARBITER_PARAMETERS *)v8);
  }
  if( Command != ArbiterActionQueryAllocatedResources )
  {
    if( Command != ArbiterActionWriteReservedResources )
    {
      if( Command == ArbiterActionQueryConflict )
      {
        *(_QWORD *)&Command = 6i64;
        v10 = *(_OWORD *)Input1;
        v11 = *((_OWORD *)Input1 + 1);
        goto LABEL_13;
      }
      if( Command == ArbiterActionQueryArbitrate )
      {
        v6 = *(_OWORD *)((char *)Input1 + 40);
        *((_QWORD *)Input1 + 6) = &v9;
        v9 = v6;
        *((_QWORD *)Input1 + 5) = &v9;
        *(_QWORD *)&v10 = &v9;
        result = ArbiterInterface->ArbiterHandler(
                   ArbiterInterface->Context,
                   ArbiterActionQueryArbitrate,
                   (_ARBITER_PARAMETERS *)&v10);
        *(_OWORD *)((char *)Input1 + 40) = v9;
        return result;
      }
      if( Command != ArbiterActionBootAllocation )
        return -1073741811;
      goto LABEL_19;
    }
    goto LABEL_9;
  }
  return -1073741822;
}

Referenced by:

IopQueryConflictListInternal
IopSetupArbiterAndTranslators
PnpReleaseBootResourcesForFilteredRequirements
PnpReleaseResourcesInternal