//
// MusicBrowser::updatePageLabel from 0xa5ac30 to 0xa5adbc (396 bytes)
//
// 2 xrefs:
// > MusicBrowser::setupList @ 0xa5b234
// > ??> @ 0x633d8
//
// 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::updatePageLabel(MusicBrowser *a1)
{
int v2; // w21
int v3; // w1
int v4; // w4
__int64 v5; // x2
const char *v6; // x1
cocos2d::CCString *v7; // x0
size_t v8; // x0
__n128 v9; // q0
char *v10; // x0
unsigned int *v11; // x1
int v12; // w2
const char *CString; // [xsp+48h] [xbp+48h]
char *v14; // [xsp+60h] [xbp+60h] BYREF
v2 = cocos2d::CCArray::count(a1->m_searchResult->m_filterObjects);
v14 = &byte_124B6C8;
if ( v2 <= 0 )
{
v9 = sub_D1798C(&v14, "No matches", 10);
}
else
{
cocos2d::CCArray::count(a1->m_searchResult->m_filterObjects);
v3 = 10 * a1->m_searchResult->m_startIndex;
v4 = v3 + 9;
LODWORD(v5) = v3 + 10;
v6 = (const char *)(unsigned int)(v3 + 1);
if ( v2 <= v4 )
v5 = (unsigned int)v2;
else
v5 = (unsigned int)v5;
v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i to %i of %i",
v6,
v5,
(unsigned int)v2);
CString = cocos2d::CCString::getCString(v7);
v8 = strlen(CString);
v9 = sub_D1798C(&v14, CString, v8);
}
((void (__fastcall *)(cocos2d::CCLabelBMFont *, char *, long double))a1->m_pageLabel->setString)(
a1->m_pageLabel,
v14,
*(long double *)&v9);
v10 = v14 - 24;
if ( v14 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v11 = (unsigned int *)(v14 - 8);
do
v12 = __ldaxr(v11);
while ( __stlxr(v12 - 1, v11) );
}
else
{
v12 = *((_DWORD *)v14 - 2);
*((_DWORD *)v14 - 2) = v12 - 1;
}
if ( v12 <= 0 )
operator delete(v10);
}
}