//
// EditorSFXManager::clearAll from 0x140185d90 to 0x140185e69 (217 bytes)
//
// 5 xrefs:
// > EditorSFXManager::deserializeAll @ 0x140188f51
// > EditorSFXManager::dataLoaded @ 0x14018b10a
// > GameManager::firstLoad @ 0x140285411
// > EditorSoundsSettingsPopup::FLAlert_Clicked @ 0x1403d5152
// > ??> @ 0x140918e30
//
// This function is hookable on this platform (idp: pc, 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 11:27:38 +0000
//
__int64 __fastcall EditorSFXManager::clearAll(_QWORD *a1)
{
_QWORD *v1; // rsi
_QWORD *i; // rbx
cocos2d::CCObject **v4; // rdi
_QWORD *v5; // rbx
__int64 result; // rax
v1 = (_QWORD *)a1[1];
for ( i = (_QWORD *)*v1; i != v1; i = (_QWORD *)*i )
{
v4 = (cocos2d::CCObject **)i[3];
if ( v4 )
{
if ( *v4 )
{
cocos2d::CCObject::release(*v4);
*v4 = nullptr;
}
sub_140069730((__int64)(v4 + 6));
sub_14003D310((__int64)(v4 + 2));
j_j_free(v4);
}
}
sub_140066610(a1);
sub_140066610(a1 + 8);
sub_14003EB60(a1 + 16);
v5 = (_QWORD *)a1[24];
result = sub_14018C850(a1 + 24, a1 + 24, v5[1]);
v5[1] = v5;
*v5 = v5;
v5[2] = v5;
a1[25] = 0;
return result;
}