//
// cocos2d::CCAutoreleasePool::clear from 0x1003e3a30 to 0x1003e3a96 (102 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: pc, 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 12:29:46 +0000
//
__int64 __fastcall cocos2d::CCAutoreleasePool::clear(__int64 a1)
{
__int64 result; // rax
__int64 v2; // rdi
unsigned int *v3; // rax
__int64 v4; // rcx
unsigned __int64 v5; // rax
unsigned __int64 v6; // rcx
result = sub_1007FEF90(*(_QWORD *)(a1 + 56));
if ( (_DWORD)result )
{
v2 = *(_QWORD *)(a1 + 56);
if ( v2 )
{
v3 = *(unsigned int **)(v2 + 56);
v4 = *v3;
if ( *v3 )
{
v5 = *((_QWORD *)v3 + 2);
v6 = v5 + 8 * v4 - 8;
do
{
if ( !*(_QWORD *)v6 )
break;
--*(_DWORD *)(*(_QWORD *)v6 + 24LL);
v6 -= 8LL;
}
while ( v6 >= v5 );
}
}
return sub_1007FF190(v2);
}
return result;
}