//
// SongSelectNode::updateAudioLabel from 0x83e9e0 to 0x83eb50 (368 bytes)
//
// 4 xrefs:
// > SongSelectNode::selectSong @ 0x83eb78
// > SongSelectNode::onSongMode @ 0x83edac
// > SongSelectNode::init @ 0x83f5dc
// > ??> @ 0xa3e78
//
// 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 SongSelectNode::updateAudioLabel(SongSelectNode *a1)
{
cocos2d::CCString *v2; // x0
const unsigned __int8 *CString; // x0
const cocos2d::CCSize *v4; // x0
long double v5; // q0
void *v6; // x0
unsigned int *v7; // x2
int v8; // w1
__int64 v9; // [xsp+40h] [xbp+40h] BYREF
LevelTools::getAudioTitle((LevelTools *)(unsigned int)a1->m_selectedSongID, (__int64)&v9);
v2 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%02d: %s",
(const char *)(unsigned int)(a1->m_selectedSongID + 1),
v9);
CString = (const unsigned __int8 *)cocos2d::CCString::getCString(v2);
a1->m_audioLabel->setString(a1->m_audioLabel, CString);
v4 = a1->m_audioLabel->getContentSize(a1->m_audioLabel);
LODWORD(v5) = 1061997773;
if ( (float)(200.0 / v4->width) < 0.8 )
*(float *)&v5 = 200.0 / a1->m_audioLabel->getContentSize(a1->m_audioLabel)->width;
a1->m_audioLabel->setScale(a1->m_audioLabel, v5);
v6 = (void *)(v9 - 24);
if ( (__int64 *)(v9 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v7 = (unsigned int *)(v9 - 8);
do
v8 = __ldaxr(v7);
while ( __stlxr(v8 - 1, v7) );
}
else
{
v8 = *(_DWORD *)(v9 - 8);
*(_DWORD *)(v9 - 8) = v8 - 1;
}
if ( v8 <= 0 )
operator delete(v6);
}
}