//
// cocos2d::CCPoolManager::finalize from 0xd414f8 to 0xd41564 (108 bytes)
//
// 2 xrefs:
// > cocos2d::CCPoolManager::~CCPoolManager @ 0xd41574
// > ??> @ 0xd90f0
//
// 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 13:07:31 +0000
//
__int64 __fastcall cocos2d::CCPoolManager::finalize(cocos2d::CCArray **this)
{
__int64 result; // x0
unsigned int *v3; // x1
__int64 *v4; // x19
__int64 *i; // x20
result = cocos2d::CCArray::count(*this);
if ( (_DWORD)result )
{
result = (__int64)*this;
if ( *this )
{
v3 = *(unsigned int **)(result + 56);
result = *v3;
if ( (_DWORD)result )
{
v4 = *((__int64 **)v3 + 2);
for ( i = &v4[(unsigned int)result - 1];
i >= v4;
result = cocos2d::CCAutoreleasePool::clear((cocos2d::CCArray **)result) )
{
result = *v4;
if ( !*v4 )
break;
++v4;
}
}
}
}
return result;
}