//
// cocos2d::CCLabelTTF::setString from 0xd5ae80 to 0xd5af24 (164 bytes)
//
// 5 xrefs:
// > `non-virtual thunk to'cocos2d::CCLabelTTF::setString @ 0xd5af28
// > cocos2d::CCTextFieldTTF::deleteBackward @ 0xda202c
// > cocos2d::CCTextFieldTTF::setPlaceHolder @ 0xda21e8
// > ??> @ 0x68098
// > ??> @ 0x1518dd8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:07:46 +0000
//
__int64 __fastcall cocos2d::CCLabelTTF::setString(cocos2d::CCLabelTTF *this, const char *a2)
{
size_t v4; // x20
size_t v5; // x19
__int64 result; // x0
size_t v7; // x2
v4 = strlen(a2);
if ( (*((_BYTE *)this + 640) & 1) != 0 )
{
v5 = *((_QWORD *)this + 81);
result = *((_QWORD *)this + 82);
}
else
{
v5 = *((_BYTE *)this + 640) >> 1;
result = (__int64)this + 641;
}
if ( v5 > v4 )
v7 = v4;
else
v7 = v5;
if ( v7 && (result = memcmp((const void *)result, a2, v7), (_DWORD)result) || v4 != v5 )
{
std::string::assign((__int64 *)this + 80, a2, v4);
return cocos2d::CCLabelTTF::updateTexture(this);
}
return result;
}