//
// MusicDownloadManager::downloadSongStarted from 0x95bf64 to 0x95bfe4 (128 bytes)
//
// 3 xrefs:
// > MusicDownloadManager::downloadCustomSong @ 0x9682f8
// > MusicDownloadManager::downloadSong @ 0x968614
// > ??> @ 0x41c08
//
// 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::downloadSongStarted(cocos2d::CCArray **this, unsigned int a2)
{
unsigned int v4; // w19
__int64 result; // x0
bool v6; // cf
unsigned int v7; // w1
__int64 v8; // x2
v4 = 0;
while ( 1 )
{
result = cocos2d::CCArray::count(*(this + 42));
v6 = v4 >= (unsigned int)result;
v7 = v4++;
if ( v6 )
break;
while ( 1 )
{
v8 = *(_QWORD *)(cocos2d::CCArray::objectAtIndex(*(this + 42), v7) + 320);
if ( !v8 )
break;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v8 + 16LL))(v8, a2);
result = cocos2d::CCArray::count(*(this + 42));
v6 = v4 >= (unsigned int)result;
v7 = v4++;
if ( v6 )
return result;
}
}
return result;
}