//
// MusicDownloadManager::isSongDownloaded from 0x1001d492c to 0x1001d49e8 (188 bytes)
//
// 8 xrefs:
// > LevelInfoLayer::onPlay @ 0x100029ddc
// > CustomSongWidget::updateSongInfo @ 0x100120a80
// > CustomSongWidget::updateWithMultiAssets @ 0x100121f50
// > MusicDownloadManager::getDownloadedSongs @ 0x1001d48d4
// > MusicDownloadManager::clearUnusedSongs @ 0x1001d4ce8
// > sub_100269AE0 @ 0x100269b64
// > GameManager::getMenuMusicFile @ 0x1003aec44
// > GameManager::getPracticeMusicFile @ 0x1003aed0c
//
// 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::isSongDownloaded(__int64 a1, __int64 a2)
{
__int64 v4; // x19
__int64 v5; // x19
char *v6; // x1
void *v8[2]; // [xsp+0h] [xbp-50h] BYREF
char v9; // [xsp+17h] [xbp-39h]
void *__p[2]; // [xsp+18h] [xbp-38h] BYREF
char v11; // [xsp+2Fh] [xbp-21h]
LODWORD(__p[0]) = a2;
if ( sub_100019268((_QWORD *)(a1 + 568), (int *)__p) )
return 1;
v5 = cocos2d::CCFileUtils::sharedFileUtils(0);
MusicDownloadManager::pathForSong(v8, a1, a2);
if ( v9 >= 0 )
v6 = (char *)v8;
else
v6 = (char *)v8[0];
sub_100009900(__p, v6);
v4 = (*(__int64 (__fastcall **)(__int64, void **))(*(_QWORD *)v5 + 160LL))(v5, __p);
if ( v11 < 0 )
operator delete(__p[0]);
if ( v9 < 0 )
operator delete(v8[0]);
return v4;
}