//
// cocos2d::extension::CCControlButton::setTitleLabelForState from 0xd0c804 to 0xd0c920 (284 bytes)
//
// 3 xrefs:
// > ??> @ 0x94b88
// > ??> @ 0x150aa38
// > ??> @ 0x15101b8
//
// 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:00 +0000
//
__int64 __fastcall cocos2d::extension::CCControlButton::setTitleLabelForState(
cocos2d::CCDictionary **this,
cocos2d::CCNode *a2,
unsigned int a3)
{
__int64 v3; // x22
__int64 v7; // x1
void (__fastcall *v8)(cocos2d::CCNode *, _BYTE *); // x22
_BYTE v10[8]; // [xsp+50h] [xbp+50h] BYREF
v3 = a3;
v7 = cocos2d::CCDictionary::objectForKey(*(this + 68), a3);
if ( v7 )
{
(*((void (__fastcall **)(cocos2d::CCDictionary **, __int64, __int64))*this + 69))(this, v7, 1);
cocos2d::CCDictionary::removeObjectForKey(*(this + 68), v3);
}
cocos2d::CCDictionary::setObject(*(this + 68), a2, v3);
(*(void (__fastcall **)(cocos2d::CCNode *, _QWORD))(*(_QWORD *)a2 + 344LL))(a2, 0);
v8 = *(void (__fastcall **)(cocos2d::CCNode *, _BYTE *))(*(_QWORD *)a2 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v10, 0.5, 0.5);
v8(a2, v10);
(*((void (__fastcall **)(cocos2d::CCDictionary **, cocos2d::CCNode *, __int64))*this + 58))(this, a2, 1);
if ( a3 == *((_DWORD *)this + 107) )
(*((void (__fastcall **)(cocos2d::CCDictionary **))*this + 164))(this);
return _stack_chk_guard;
}