//
// cocos2d::CCSpriteBatchNode::removeAllChildrenWithCleanup from 0x1001d7790 to 0x1001d7824 (148 bytes)
//
// 3 xrefs:
// > ??> @ 0x10076cc68
// > ??> @ 0x1007bf680
// > ??> @ 0x1007e9d20
//
// 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::CCSpriteBatchNode::removeAllChildrenWithCleanup(cocos2d::CCSpriteBatchNode *a1, bool a2)
{
cocos2d::CCArray *m_pobDescendants; // x0
cocos2d::CCArray *v5; // x8
cocos2d::ccArray *data; // x9
__int64 num; // x8
cocos2d::CCObject **arr; // x21
unsigned __int64 v9; // x22
m_pobDescendants = a1->m_pobDescendants;
if ( m_pobDescendants )
{
if ( (unsigned int)sub_10024A36C(m_pobDescendants) )
{
v5 = a1->m_pobDescendants;
if ( v5 )
{
data = v5->data;
num = data->num;
if ( (_DWORD)num )
{
arr = data->arr;
v9 = (unsigned __int64)&arr[num - 1];
do
{
if ( !*arr )
break;
((void (__fastcall *)(cocos2d::CCObject *, _QWORD))(*arr)->__vftable[13].getTag)(*arr, 0);
++arr;
}
while ( (unsigned __int64)arr <= v9 );
}
}
}
}
cocos2d::CCNode::removeAllChildrenWithCleanup(a1, a2);
sub_10024A45C(a1->m_pobDescendants);
cocos2d::CCTextureAtlas::removeAllQuads(a1->m_pobTextureAtlas);
}