//
// AudioAssetsBrowser::setupList from 0x1007b4ba0 to 0x1007b4d53 (435 bytes)
//
// 2 xrefs:
// > AudioAssetsBrowser::init @ 0x1007b4436
// > AudioAssetsBrowser::trySetupAudioBrowser @ 0x1007b4dd5
//
// 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 AudioAssetsBrowser::setupList(AudioAssetsBrowser *a1)
{
cocos2d::CCArray *m_songInfoObjects; // rdi
cocos2d::CCDirector *v3; // rax
cocos2d::CCTouchDispatcher *v4; // rax
cocos2d::CCArray *v5; // r14
std::__vector_base::pointer begin; // r12
std::__vector_base::pointer end; // r13
int v8; // r15d
MusicDownloadManager *v9; // rax
SongInfoObject *SongInfoObject; // rax
CustomListView *v11; // rax
GJCommentListLayer *v12; // rax
GJCommentListLayer *m_songList; // rbx
float v14; // [rsp+8h] [rbp-38h] BYREF
float v15[12]; // [rsp+10h] [rbp-30h] BYREF
m_songInfoObjects = a1->m_songInfoObjects;
if ( m_songInfoObjects )
cocos2d::CCObject::release(m_songInfoObjects);
if ( a1->m_songList )
{
v3 = cocos2d::CCDirector::sharedDirector();
v4 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *))v3->getTouchDispatcher)(v3);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v4, a1->m_songList);
((void (__fastcall *)(GJCommentListLayer *))a1->m_songList->removeMeAndCleanup)(a1->m_songList);
a1->m_songList = nullptr;
}
v5 = (cocos2d::CCArray *)sub_10071F9E0();
begin = a1->m_songsIds.__begin_;
end = a1->m_songsIds.__end_;
while ( begin != end )
{
v8 = *begin;
v9 = MusicDownloadManager::sharedState();
SongInfoObject = MusicDownloadManager::getSongInfoObject(v9, v8);
if ( SongInfoObject )
sub_10071FCD0((__int64)v5, SongInfoObject);
++begin;
}
a1->m_songInfoObjects = v5;
cocos2d::CCObject::retain(v5);
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v15);
v11 = CustomListView::create(v5, &a1->TableViewCellDelegate, 220.0, 340.0, 0, CustomMusic, 0.0);
v12 = GJCommentListLayer::create(v11, "", (cocos2d::ccColor4B)-13487566, 340.0, 220.0, 1);
a1->m_songList = v12;
((void (__fastcall *)(cocos2d::CCLayer *, GJCommentListLayer *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v12,
10);
m_songList = a1->m_songList;
sub_10028CBE0(&v14, (float)(v15[0] + -340.0) * 0.5, (float)((float)(v15[1] + -220.0) * 0.5) + -10.0);
((void (__fastcall *)(GJCommentListLayer *, float *))m_songList->setPosition)(m_songList, &v14);
}