//
// sub_762018 from 0x762018 to 0x762054 (60 bytes)
//
// 62 xrefs:
// > std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos @ 0x2ee91a
// > GameToolbox::stringSetupToMap @ 0x2eea32
// > FMODAudioEngine::updateChannel @ 0x3031ba
// > std::set,std::allocator>::insert @ 0x315038
// > std::_Rb_tree,std::pair,std::_Identity>,std::less>,std::allocator>>::_M_get_insert_unique_pos @ 0x31d3a2
// > std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos @ 0x324d00
// > std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_hint_unique_pos @ 0x324d58
// > std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos @ 0x3250fc
// > std::map,std::allocator>>::operator[] @ 0x32518e
// > std::_Rb_tree>>,std::_Select1st>>>,std::less,std::allocator>>>>::_M_get_insert_unique_pos @ 0x32526a
// > std::map>,std::less,std::allocator>>>>::operator[] @ 0x325300
// > std::_Rb_tree,std::allocator>>>,std::_Select1st,std::allocator>>>>,std::less,std::allocator,std::allocator>>>>>::_M_get_insert_unique_pos @ 0x325470
// > std::map,std::allocator>>,std::less,std::allocator,std::allocator>>>>>::operator[] @ 0x325522
// > std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_hint_unique_pos @ 0x34dad2
// > std::_Rb_tree,std::less,std::allocator>::_M_get_insert_unique_pos @ 0x3701f4
// > EditorUI::updateObjectInfoLabel @ 0x3a0edc
// > GJLevelList::hasMatchingLevels @ 0x3ce2d2
// > std::_Rb_tree,std::less,std::allocator>::_M_insert_unique @ 0x3ce3bc
// > std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos @ 0x3dcbb8
// > std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_hint_unique_pos @ 0x3dcc10
// > CustomSongWidget::processNextMultiAsset @ 0x3dff82
// > EventLinkTrigger::customObjectSetup @ 0x3ed1c8
// > SpawnTriggerGameObject::changeRemap @ 0x3ed968
// > std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos @ 0x4041da
// > std::map,std::allocator>>::operator[] @ 0x40426c
// > std::set,std::less>,std::allocator>>::insert @ 0x413d76
// > std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos @ 0x4368c2
// > std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_hint_unique_pos @ 0x43691a
// > SongInfoObject::addTags @ 0x45ad70
// > std::map,std::allocator>>::operator[] @ 0x45b872
// > std::_Rb_tree,std::tuple,std::_Identity>,std::less>,std::allocator>>::_M_insert_unique const&> @ 0x4816b2
// > std::_Rb_tree,std::pair const,SFXTriggerInstance>,std::_Select1st const,SFXTriggerInstance>>,std::less>,std::allocator const,SFXTriggerInstance>>>::_M_get_insert_unique_pos @ 0x4848c4
// > std::_Rb_tree,std::pair const,std::pair>,std::_Select1st const,std::pair>>,std::less>,std::allocator const,std::pair>>>::_M_get_insert_unique_pos @ 0x48c6b8
// > std::map,std::pair,std::less>,std::allocator const,std::pair>>>::operator[] @ 0x48c774
// > std::_Rb_tree,std::pair const,int>,std::_Select1st const,int>>,std::less>,std::allocator const,int>>>::_M_get_insert_unique_pos @ 0x48c95c
// > std::_Rb_tree,std::pair const,int>,std::_Select1st const,int>>,std::less>,std::allocator const,int>>>::_M_get_insert_hint_unique_pos @ 0x48c9c4
// > std::_Rb_tree,std::pair const,int>,std::_Select1st const,int>>,std::less>,std::allocator const,int>>>::_M_get_insert_unique_pos @ 0x48db74
// > std::_Rb_tree,std::pair const,int>,std::_Select1st const,int>>,std::less>,std::allocator const,int>>>::_M_get_insert_hint_unique_pos @ 0x48dbdc
// > std::_Rb_tree,std::pair const,std::vector>>,std::_Select1st const,std::vector>>>,std::less>,std::allocator const,std::vector>>>>::_M_get_insert_unique_pos @ 0x48dd2a
// > std::_Rb_tree,std::pair const,std::vector>>,std::_Select1st const,std::vector>>>,std::less>,std::allocator const,std::vector>>>>::_M_get_insert_hint_unique_pos @ 0x48dd92
// > std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos @ 0x49533c
// > GJEffectManager::storeTriggeredID @ 0x49b9d8
// > std::map,std::allocator>>::operator[] @ 0x49d874
// > std::_Rb_tree,std::pair const,std::vector>>,std::_Select1st const,std::vector>>>,std::less>,std::allocator const,std::vector>>>>::_M_get_insert_unique_pos @ 0x49e374
// > std::map,std::vector>,std::less>,std::allocator const,std::vector>>>>::operator[] @ 0x49e436
// > std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos @ 0x53c1b0
// > std::map,std::allocator>>::operator[] @ 0x53c29c
// > SelectEventLayer::onCustomToggleTriggerValue @ 0x57edf0
// > EnterEffectInstance::animateValue @ 0x58aef2
// > std::_Rb_tree,std::pair const,int>,std::_Select1st const,int>>,std::less>,std::allocator const,int>>>::_M_get_insert_unique_pos @ 0x596bf4
// > std::map,int,std::less>,std::allocator const,int>>>::operator[] @ 0x596cac
// > cocos2d::extension::CCControl::addHandleOfControlEvent @ 0x5a0f9a
// > cocos2d::extension::CCScrollView::registerScriptHandler @ 0x5a93fe
// > cocos2d::extension::CCTableView::_addCellIfNecessary @ 0x5a99a2
// > cocos2d::CCSet::addObject @ 0x5c160a
// > cocos2d::CCBMFontConfiguration::parseConfigFile @ 0x5cc854
// > std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_insert_unique> @ 0x5df6ce
// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile @ 0x5e9b42
// > std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos @ 0x5f0586
// > sub_5F05AC @ 0x5f06e8
// > std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_unique_pos @ 0x5ff8dc
// > std::map,std::allocator>>::operator[] @ 0x5ff99a
//
// 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_762018(_DWORD *a1)
{
int v1; // r2
int v3; // r3
int v4; // r2
bool v5; // zf
if ( !*a1 && a1 == *(_DWORD **)(a1[1] + 4) )
return a1[3];
v1 = a1[2];
if ( v1 )
{
while ( *(_DWORD *)(v1 + 12) )
v1 = *(_DWORD *)(v1 + 12);
return v1;
}
v3 = a1[1];
if ( a1 != *(_DWORD **)(v3 + 8) )
return a1[1];
do
{
v4 = *(_DWORD *)(v3 + 4);
v5 = *(_DWORD *)(v4 + 8) == v3;
v3 = v4;
}
while ( v5 );
return v4;
}