//
// cocos2d::CCMenuItemFont::~CCMenuItemFont from 0xaf53f8 to 0xaf54c0 (200 bytes)
//
// 2 xrefs:
// > ??> @ 0x2b758
// > ??> @ 0x120eeb0
//
// 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::CCMenuItemFont::~CCMenuItemFont(cocos2d::CCMenuItemFont *this)
{
__int64 v2; // x2
void *v3; // x0
unsigned int *v4; // x2
int v5; // w1
v2 = *((_QWORD *)this + 51);
this->cocos2d::CCMenuItemLabel::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (cocos2d::CCMenuItemFont_vtbl *)&off_120EEA0;
this->cocos2d::CCMenuItemLabel::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&off_120F2F0;
v3 = (void *)(v2 - 24);
if ( (__int64 *)(v2 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v4 = (unsigned int *)(v2 - 8);
do
v5 = __ldaxr(v4);
while ( __stlxr(v5 - 1, v4) );
}
else
{
v5 = *(_DWORD *)(v2 - 8);
*(_DWORD *)(v2 - 8) = v5 - 1;
}
if ( v5 <= 0 )
operator delete(v3);
}
cocos2d::CCMenuItemLabel::~CCMenuItemLabel(this);
operator delete(this);
}