//
// MusicDownloadManager::getAllMusicObjects from 0x95ca3c to 0x95cacc (144 bytes)
//
// 2 xrefs:
// > MusicDownloadManager::getAllMusicObjectsSorted @ 0x971cf0
// > ??> @ 0x59800
//
// 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:57:29 +0000
//
__int64 __fastcall MusicDownloadManager::getAllMusicObjects(__int64 a1, int a2)
{
cocos2d::CCArray *v4; // x0
unsigned int v5; // w1
__int64 v6; // x21
__int64 v7; // x0
__int64 v8; // x1
__int64 v9; // x19
cocos2d::CCArray *v10; // x0
cocos2d::CCObject *v11; // x1
__int64 v12; // x1
v4 = (cocos2d::CCArray *)cocos2d::CCDictionary::count(*(cocos2d::CCDictionary **)(a1 + 440));
v6 = cocos2d::CCArray::createWithCapacity(v4, v5);
v7 = *(_QWORD *)(a1 + 440);
if ( v7 )
{
v8 = *(_QWORD *)(v7 + 56);
if ( v8 )
{
v9 = *(_QWORD *)(v8 + 288);
v10 = (cocos2d::CCArray *)v6;
v11 = *(cocos2d::CCObject **)(v8 + 264);
if ( a2 == -1 )
goto LABEL_7;
LABEL_4:
if ( a2 == *((_DWORD *)v11 + 100) )
{
LABEL_7:
while ( 1 )
{
cocos2d::CCArray::addObject(v10, v11);
if ( !v9 )
break;
LABEL_6:
v12 = v9;
v9 = *(_QWORD *)(v9 + 288);
v10 = (cocos2d::CCArray *)v6;
v11 = *(cocos2d::CCObject **)(v12 + 264);
if ( a2 != -1 )
goto LABEL_4;
}
}
else if ( v9 )
{
goto LABEL_6;
}
}
}
return v6;
}