//
// MusicDownloadManager::songStateChanged from 0x10064b930 to 0x10064b985 (85 bytes)
//
// 5 xrefs:
// > SetupSongTriggerPopup::onPlayback @ 0x1002c0ca2
// > sub_1003D4BC0 @ 0x1003d4bed
// > FindBPMLayer::onClose @ 0x10050ef91
// > CustomSongWidget::onSelect @ 0x1006f8a3b
// > CustomSongWidget::onPlayback @ 0x1006f8ce6
//
// 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 12:34:47 +0000
//
__int64 __fastcall MusicDownloadManager::songStateChanged(__int64 a1)
{
__int64 result; // rax
unsigned int v2; // r14d
__int64 v3; // rax
result = sub_1007FEF90(*(_QWORD *)(a1 + 336));
if ( (_DWORD)result )
{
v2 = 0;
do
{
v3 = sub_1007FEFE0(*(_QWORD *)(a1 + 336), v2);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(v3 + 320) + 40LL))(*(_QWORD *)(v3 + 320));
++v2;
result = sub_1007FEF90(*(_QWORD *)(a1 + 336));
}
while ( v2 < (unsigned int)result );
}
return result;
}