//
// cocos2d::CCNode::removeAllChildrenWithCleanup from 0x7c39a0 to 0x7c3a26 (134 bytes)
//
// 23 xrefs:
// > CCScrollLayerExt::~CCScrollLayerExt @ 0x3c820a
// > TableView::~TableView @ 0x3c9172
// > TableViewCell::~TableViewCell @ 0x3cabce
// > SectionedContentNode::removeAllChildrenWithCleanup @ 0x3f5f9a
// > LoadingLayer::~LoadingLayer @ 0x3faf92
// > TutorialPopup::~TutorialPopup @ 0x41e81e
// > SelectFontLayer::~SelectFontLayer @ 0x5d298e
// > SetIDPopup::~SetIDPopup @ 0x5d2a5e
// > SetTextPopup::~SetTextPopup @ 0x5d5bce
// > ColorSelectLiveOverlay::~ColorSelectLiveOverlay @ 0x601212
// > SetupObjectOptionsPopup::~SetupObjectOptionsPopup @ 0x63922a
// > SetupGravityModPopup::~SetupGravityModPopup @ 0x663092
// > CreateParticlePopup::~CreateParticlePopup @ 0x6644ce
// > SetupSmartBlockLayer::~SetupSmartBlockLayer @ 0x67236e
// > SetupTriggerPopup::~SetupTriggerPopup @ 0x67b636
// > HSVLiveOverlay::~HSVLiveOverlay @ 0x69c15a
// > SelectEventLayer::~SelectEventLayer @ 0x6b7aba
// > cocos2d::extension::CCControlHuePicker::~CCControlHuePicker @ 0x7a882a
// > cocos2d::extension::CCControlSaturationBrightnessPicker::~CCControlSaturationBrightnessPicker @ 0x7a8dba
// > cocos2d::CCParticleBatchNode::removeAllChildrenWithCleanup @ 0x7e5f92
// > cocos2d::CCSprite::removeAllChildrenWithCleanup @ 0x7f1d98
// > cocos2d::CCSpriteBatchNode::removeAllChildrenWithCleanup @ 0x7f2fc2
// > cocos2d::CCParallaxNode::removeAllChildrenWithCleanup @ 0x803964
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:00:23 +0000
//
cocos2d::CCArray *__fastcall cocos2d::CCNode::removeAllChildrenWithCleanup(cocos2d::CCNode *this, int a2)
{
cocos2d::CCArray *result; // r0
int v5; // r3
_DWORD *v6; // r3
int *v7; // r5
int *v8; // r6
int v9; // r4
int v10; // t1
result = *((cocos2d::CCArray **)this + 48);
if ( result )
{
result = (cocos2d::CCArray *)cocos2d::CCArray::count(result);
if ( result )
{
v5 = *((_DWORD *)this + 48);
if ( v5 )
{
v6 = *(_DWORD **)(v5 + 52);
if ( *v6 )
{
v7 = (int *)v6[3];
v8 = &v7[*v6 - 1];
while ( v7 <= v8 )
{
v10 = *v7++;
v9 = v10;
if ( !v10 )
break;
if ( *((_BYTE *)this + 224) )
{
(*(void (__fastcall **)(int))(*(_DWORD *)v9 + 364))(v9);
(*(void (__fastcall **)(int))(*(_DWORD *)v9 + 360))(v9);
}
if ( a2 )
(*(void (__fastcall **)(int))(*(_DWORD *)v9 + 368))(v9);
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v9 + 252))(v9, 0);
}
}
}
return (cocos2d::CCArray *)cocos2d::CCArray::removeAllObjects(*((cocos2d::CCArray **)this + 48));
}
}
return result;
}