//
// cocos2d::CCPoolManager::dCCPoolManager from 0x1003f6a40 to 0x1003f6b2f (239 bytes)
//
// 2 xrefs:
// > cocos2d::CCPoolManager::purgePoolManager @ 0x1003f69b5
// > sub_1003F69E0 @ 0x1003f69e5
//
// 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
//
__int64 __fastcall cocos2d::CCPoolManager::dCCPoolManager(_QWORD *a1)
{
int v2; // eax
__int64 v3; // rdi
unsigned int *v4; // rax
__int64 *v5; // r14
unsigned __int64 v6; // r15
__int64 v7; // r12
__int64 v8; // rdi
unsigned int *v9; // rax
__int64 v10; // rcx
unsigned __int64 v11; // rax
unsigned __int64 v12; // rcx
__int64 result; // rax
v2 = sub_100720070(*a1);
v3 = *a1;
if ( v2 )
{
if ( v3 )
{
v4 = *(unsigned int **)(v3 + 56);
if ( *v4 )
{
v5 = *((__int64 **)v4 + 2);
v6 = (unsigned __int64)&v5[*v4 - 1];
do
{
v7 = *v5;
if ( !*v5 )
break;
if ( (unsigned int)sub_100720070(*(_QWORD *)(v7 + 56)) )
{
v8 = *(_QWORD *)(v7 + 56);
if ( v8 )
{
v9 = *(unsigned int **)(v8 + 56);
v10 = *v9;
if ( *v9 )
{
v11 = *((_QWORD *)v9 + 2);
v12 = v11 + 8 * v10 - 8;
do
{
if ( !*(_QWORD *)v12 )
break;
--*(_DWORD *)(*(_QWORD *)v12 + 24LL);
v12 -= 8LL;
}
while ( v12 >= v11 );
}
}
sub_100720270(v8);
}
++v5;
}
while ( (unsigned __int64)v5 <= v6 );
v3 = *a1;
}
}
else
{
v3 = 0;
}
}
a1[1] = 0;
result = sub_100720230(v3, 0, 1);
if ( *a1 )
{
result = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*a1 + 16LL))(*a1);
*a1 = 0;
}
return result;
}