//
// EditorSFXManager::clearAll from 0xcc0094 to 0xcc0208 (372 bytes)
//
// 6 xrefs:
// > EditorSFXManager::firstSetup @ 0xcc0218
// > EditorSFXManager::~EditorSFXManager @ 0xcc0314
// > EditorSFXManager::dataLoaded @ 0xcc40f4
// > EditorSFXManager::deserializeAll @ 0xcc6db0
// > EditorSoundsSettingsPopup::FLAlert_Clicked @ 0xcd7cc4
// > ??> @ 0x97dc8
//
// 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 13:06:17 +0000
//
__int64 __fastcall EditorSFXManager::clearAll(EditorSFXManager *this)
{
__int64 **v2; // x20
_QWORD *v3; // x0
_QWORD *v4; // x20
__int64 v5; // x2
__int64 v6; // x0
_QWORD *v7; // x0
_QWORD *v8; // x20
__int64 v9; // x2
__int64 v10; // x0
_QWORD *v11; // x0
_QWORD *v12; // x20
__int64 v13; // x2
__int64 v14; // x0
__int64 v15; // x20
v2 = *((__int64 ***)this + 2);
if ( v2 )
{
do
{
EditorSFXManager::releaseBinding((int)this, v2[3]);
v2 = (__int64 **)*v2;
}
while ( v2 );
if ( !*((_QWORD *)this + 3) )
goto LABEL_9;
v3 = *((_QWORD **)this + 2);
if ( v3 )
{
do
{
v4 = (_QWORD *)*v3;
operator delete(v3);
v3 = v4;
}
while ( v4 );
}
}
else if ( !*((_QWORD *)this + 3) )
{
goto LABEL_9;
}
v5 = *((_QWORD *)this + 1);
v6 = 0;
*((_QWORD *)this + 2) = 0;
if ( v5 )
{
do
*(_QWORD *)(*(_QWORD *)this + 8 * v6++) = 0;
while ( v6 != v5 );
}
*((_QWORD *)this + 3) = 0;
LABEL_9:
if ( *((_QWORD *)this + 8) )
{
v7 = *((_QWORD **)this + 7);
if ( v7 )
{
do
{
v8 = (_QWORD *)*v7;
operator delete(v7);
v7 = v8;
}
while ( v8 );
}
v9 = *((_QWORD *)this + 6);
v10 = 0;
*((_QWORD *)this + 7) = 0;
if ( v9 )
{
do
*(_QWORD *)(*((_QWORD *)this + 5) + 8 * v10++) = 0;
while ( v10 != v9 );
}
*((_QWORD *)this + 8) = 0;
}
if ( *((_QWORD *)this + 13) )
{
v11 = *((_QWORD **)this + 12);
if ( v11 )
{
do
{
v12 = (_QWORD *)*v11;
operator delete(v11);
v11 = v12;
}
while ( v12 );
}
v13 = *((_QWORD *)this + 11);
v14 = 0;
*((_QWORD *)this + 12) = 0;
if ( v13 )
{
do
*(_QWORD *)(*((_QWORD *)this + 10) + 8 * v14++) = 0;
while ( v14 != v13 );
}
*((_QWORD *)this + 13) = 0;
}
v15 = *((_QWORD *)this + 16);
if ( v15 )
{
std::__tree,std::string>,std::__map_value_compare,std::__value_type,std::string>,std::less>,true>,std::allocator,std::string>>>::destroy(
(__int64)this + 120,
*(void **)v15);
std::__tree,std::string>,std::__map_value_compare,std::__value_type,std::string>,std::less>,true>,std::allocator,std::string>>>::destroy(
(__int64)this + 120,
*(void **)(v15 + 8));
if ( (*(_BYTE *)(v15 + 40) & 1) != 0 )
operator delete(*(void **)(v15 + 56));
operator delete((void *)v15);
}
*((_QWORD *)this + 17) = 0;
*((_QWORD *)this + 16) = 0;
*((_QWORD *)this + 15) = (char *)this + 128;
return (__int64)this + 128;
}