//
// cocos2d::CCAutoreleasePool::clear from 0x100245008 to 0x10024507c (116 bytes)
//
// 2 xrefs:
// > cocos2d::CCPoolManager::finalize @ 0x1002451e8
// > cocos2d::CCPoolManager::pop @ 0x100245284
//
// 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:26 +0000
//
double __fastcall cocos2d::CCAutoreleasePool::clear(__int64 a1)
{
double result; // d0
__int64 v3; // x0
unsigned int *v4; // x8
__int64 v5; // x9
unsigned __int64 v6; // x8
unsigned __int64 v7; // x9
if ( (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 56)) )
{
v3 = *(_QWORD *)(a1 + 56);
if ( v3 )
{
v4 = *(unsigned int **)(v3 + 56);
v5 = *v4;
if ( (_DWORD)v5 )
{
v6 = *((_QWORD *)v4 + 2);
v7 = v6 + 8 * v5 - 8;
do
{
if ( !*(_QWORD *)v7 )
break;
--*(_DWORD *)(*(_QWORD *)v7 + 24LL);
v7 -= 8LL;
}
while ( v7 >= v6 );
}
}
*(_QWORD *)&result = sub_1002E7674(v3).n128_u64[0];
}
return result;
}