//
// std::__ndk1::__tree_remove *> from 0x6d0850 to 0x6d0b3c (748 bytes)
//
// 31 xrefs:
// > FMODAudioEngine::stopChannelTween @ 0x6d0bd0
// > FMODAudioEngine::updateChannelTweens @ 0x6d7418
// > FMODAudioEngine::updateChannel @ 0x6d7568
// > ScrollableContentLayer::unmountRowSlot @ 0x6e526c
// > std::__ndk1::__tree,std::__ndk1::allocator>>>,std::__ndk1::__map_value_compare,std::__ndk1::allocator>>>,std::__ndk1::less,true>,std::__ndk1::allocator,std::__ndk1::allocator>>>>>::__erase_unique @ 0x720e64
// > GameManager::unloadIcon @ 0x729174
// > std::__ndk1::__tree,std::__ndk1::allocator>,std::__ndk1::less,std::__ndk1::allocator>>,std::__ndk1::allocator,std::__ndk1::allocator>>>::__erase_unique,std::__ndk1::allocator>> @ 0x845844
// > std::__ndk1::__tree,std::__ndk1::allocator>::__erase_unique @ 0x86dd2c
// > std::__ndk1::__tree,BulkCommentKey>,std::__ndk1::__map_value_compare,std::__ndk1::__value_type,BulkCommentKey>,std::__ndk1::less>,true>,std::__ndk1::allocator,BulkCommentKey>>>::__erase_unique> @ 0x90d640
// > GJGameState::processStateTriggers @ 0x9bf904
// > std::__ndk1::__tree,std::__ndk1::vector>>,std::__ndk1::__map_value_compare,std::__ndk1::__value_type,std::__ndk1::vector>>,std::__ndk1::less>,true>,std::__ndk1::allocator,std::__ndk1::vector>>>>::__erase_unique> @ 0x9bfa28
// > GJBaseGameLayer::addProximityVolumeEffect @ 0x9c1c88
// > GJBaseGameLayer::stopSFXTrigger @ 0x9e0294
// > GJEffectManager::removeTriggeredID @ 0xa11c4c
// > SelectEventLayer::onCustomToggleTriggerValue @ 0xb81ddc
// > SFXBrowser::onExitFolder @ 0xb97128
// > EnterEffectInstance::updateTransitions @ 0xba2f74
// > EnterEffectInstance::animateValue @ 0xba30cc
// > SFXFolderPickerPopup::onPickFolder @ 0xc3d7f0
// > AccountReviewPopup::applySelected @ 0xc4f3ac
// > AutoBackupPopup::onToggleRow @ 0xc59300
// > KeybindSet::unbindChord @ 0xcf5744
// > KeybindSet::unbindChord @ 0xcf57b4
// > cocos2d::extension::CCControl::removeHandleOfControlEvent @ 0xd0bfec
// > cocos2d::extension::CCScrollView::unregisterScriptHandler @ 0xd185d4
// > std::__ndk1::__tree,std::__ndk1::allocator>::__erase_unique @ 0xd1a250
// > cocos2d::CCSet::removeObject @ 0xd45eec
// > cocos2d::CCFileUtils::removeFullPath @ 0xd79f78
// > cocos2d::CCFileUtils::removeFullPath @ 0xd79ff4
// > cocos2d::CCSpriteFrameCache::removeSpriteFramesFromFile @ 0xd8c3b4
// > ??> @ 0x7f0c0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:51:27 +0000
//
__int64 *__fastcall std::__tree_remove *>(__int64 *a1, __int64 *a2)
{
__int64 v3; // x2
__int64 *result; // x0
__int64 **v5; // x3
__int64 v6; // x19
int v7; // w4
__int64 **v8; // x3
__int64 v9; // x3
__int64 v10; // x3
__int64 v11; // x0
int v12; // w1
__int64 v13; // x0
__int64 v14; // x0
__int64 *v15; // x1
__int64 v16; // x0
__int64 v17; // x1
__int64 *v18; // x0
__int64 v19; // x1
__int64 v20; // x1
__int64 v21; // x1
v3 = *a2;
if ( *a2 )
{
result = (__int64 *)a2[1];
if ( !result )
{
result = a2;
goto LABEL_39;
}
while ( *result )
result = (__int64 *)*result;
}
else
{
result = a2;
}
v3 = result[1];
if ( !v3 )
{
v5 = (__int64 **)result[2];
if ( result == *v5 )
goto LABEL_40;
LABEL_8:
v5[1] = (__int64 *)v3;
v6 = *(_QWORD *)result[2];
goto LABEL_9;
}
LABEL_39:
*(_QWORD *)(v3 + 16) = result[2];
v5 = (__int64 **)result[2];
if ( result != *v5 )
goto LABEL_8;
LABEL_40:
*v5 = (__int64 *)v3;
if ( result == a1 )
{
a1 = (__int64 *)v3;
v6 = 0;
}
else
{
v6 = *(_QWORD *)(result[2] + 8);
}
LABEL_9:
v7 = *((unsigned __int8 *)result + 24);
if ( result != a2 )
{
v8 = (__int64 **)a2[2];
result[2] = (__int64)v8;
if ( a2 == *(__int64 **)a2[2] )
*v8 = result;
else
v8[1] = result;
v9 = *a2;
*result = *a2;
*(_QWORD *)(v9 + 16) = result;
v10 = a2[1];
result[1] = v10;
if ( v10 )
*(_QWORD *)(v10 + 16) = result;
*((_BYTE *)result + 24) = *((_BYTE *)a2 + 24);
if ( a1 == a2 )
a1 = result;
}
if ( !a1 || !v7 )
return result;
if ( v3 )
{
result = (_QWORD *)(&dword_0 + 1);
*(_BYTE *)(v3 + 24) = 1;
return result;
}
LABEL_22:
v11 = *(_QWORD *)(v6 + 16);
v12 = *(unsigned __int8 *)(v6 + 24);
if ( v6 != *(_QWORD *)v11 )
{
LABEL_23:
if ( !v12 )
{
*(_BYTE *)(v6 + 24) = 1;
*(_BYTE *)(v11 + 24) = 0;
std::__tree_left_rotate *>(*(_QWORD *)(v6 + 16));
if ( *(__int64 **)v6 == a1 )
a1 = (__int64 *)v6;
v6 = *(_QWORD *)(*(_QWORD *)v6 + 8LL);
}
v13 = *(_QWORD *)v6;
if ( *(_QWORD *)v6 && !*(_BYTE *)(v13 + 24) )
{
v19 = *(_QWORD *)(v6 + 8);
if ( !v19 || *(_BYTE *)(v19 + 24) )
{
*(_BYTE *)(v13 + 24) = 1;
*(_BYTE *)(v6 + 24) = 0;
std::__tree_right_rotate *>((_QWORD *)v6);
v6 = *(_QWORD *)(v6 + 16);
}
}
else
{
v14 = *(_QWORD *)(v6 + 8);
if ( !v14 || *(_BYTE *)(v14 + 24) )
{
result = *(__int64 **)(v6 + 16);
*(_BYTE *)(v6 + 24) = 0;
if ( result != a1 )
{
if ( *((_BYTE *)result + 24) )
goto LABEL_30;
a1 = result;
}
*((_BYTE *)a1 + 24) = 1;
return (_QWORD *)(&dword_0 + 1);
}
}
v20 = *(_QWORD *)(v6 + 16);
*(_BYTE *)(v6 + 24) = *(_BYTE *)(v20 + 24);
*(_BYTE *)(v20 + 24) = 1;
*(_BYTE *)(*(_QWORD *)(v6 + 8) + 24LL) = 1;
return (__int64 *)std::__tree_left_rotate *>(*(_QWORD *)(v6 + 16));
}
while ( 1 )
{
if ( !v12 )
{
*(_BYTE *)(v6 + 24) = 1;
*(_BYTE *)(v11 + 24) = 0;
std::__tree_right_rotate *>(*(_QWORD **)(v6 + 16));
v18 = *(__int64 **)(v6 + 8);
if ( v18 == a1 )
a1 = (__int64 *)v6;
v6 = *v18;
}
v16 = *(_QWORD *)v6;
if ( *(_QWORD *)v6 )
{
if ( !*(_BYTE *)(v16 + 24) )
break;
}
v17 = *(_QWORD *)(v6 + 8);
if ( v17 && !*(_BYTE *)(v17 + 24) )
{
if ( !v16 || *(_BYTE *)(v16 + 24) )
{
*(_BYTE *)(v17 + 24) = 1;
*(_BYTE *)(v6 + 24) = 0;
std::__tree_left_rotate *>(v6);
v6 = *(_QWORD *)(v6 + 16);
}
break;
}
result = *(__int64 **)(v6 + 16);
*(_BYTE *)(v6 + 24) = 0;
if ( (a1 == result) >= (unsigned int)*((unsigned __int8 *)result + 24) )
{
*((_BYTE *)result + 24) = 1;
return result;
}
LABEL_30:
v15 = (__int64 *)result[2];
v6 = *v15;
if ( result == (__int64 *)*v15 )
{
v6 = v15[1];
goto LABEL_22;
}
v11 = *(_QWORD *)(v6 + 16);
v12 = *(unsigned __int8 *)(v6 + 24);
if ( v6 != *(_QWORD *)v11 )
goto LABEL_23;
}
v21 = *(_QWORD *)(v6 + 16);
*(_BYTE *)(v6 + 24) = *(_BYTE *)(v21 + 24);
*(_BYTE *)(v21 + 24) = 1;
*(_BYTE *)(*(_QWORD *)v6 + 24LL) = 1;
return std::__tree_right_rotate *>(*(_QWORD **)(v6 + 16));
}