//
// SFXBrowser::updatePageLabel from 0x10016a3cc to 0x10016a4f8 (300 bytes)
//
// 1 xrefs:
// > SFXBrowser::setupList @ 0x10016a190
//
// 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 SFXBrowser::updatePageLabel(SFXBrowser *a1)
{
int v2; // w0
int v3; // w20
int m_cellAmount; // w21
int v5; // w8
int v6; // w9
int v7; // w8
cocos2d::CCString *v8; // x0
const char *CString; // x0
int v10; // w20
std::string *v11; // x1
std::string v12; // [xsp+18h] [xbp-38h] BYREF
v2 = sub_10024A36C(a1->m_searchResult->m_filterObjects);
v3 = v2 - 1;
if ( v2 < 1 )
{
memset(&v12, 0, sizeof(v12));
std::string::assign(&v12, "No matches");
v10 = 0;
}
else
{
m_cellAmount = a1->m_cellAmount;
memset(&v12, 0, sizeof(v12));
v5 = m_cellAmount * a1->m_searchResult->m_startIndex;
v6 = v5 + 1;
v7 = v5 + m_cellAmount;
if ( v7 >= v2 )
v7 = v2;
v8 = (cocos2d::CCString *)sub_100268F4C("%i to %i of %i", v6, v7, v2);
CString = cocos2d::CCString::getCString(v8);
std::string::assign(&v12, CString);
v10 = (int)(float)(v3 / m_cellAmount);
}
if ( (v12.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v11 = &v12;
else
v11 = (std::string *)v12.__r_.__value_.__r.__words[0];
((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))a1->m_pageLabel->setString)(a1->m_pageLabel, v11);
((void (__fastcall *)(CCMenuItemSpriteExtra *, bool))a1->m_prevButton->setVisible)(
a1->m_prevButton,
a1->m_searchResult->m_startIndex > 0);
((void (__fastcall *)(CCMenuItemSpriteExtra *, bool))a1->m_nextButton->setVisible)(
a1->m_nextButton,
a1->m_searchResult->m_startIndex < v10);
if ( SHIBYTE(v12.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v12.__r_.__value_.__l.__data_);
}