//
// cocos2d::CCSpriteBatchNode::removeAllChildrenWithCleanup from 0x5e86ec to 0x5e874a (94 bytes)
//
// 0 xrefs:
//
// 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 cocos2d::CCSpriteBatchNode::removeAllChildrenWithCleanup(cocos2d::CCSpriteBatchNode *a1, bool a2)
{
cocos2d::CCArray *m_pobDescendants; // r0
cocos2d::CCArray *v5; // r3
cocos2d::ccArray *data; // r2
cocos2d::CCObject **arr; // r5
cocos2d::CCObject **v8; // r4
cocos2d::_ccArray *v9; // r1
int v10; // r0
int v11; // t1
m_pobDescendants = a1->m_pobDescendants;
if ( m_pobDescendants )
{
if ( cocos2d::CCArray::count(m_pobDescendants) )
{
v5 = a1->m_pobDescendants;
if ( v5 )
{
data = v5->data;
if ( data->num )
{
arr = data->arr;
v8 = &arr[data->num] + 0x3FFFFFFF;
while ( arr <= v8 )
{
v11 = (int)*arr++;
v10 = v11;
if ( !v11 )
break;
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v10 + 552))(v10, 0);
}
}
}
}
}
cocos2d::CCNode::removeAllChildrenWithCleanup(a1, a2);
cocos2d::CCArray::removeAllObjects(a1->m_pobDescendants, v9);
cocos2d::CCTextureAtlas::removeAllQuads(a1->m_pobTextureAtlas);
}