Found at 80011104
Summary
Takes a caller passed source select value and an index for the source. Based on the source, writes values to the library context so that assets can continue to be loaded with cdlib_asset_load calls by callers of this function without the caller needing to know which is the next asset. Then queues a file load so the asset can be loaded into ram.
Behavior
Check the first parameter which is the source select value, if the value is 0 the caller is passing an index to the gameAssetTable. For any other value the index is for the gameAssetPtrTable. Both branches set three values which are part of the cd library context: cdlib_asset_ptr, cdlib_asset_ptr_table_index, cdlib_asset_table_group_index. The branches also get the load address and cdFileTableIndex for a cdlib_queue_file_load at the end of this function.
The branch for source select == 0 uses the caller passed index to directly index the gameAssetTable and get the loadAddress and cdFileTableIndex for a game asset. It then assigns the start address of the gameAssetTable to cdlib_asset_ptr, -1 to cdlib_asset_ptr_table_index and the caller passed index to cdlib_asset_table_group_index.
The else branch uses the caller passed index to index the gameAssetPtrTable, from here the gameAssetPointer member is accessed and its value assigned to cdlib_asset_ptr. Using the cdlib_asset_ptr the function gets the cdFileTableIndex and loadAddress of the gameAssetEntry pointed to by cdlib_asset_ptr. The cdlib_asset_table_group_index is then set to 0 and the cdlib_asset_ptr_table_index is set to the caller passed index.
The two branches then converge and an unknown variable which is part of the CD library context is set to 0 and a call to queue the file load using the the values from gameAssetEntry selected by one of the two branches is made.
Notes
The dividing line between groups in the gameAssetTable are the gameAssetEntries which have 0, -1 and void*(0) as its member values in that order. However when using source select == 0 the group can be considered to be the entire table.