//
// cocos2d::CCSpriteBatchNode::removeAllChildrenWithCleanup from 0x10026fcf4 to 0x10026fd88 (148 bytes)
//
// 3 xrefs:
// > ??> @ 0x1008b8f90
// > ??> @ 0x100917530
// > ??> @ 0x100941e38
//
// 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 11:01:46 +0000
//
__int64 __fastcall cocos2d::CCSpriteBatchNode::removeAllChildrenWithCleanup(__int64 a1, __int64 a2)
{
__int64 v4; // x0
__int64 v5; // x8
unsigned int *v6; // x9
__int64 v7; // x8
_QWORD *v8; // x21
unsigned __int64 v9; // x22
__n128 v10; // q0
v4 = *(_QWORD *)(a1 + 344);
if ( v4 )
{
if ( (unsigned int)sub_1002E757C(v4) )
{
v5 = *(_QWORD *)(a1 + 344);
if ( v5 )
{
v6 = *(unsigned int **)(v5 + 56);
v7 = *v6;
if ( (_DWORD)v7 )
{
v8 = *((_QWORD **)v6 + 2);
v9 = (unsigned __int64)&v8[v7 - 1];
do
{
if ( !*v8 )
break;
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*v8 + 1120LL))(*v8, 0);
++v8;
}
while ( (unsigned __int64)v8 <= v9 );
}
}
}
}
cocos2d::CCNode::removeAllChildrenWithCleanup(a1, a2);
v10 = sub_1002E7674(*(_QWORD *)(a1 + 344));
return sub_1003080F8(*(_QWORD *)(a1 + 328), v10);
}