//
// cocos2d::CCAutoreleasePool::clear from 0x1001aff1c to 0x1001aff90 (116 bytes)
//
// 2 xrefs:
// > cocos2d::CCPoolManager::finalize @ 0x1001b00fc
// > cocos2d::CCPoolManager::pop @ 0x1001b0198
//
// 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::CCAutoreleasePool::clear(cocos2d::CCAutoreleasePool *a1)
{
cocos2d::CCArray *m_pManagedObjectArray; // x0
cocos2d::ccArray *data; // x8
__int64 num; // x9
unsigned __int64 arr; // x8
unsigned __int64 v6; // x9
if ( (unsigned int)sub_10024A36C(a1->m_pManagedObjectArray) )
{
m_pManagedObjectArray = a1->m_pManagedObjectArray;
if ( m_pManagedObjectArray )
{
data = m_pManagedObjectArray->data;
num = data->num;
if ( (_DWORD)num )
{
arr = (unsigned __int64)data->arr;
v6 = arr + 8 * num - 8;
do
{
if ( !*(_QWORD *)v6 )
break;
--*(_DWORD *)(*(_QWORD *)v6 + 24LL);
v6 -= 8LL;
}
while ( v6 >= arr );
}
}
sub_10024A45C(m_pManagedObjectArray);
}
}