//
// sub_CFAB74 from 0xcfab74 to 0xcfabd4 (96 bytes)
//
// 39 xrefs:
// > std::_Rb_tree,std::pair const,FMODSoundTween>,std::_Select1st const,FMODSoundTween>>,std::less>,std::allocator const,FMODSoundTween>>>::_M_erase_aux @ 0x5b3cc0
// > PlayLayer::optimizeColorGroups @ 0x5d82d0
// > PlayLayer::optimizeOpacityGroups @ 0x5d8470
// > PlayLayer::scanDynamicSaveObjects @ 0x5d8684
// > std::_Rb_tree,std::allocator>>>,std::_Select1st,std::allocator>>>>,std::less,std::allocator,std::allocator>>>>>::_M_erase_aux @ 0x5f2470
// > GameManager::unloadIcon @ 0x5fca4c
// > LevelEditorLayer::getSongIDs @ 0x67950c
// > LevelEditorLayer::getSFXIDs @ 0x679898
// > std::_Rb_tree,std::less,std::allocator>::_M_erase_aux @ 0x7318a0
// > std::_Rb_tree,std::less,std::allocator>::_M_erase_aux @ 0x7493d8
// > EventLinkTrigger::getSaveString @ 0x7830ac
// > SongInfoObject::getTagsString @ 0x833eec
// > SongInfoObject::getTagsString @ 0x833f9c
// > GJBaseGameLayer::claimRotationAction @ 0x86e2d8
// > GJBaseGameLayer::addRemapTargets @ 0x88134c
// > GJBaseGameLayer::addRemapTargets @ 0x881380
// > GJBaseGameLayer::calculateColorGroups @ 0x881624
// > GJBaseGameLayer::optimizeMoveGroups @ 0x881804
// > GJBaseGameLayer::optimizeMoveGroups @ 0x881884
// > GJBaseGameLayer::activateEventTrigger @ 0x8892ec
// > GJBaseGameLayer::activateEventTrigger @ 0x8894b8
// > GJBaseGameLayer::activateEventTrigger @ 0x889584
// > std::_Rb_tree,std::pair const,SFXTriggerInstance>,std::_Select1st const,SFXTriggerInstance>>,std::less>,std::allocator const,SFXTriggerInstance>>>::_M_erase_aux @ 0x88cc7c
// > GJBaseGameLayer::activateSFXEditTrigger @ 0x88d2f0
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x897ab0
// > GJEffectManager::removeTriggeredID @ 0x8a86a8
// > SetupKeyframePopup::refreshPreviewArt @ 0xa3d038
// > SetupKeyframePopup::onCustomButton @ 0xa3d32c
// > SelectEventLayer::onCustomToggleTriggerValue @ 0xa540b4
// > EnterEffectInstance::animateValue @ 0xa6c390
// > std::_Rb_tree,std::less,std::allocator>::_M_erase_aux @ 0xaa859c
// > cocos2d::CCScheduler::resumeTargets @ 0xab37d4
// > cocos2d::CCActionManager::resumeTargets @ 0xac5174
// > cocos2d::CCSet::removeAllObjects @ 0xad2d60
// > cocos2d::CCSet::anyObject @ 0xad2e38
// > cocos2d::CCSet::removeObject @ 0xad30a4
// > cocos2d::CCSet::CCSet @ 0xad3280
// > cocos2d::CCPrettyPrinter::visit @ 0xad557c
// > cocos2d::CCTouchDispatcher::touches @ 0xb3f274
//
// 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
//
__int64 __fastcall sub_CFAB74(__int64 a1)
{
__int64 result; // x0
__int64 v3; // x1
result = *(_QWORD *)(a1 + 24);
if ( result )
{
while ( *(_QWORD *)(result + 16) )
result = *(_QWORD *)(result + 16);
}
else
{
v3 = *(_QWORD *)(a1 + 8);
if ( a1 == *(_QWORD *)(v3 + 24) )
{
while ( 1 )
{
result = *(_QWORD *)(v3 + 8);
if ( *(_QWORD *)(result + 24) != v3 )
break;
v3 = *(_QWORD *)(v3 + 8);
}
if ( result == *(_QWORD *)(v3 + 24) )
return v3;
}
else
{
return *(_QWORD *)(a1 + 8);
}
}
return result;
}