//
// DeathMarkerLayer::~DeathMarkerLayer from 0xc9d660 to 0xc9d834 (468 bytes)
//
// 4 xrefs:
// > DeathMarkerLayer::~DeathMarkerLayer @ 0xc9d844
// > ??> @ 0xa34c8
// > ??> @ 0xc63e8
// > ??> @ 0x14f6d88
//
// 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:05:57 +0000
//
// Alternative name is '_ZN16DeathMarkerLayerD1Ev'
void __fastcall DeathMarkerLayer::~DeathMarkerLayer(DeathMarkerLayer *this)
{
__int64 v2; // x0
__int64 v3; // x1
__int64 v4; // x19
unsigned __int64 i; // x21
__int64 v6; // x2
cocos2d::CCObject *v7; // x0
cocos2d::CCObject *v8; // x0
__int64 v9; // x0
__int64 v10; // x0
_QWORD *v11; // x19
char *v12; // x0
_QWORD *v13; // x21
char *v14; // x2
void *v15; // x0
void *v16; // x0
char *v17; // x0
char *v18; // x3
v2 = *((_QWORD *)this + 52);
*(_QWORD *)this = &off_14F6D80;
if ( v2 )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v2 + 520LL))(v2);
cocos2d::CCObject::release(*((cocos2d::CCObject **)this + 52));
}
v3 = *((_QWORD *)this + 40);
v4 = 0;
for ( i = 0; i < 0xCCCCCCCCCCCCCCCDLL * ((*((_QWORD *)this + 41) - v3) >> 4); v4 += 80 )
{
while ( 1 )
{
v9 = *(_QWORD *)(v3 + v4 + 64);
if ( v9 )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v9 + 736LL))(v9);
v3 = *((_QWORD *)this + 40);
}
v10 = *(_QWORD *)(v3 + v4 + 72);
if ( !v10 )
break;
(*(void (__fastcall **)(__int64))(*(_QWORD *)v10 + 736LL))(v10);
v3 = *((_QWORD *)this + 40);
v6 = v3 + v4;
v7 = *(cocos2d::CCObject **)(v3 + v4 + 64);
if ( v7 )
goto LABEL_6;
LABEL_7:
v8 = *(cocos2d::CCObject **)(v6 + 72);
if ( v8 )
{
cocos2d::CCObject::release(v8);
v3 = *((_QWORD *)this + 40);
}
++i;
v4 += 80;
if ( i >= 0xCCCCCCCCCCCCCCCDLL * ((*((_QWORD *)this + 41) - v3) >> 4) )
goto LABEL_15;
}
v7 = *(cocos2d::CCObject **)(v3 + v4 + 64);
if ( v7 )
{
LABEL_6:
cocos2d::CCObject::release(v7);
v3 = *((_QWORD *)this + 40);
v6 = v3 + v4;
goto LABEL_7;
}
++i;
}
LABEL_15:
v11 = *((_QWORD **)this + 45);
if ( v11 )
{
do
{
v12 = (char *)v11[3];
v13 = (_QWORD *)*v11;
if ( v12 )
{
v14 = (char *)v11[4];
if ( v12 != v14 )
v11[4] = &v14[4 * ~((unsigned __int64)(v14 - 4 - v12) >> 2)];
operator delete(v12);
}
v15 = v11;
v11 = v13;
operator delete(v15);
}
while ( v13 );
}
v16 = *((void **)this + 43);
*((_QWORD *)this + 43) = 0;
if ( v16 )
operator delete(v16);
v17 = *((char **)this + 40);
if ( v17 )
{
v18 = *((char **)this + 41);
if ( v17 != v18 )
*((_QWORD *)this + 41) = &v18[-80
* ((0xCCCCCCCCCCCCCCDLL * ((unsigned __int64)(v18 - 80 - v17) >> 4))
& 0xFFFFFFFFFFFFFFFLL)
- 80];
operator delete(v17);
}
cocos2d::CCNode::~CCNode(this);
}