//
// cocos2d::CCAutoreleasePool::clear from 0x7c63cc to 0x7c6410 (68 bytes)
//
// 2 xrefs:
// > cocos2d::CCPoolManager::finalize @ 0x7c6484
// > cocos2d::CCPoolManager::pop @ 0x7c6506
//
// 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:25 +0000
//
int __fastcall cocos2d::CCAutoreleasePool::clear(cocos2d::CCArray **this)
{
int result; // r0
int v3; // r3
_DWORD *v4; // r2
unsigned int v5; // r0
int *v6; // r3
int v7; // r2
int v8; // t1
result = cocos2d::CCArray::count(*(this + 13));
if ( result )
{
v3 = (int)*(this + 13);
if ( v3 )
{
v4 = *(_DWORD **)(v3 + 52);
if ( *v4 )
{
v5 = v4[3];
v6 = (int *)(v5 + 4 * (*v4 + 0x3FFFFFFF));
while ( (unsigned int)v6 >= v5 )
{
v8 = *v6--;
v7 = v8;
if ( !v8 )
break;
--*(_DWORD *)(v7 + 20);
}
}
}
return cocos2d::CCArray::removeAllObjects(*(this + 13));
}
return result;
}