//
// cocos2d::CCTMXLayer::~CCTMXLayer from 0x1800abc50 to 0x1800abd4a (250 bytes)
//
// 4 xrefs:
// > sub_1800ABD50 @ 0x1800abdae
// > sub_1800ABD50 @ 0x1800abd6c
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b80a0
//
// 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::CCTMXLayer::~CCTMXLayer(cocos2d::CCTMXLayer *this)
{
cocos2d::CCObject *v2; // rcx
cocos2d::CCObject *v3; // rcx
cocos2d::CCObject *v4; // rcx
void **v5; // rcx
void *v6; // rcx
unsigned __int64 v7; // rdx
_QWORD *v8; // rcx
this->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (cocos2d::CCTMXLayer_vtbl *)&cocos2d::CCTMXLayer::`vftable'{for `cocos2d::CCNode'};
this->cocos2d::CCSpriteBatchNode::cocos2d::CCTextureProtocol::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCTextureProtocol_vtbl *)&cocos2d::CCTMXLayer::`vftable'{for `cocos2d::CCTextureProtocol'};
v2 = *((cocos2d::CCObject **)this + 48);
if ( v2 )
cocos2d::CCObject::release(v2);
v3 = *((cocos2d::CCObject **)this + 58);
if ( v3 )
cocos2d::CCObject::release(v3);
v4 = *((cocos2d::CCObject **)this + 50);
if ( v4 )
cocos2d::CCObject::release(v4);
v5 = *((void ***)this + 59);
if ( v5 )
{
sub_18009E1E0(v5);
*((_QWORD *)this + 59) = 0;
}
v6 = *((void **)this + 47);
if ( v6 )
{
j_j_free_0(v6);
*((_QWORD *)this + 47) = 0;
}
v7 = *((_QWORD *)this + 54);
if ( v7 > 0xF )
{
v8 = *((_QWORD **)this + 51);
if ( v7 + 1 >= 0x1000 )
{
if ( (unsigned __int64)v8 - *(v8 - 1) - 8 > 0x1F )
invalid_parameter_noinfo_noreturn();
v8 = (_QWORD *)*(v8 - 1);
}
j_j_free_0(v8);
}
*((_QWORD *)this + 53) = 0;
*((_QWORD *)this + 54) = 15;
*((_BYTE *)this + 408) = 0;
cocos2d::CCSpriteBatchNode::~CCSpriteBatchNode(this);
}