//
// sub_1000B4D20 from 0x1000b4d20 to 0x1000b4dd8 (184 bytes)
//
// 30 xrefs:
// > GJLevelList::hasMatchingLevels @ 0x1000b0ff4
// > CustomSongWidget::processNextMultiAsset @ 0x1000fe5f0
// > PlayLayer::optimizeColorGroups @ 0x100117498
// > PlayLayer::optimizeOpacityGroups @ 0x1001175f8
// > PlayLayer::scanDynamicSaveObjects @ 0x1001177b0
// > PlayLayer::scanDynamicSaveObjects @ 0x1001177c8
// > PlayLayer::scanDynamicSaveObjects @ 0x1001177f0
// > SongInfoObject::addTags @ 0x1001593d8
// > SetupKeyframePopup::refreshPreviewArt @ 0x1001b58d8
// > SetupKeyframePopup::onCustomButton @ 0x1001b5c64
// > GJBaseGameLayer::addRemapTargets @ 0x1001dfb28
// > GJBaseGameLayer::optimizeMoveGroups @ 0x1001dffa4
// > GJBaseGameLayer::optimizeMoveGroups @ 0x1001dffdc
// > GJBaseGameLayer::optimizeMoveGroups @ 0x1001e0008
// > GJBaseGameLayer::optimizeMoveGroups @ 0x1001e0034
// > GJBaseGameLayer::optimizeMoveGroups @ 0x1001e004c
// > GJBaseGameLayer::optimizeMoveGroups @ 0x1001e0064
// > GJBaseGameLayer::optimizeMoveGroups @ 0x1001e0080
// > GJBaseGameLayer::optimizeMoveGroups @ 0x1001e0098
// > GJBaseGameLayer::optimizeMoveGroups @ 0x1001e00b4
// > GJBaseGameLayer::optimizeMoveGroups @ 0x1001e00cc
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x1001e0980
// > GJBaseGameLayer::calculateColorGroups @ 0x1001e2310
// > GJBaseGameLayer::activateSFXEditTrigger @ 0x100203250
// > LevelEditorLayer::getSongIDs @ 0x10035d758
// > LevelEditorLayer::getSongIDs @ 0x10035d7ac
// > LevelEditorLayer::getSFXIDs @ 0x10035d9f4
// > EventLinkTrigger::customObjectSetup @ 0x10038e8f4
// > EditorUI::updateObjectInfoLabel @ 0x1003e7c08
// > SelectEventLayer::onCustomToggleTriggerValue @ 0x1004090a8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
_DWORD *__fastcall sub_1000B4D20(__int64 a1, int *a2, _DWORD *a3)
{
__int64 v5; // x9
_QWORD *v6; // x22
int v7; // w8
_QWORD *v8; // x21
int v9; // w9
_DWORD *v10; // x23
v6 = (_QWORD *)(a1 + 8);
v5 = *(_QWORD *)(a1 + 8);
if ( v5 )
{
v7 = *a2;
while ( 1 )
{
while ( 1 )
{
v8 = (_QWORD *)v5;
v9 = *(_DWORD *)(v5 + 28);
if ( v7 >= v9 )
break;
v5 = *v8;
v6 = v8;
if ( !*v8 )
goto LABEL_10;
}
if ( v9 >= v7 )
break;
v5 = v8[1];
if ( !v5 )
{
v6 = v8 + 1;
goto LABEL_10;
}
}
}
else
{
v8 = (_QWORD *)(a1 + 8);
LABEL_10:
v10 = operator new(0x20u);
v10[7] = *a3;
sub_10000A0F0((__int64 **)a1, (__int64)v8, v6, v10);
return v10;
}
return v8;
}