//
// cocos2d::CCSpriteBatchNode::removeAllChildrenWithCleanup from 0x18008ed50 to 0x18008edfa (170 bytes)
//
// 7 xrefs:
// > ??> @ 0x1800ec4b0
// > ??> @ 0x180103eb0
// > ??> @ 0x180105c18
// > ??> @ 0x18013d89c
// > ??> @ 0x18013d8d0
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b6090
//
// 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 *this, char a2)
{
cocos2d::CCArray *m_pobDescendants; // rcx
cocos2d::CCArray *v5; // rax
cocos2d::ccArray *data; // rbx
__int64 num; // rax
cocos2d::CCObject **arr; // rbx
cocos2d::CCObject **i; // rsi
m_pobDescendants = this->m_pobDescendants;
if ( m_pobDescendants )
{
if ( (unsigned int)cocos2d::CCArray::count(m_pobDescendants) )
{
v5 = this->m_pobDescendants;
if ( v5 )
{
data = v5->data;
num = data->num;
if ( (_DWORD)num )
{
arr = data->arr;
for ( i = &arr[num - 1]; arr <= i; ++arr )
{
if ( !*arr )
break;
((void (__fastcall *)(cocos2d::CCObject *, _QWORD))(*arr)->__vftable[13].isEqual)(*arr, 0);
}
}
}
}
}
cocos2d::CCNode::removeAllChildrenWithCleanup(this, a2);
cocos2d::CCArray::removeAllObjects(this->m_pobDescendants);
cocos2d::CCTextureAtlas::removeAllQuads(this->m_pobTextureAtlas);
}