//
// MusicDownloadManager::downloadSongStarted from 0x1001d4d34 to 0x1001d4da4 (112 bytes)
//
// 2 xrefs:
// > MusicDownloadManager::downloadSong @ 0x1001d4e28
// > MusicDownloadManager::downloadCustomSong @ 0x1001d50cc
//
// 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 11:00:24 +0000
//
__int64 __fastcall MusicDownloadManager::downloadSongStarted(__int64 a1, __int64 a2)
{
__int64 result; // x0
__int64 v5; // x21
__int64 v6; // x0
result = sub_1002E757C(*(_QWORD *)(a1 + 336));
if ( (_DWORD)result )
{
v5 = 0;
do
{
v6 = *(_QWORD *)(sub_1002E75A0(*(_QWORD *)(a1 + 336), v5) + 320);
if ( v6 )
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v6 + 16LL))(v6, a2);
v5 = (unsigned int)(v5 + 1);
result = sub_1002E757C(*(_QWORD *)(a1 + 336));
}
while ( (unsigned int)v5 < (unsigned int)result );
}
return result;
}