//
// MusicBrowser::onPage from 0x14033a660 to 0x14033a70d (173 bytes)
//
// 6 xrefs:
// > MusicBrowser::init @ 0x140338bec
// > MusicBrowser::init @ 0x140338cb4
// > ??> @ 0x140694910
// > ??> @ 0x140694924
// > ??> @ 0x140694934
// > ??> @ 0x1406d5384
//
// 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 MusicBrowser::onPage(MusicBrowser *a1, cocos2d::CCObject *a2)
{
MusicSearchResult *m_searchResult; // rcx
unsigned int v5; // eax
int v6; // ebp
int m_startIndex; // ebx
int v8; // eax
int v9; // ecx
int v10; // ecx
m_searchResult = a1->m_searchResult;
if ( m_searchResult )
{
v5 = cocos2d::CCArray::count(m_searchResult->m_filterObjects);
v6 = (int)ceilf((float)(v5 / 0xA));
m_startIndex = a1->m_searchResult->m_startIndex;
v8 = a2->getTag(a2);
v9 = 1;
if ( v8 != 1 )
v9 = -1;
v10 = m_startIndex + v9;
if ( v10 >= 0 && v10 <= v6 )
{
a1->m_searchResult->m_startIndex = v10;
MusicBrowser::setupList(a1, a1->m_searchResult);
}
}
}