IopRemoveDeviceRelationsFromList

__int64 __fastcall IopRemoveDeviceRelationsFromList(unsigned int **a1){
  unsigned int *v1; 
  unsigned int v3; 
  int v5; 
  __int64 v6; 
  v1 = *a1;
  v5 = 0;
  v3 = *v1;
  while( (--v3 & 0x80000000) == 0 )
  {
    PipDeviceObjectListElementAt(*a1, v3, &v6, &v5, 0i64);
    if( !v5 )
      PipDeviceObjectListRemove((_DEVICE_OBJECT_LIST *)*a1, v3);
  }
  return 0i64;
}

Referenced by:

PnpProcessQueryRemoveAndEject