//
// cocos2d::CCLabelTTF::setFontName from 0xae93c0 to 0xae94d0 (272 bytes)
//
// 4 xrefs:
// > cocos2d::extension::CCEditBoxImplAndroid::setFont @ 0xaaa448
// > cocos2d::extension::CCEditBoxImplAndroid::setFont @ 0xaaa464
// > cocos2d::extension::CCEditBoxImplAndroid::setPlaceholderFont @ 0xaaa4b0
// > ??> @ 0x54f78
//
// 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 cocos2d::CCLabelTTF::setFontName(cocos2d::CCLabelTTF *a1, const char *a2)
{
std::string *m_pFontName; // x21
stl::StringData::Internal *m_data; // x2
__int64 *v6; // x0
std::string *v7; // x21
unsigned int *v8; // x2
int v9; // w1
if ( (unsigned int)sub_D171E0((int)a1->m_pFontName, (char *)a2) )
{
m_pFontName = a1->m_pFontName;
if ( m_pFontName )
{
m_data = m_pFontName->m_data.m_data;
v6 = (__int64 *)((char *)m_pFontName->m_data.m_data - 24);
if ( v6 != &qword_124B6B0 )
{
if ( &pthread_create )
{
v8 = (unsigned int *)((char *)m_data - 8);
do
v9 = __ldaxr(v8);
while ( __stlxr(v9 - 1, v8) );
}
else
{
v9 = *((_DWORD *)m_data - 2);
*((_DWORD *)m_data - 2) = v9 - 1;
}
if ( v9 <= 0 )
operator delete(v6);
}
operator delete(m_pFontName);
}
v7 = (std::string *)operator new(8u);
sub_D153B8((int)v7, (char *)a2);
a1->m_pFontName = v7;
if ( *((_QWORD *)a1->m_string.m_data.m_data - 3) )
cocos2d::CCLabelTTF::updateTexture(a1);
}
}