//
// EditorSFXManager::collectAllSFXIDs from 0xcc05c0 to 0xcc06f4 (308 bytes)
//
// 3 xrefs:
// > EditorSFXManager::downloadAllMissing @ 0xcc071c
// > EditorSoundsSettingsPopup::onDownloadAll @ 0xcd8368
// > ??> @ 0x8d988
//
// 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
//
int **__usercall EditorSFXManager::collectAllSFXIDs@(EditorSFXManager *this@, int **a2@)
{
_QWORD *v3; // x22
cocos2d::CCArray **v4; // x21
cocos2d::CCArray *v5; // x0
unsigned int i; // w19
__int64 v7; // x0
__int64 v8; // x1
int v9; // w4
int *v10; // x0
int *v11; // x3
int *v12; // x0
int v13; // t1
*a2 = nullptr;
a2[1] = nullptr;
a2[2] = nullptr;
v3 = *((_QWORD **)this + 2);
if ( v3 )
{
while ( 1 )
{
v4 = (cocos2d::CCArray **)v3[3];
if ( v4 )
{
v5 = *v4;
if ( *v4 )
break;
}
LABEL_18:
v3 = (_QWORD *)*v3;
if ( !v3 )
return a2;
}
for ( i = 0; ; ++i )
{
if ( i >= (unsigned int)cocos2d::CCArray::count(v5) )
goto LABEL_18;
v7 = cocos2d::CCArray::objectAtIndex(*v4, i);
v8 = v7;
if ( v7 )
{
v9 = *(_DWORD *)(v7 + 1864);
if ( v9 > 0 )
{
v10 = *a2;
v11 = a2[1];
if ( *a2 != v11 )
{
if ( v9 == *v10 )
goto LABEL_17;
v12 = v10 + 1;
while ( v11 != v12 )
{
v13 = *v12++;
if ( v9 == v13 )
goto LABEL_17;
}
}
if ( v11 == a2[2] )
{
std::vector::__push_back_slow_path((__int64)a2, (_DWORD *)(v8 + 1864));
}
else
{
if ( v11 )
{
*v11 = v9;
v11 = a2[1];
}
a2[1] = v11 + 1;
}
}
}
LABEL_17:
v5 = *v4;
}
}
return a2;
}