//
// sub_761FE0 from 0x761fe0 to 0x762016 (54 bytes)
//
// 28 xrefs:
// > std::_Rb_tree,std::pair const,FMODSoundTween>,std::_Select1st const,FMODSoundTween>>,std::less>,std::allocator const,FMODSoundTween>>>::erase @ 0x302cfc
// > PlayLayer::optimizeColorGroups @ 0x3163ee
// > PlayLayer::optimizeOpacityGroups @ 0x3164c2
// > PlayLayer::scanDynamicSaveObjects @ 0x317288
// > std::_Rb_tree,std::allocator>>>,std::_Select1st,std::allocator>>>>,std::less,std::allocator,std::allocator>>>>>::erase @ 0x324bb4
// > GameManager::unloadIcon @ 0x3294dc
// > LevelEditorLayer::getSongIDs @ 0x374c80
// > LevelEditorLayer::getSFXIDs @ 0x374dbe
// > std::_Rb_tree,std::less,std::allocator>::erase @ 0x3ce6aa
// > std::_Rb_tree,std::less,std::allocator>::erase @ 0x3e066e
// > EventLinkTrigger::getSaveString @ 0x3fa18a
// > SongInfoObject::getTagsString @ 0x45ba94
// > std::_Rb_tree_const_iterator::operator++ @ 0x47dfda
// > GJBaseGameLayer::claimRotationAction @ 0x47f3d6
// > std::_Rb_tree,std::pair const,SFXTriggerInstance>,std::_Select1st const,SFXTriggerInstance>>,std::less>,std::allocator const,SFXTriggerInstance>>>::erase @ 0x480b2a
// > GJEffectManager::removeTriggeredID @ 0x49b8c6
// > SetupKeyframePopup::refreshPreviewArt @ 0x574860
// > SetupKeyframePopup::onCustomButton @ 0x574b3a
// > EnterEffectInstance::animateValue @ 0x58ae76
// > std::_Rb_tree,std::less,std::allocator>::erase @ 0x5a9ed4
// > cocos2d::CCScheduler::resumeTargets @ 0x5afb56
// > cocos2d::CCActionManager::resumeTargets @ 0x5b9648
// > cocos2d::CCSet::removeAllObjects @ 0x5c1666
// > cocos2d::CCSet::anyObject @ 0x5c16c4
// > cocos2d::CCSet::removeObject @ 0x5c175e
// > cocos2d::CCSet::CCSet @ 0x5c18c8
// > cocos2d::CCPrettyPrinter::visit @ 0x5c2798
// > cocos2d::CCTouchDispatcher::touches @ 0x5faa8e
//
// 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
//
int __fastcall sub_761FE0(int a1)
{
int v1; // r2
int v3; // r3
int v4; // r2
v1 = *(_DWORD *)(a1 + 12);
if ( v1 )
{
while ( *(_DWORD *)(v1 + 8) )
v1 = *(_DWORD *)(v1 + 8);
return v1;
}
v3 = *(_DWORD *)(a1 + 4);
if ( a1 != *(_DWORD *)(v3 + 12) )
return *(_DWORD *)(a1 + 4);
while ( 1 )
{
v4 = *(_DWORD *)(v3 + 4);
if ( *(_DWORD *)(v4 + 12) != v3 )
break;
v3 = *(_DWORD *)(v3 + 4);
}
if ( v4 == *(_DWORD *)(v3 + 12) )
return v3;
return v4;
}