//
// cocos2d::extension::CCControlButton::setTitleLabelForState from 0x100354410 to 0x1003544de (206 bytes)
//
// 2 xrefs:
// > ??> @ 0x1009161d0
// > ??> @ 0x100947918
//
// 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 __fastcall cocos2d::extension::CCControlButton::setTitleLabelForState(
cocos2d::extension::CCControlButton *a1,
cocos2d::CCNode *a2,
unsigned int a3)
{
intptr_t v4; // r12
cocos2d::CCObject *v5; // rax
float v6[10]; // [rsp+8h] [rbp-28h] BYREF
v4 = a3;
v5 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)&a1[1].m_fVertexZ, a3);
if ( v5 )
{
((void (__fastcall *)(cocos2d::extension::CCControlButton *, cocos2d::CCObject *, __int64))a1->removeChild_0)(
a1,
v5,
1);
cocos2d::CCDictionary::removeObjectForKey(*(cocos2d::CCDictionary **)&a1[1].m_fVertexZ, v4);
}
cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)&a1[1].m_fVertexZ, a2, v4);
((void (__fastcall *)(cocos2d::CCNode *, _QWORD))a2->setVisible)(a2, 0);
sub_10028CBE0(v6, 0.5, 0.5);
((void (__fastcall *)(cocos2d::CCNode *, float *))a2->setAnchorPoint)(a2, v6);
((void (__fastcall *)(cocos2d::extension::CCControlButton *, cocos2d::CCNode *, __int64))a1->addChild_0)(a1, a2, 1);
if ( a1->m_eState == a3 )
((void (__fastcall *)(cocos2d::extension::CCControlButton *))a1->needsLayout)(a1);
}