//
// MusicBrowser::setupMusicBrowser from 0x1003c2210 to 0x1003c22a4 (148 bytes)
//
// 1 xrefs:
// > MusicBrowser::trySetupMusicBrowser @ 0x1003c1fe0
//
// 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
//
void __fastcall MusicBrowser::setupMusicBrowser(MusicBrowser *a1)
{
MusicDownloadManager *v2; // x0
MusicSearchResult *v3; // x0
MusicSearchResult *v4; // x20
__int64 v5; // x1
MusicDownloadManager *v6; // x0
v2 = MusicDownloadManager::sharedState();
if ( (v2->m_customContentURL.m_data.m_short.shortStorage.__elems_[22] & 0x8000000000000000LL) != 0 )
{
if ( v2->m_customContentURL.m_data.m_long.size )
goto LABEL_3;
}
else if ( v2->m_customContentURL.m_data.m_short.shortStorage.__elems_[22] )
{
goto LABEL_3;
}
v6 = MusicDownloadManager::sharedState();
MusicDownloadManager::getCustomContentURL(v6);
LABEL_3:
v3 = MusicSearchResult::create(a1->m_songType);
v4 = v3;
if ( a1->m_songType == 1 )
v5 = 6;
else
v5 = 0;
((void (__fastcall *)(MusicSearchResult *, __int64))v3->updateObjects)(v3, v5);
MusicBrowser::setupList(a1, v4);
if ( !MusicDownloadManager::sharedState()->m_downloadingMusicLibrary )
MusicBrowser::onUpdateLibrary(a1, nullptr);
}