//
// MusicDownloadManager::removeMusicDownloadDelegate from 0x1001d2d20 to 0x1001d2da0 (128 bytes)
//
// 13 xrefs:
// > sub_10011E2FC @ 0x10011e32c
// > sub_1001F14D0 @ 0x1001f155c
// > sub_1002582E8 @ 0x100258364
// > sub_1002693B0 @ 0x10026941c
// > sub_10030364C @ 0x1003036a4
// > sub_10038AD64 @ 0x10038ad94
// > sub_100467A78 @ 0x100467afc
// > sub_10046E27C @ 0x10046e2ec
// > sub_1004A92EC @ 0x1004a9360
// > AudioAssetsPopup::onClose @ 0x1004a9ab4
// > sub_1004D15B0 @ 0x1004d16d0
// > EditorSoundConfigInfoLayer::onClose @ 0x1004d4338
// > sub_100517954 @ 0x1005179c8
//
// 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:23 +0000
//
__int64 __fastcall MusicDownloadManager::removeMusicDownloadDelegate(__int64 a1, __int64 a2)
{
__int64 result; // x0
__int64 v5; // x21
result = sub_1002E757C(*(_QWORD *)(a1 + 336));
if ( (_DWORD)result )
{
v5 = 0;
while ( *(_QWORD *)(sub_1002E75A0(*(_QWORD *)(a1 + 336), v5) + 320) != a2 )
{
v5 = (unsigned int)(v5 + 1);
result = sub_1002E757C(*(_QWORD *)(a1 + 336));
if ( (unsigned int)v5 >= (unsigned int)result )
return result;
}
return sub_1002E7664(*(_QWORD *)(a1 + 336), v5, 1);
}
return result;
}