//
// MusicDownloadManager::isSongDownloaded from 0x100155ea4 to 0x100155f60 (188 bytes)
//
// 9 xrefs:
// > LevelInfoLayer::onPlay @ 0x1000265ec
// > CustomSongWidget::updateSongInfo @ 0x1000fc340
// > CustomSongWidget::updateWithMultiAssets @ 0x1000fd674
// > MusicDownloadManager::getDownloadedSongs @ 0x100155e4c
// > MusicDownloadManager::clearUnusedSongs @ 0x100156260
// > AudioAssetsBrowser::onInfo @ 0x1001d1b7c
// > GJSongBrowser::loadPage @ 0x100265a2c
// > GameManager::getMenuMusicFile @ 0x100311f30
// > GameManager::getPracticeMusicFile @ 0x100311ff8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// local variable allocation has failed, the output may be wrong!
bool __fastcall MusicDownloadManager::isSongDownloaded(MusicDownloadManager *a1, int a2)
{
__int64 v2; // x20
char v4; // w19
cocos2d::CCFileUtils *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]
v2 = *(_QWORD *)&a2;
LODWORD(__p[0]) = a2;
if ( sub_100018814(&a1->m_resourceSongUnorderedSet.__table_.__bucket_list_.__ptr_.__value_, (int *)__p) )
return 1;
v5 = cocos2d::CCFileUtils::sharedFileUtils();
MusicDownloadManager::pathForSong(v8, a1, v2);
if ( v9 >= 0 )
v6 = (char *)v8;
else
v6 = (char *)v8[0];
sub_100009900(__p, v6);
v4 = ((__int64 (__fastcall *)(cocos2d::CCFileUtils *, void **))v5->isPopupNotify)(v5, __p);
if ( v11 < 0 )
operator delete(__p[0]);
if ( v9 < 0 )
operator delete(v8[0]);
return v4;
}