//
// cocos2d::CCPoolManager::pop from 0x1003f6cc0 to 0x1003f6d6e (174 bytes)
//
// 2 xrefs:
// > cocos2d::CCDirector::dCCDirector @ 0x100482ab5
// > cocos2d::CCDisplayLinkDirector::mainLoop @ 0x100484cd1
//
// 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::CCPoolManager::pop(cocos2d::CCPoolManager *a1)
{
int v2; // r14d
cocos2d::CCAutoreleasePool *m_pCurReleasePool; // r15
cocos2d::CCArray *m_pManagedObjectArray; // rdi
cocos2d::ccArray *data; // rax
__int64 num; // rcx
unsigned __int64 arr; // rax
unsigned __int64 v8; // rcx
if ( a1->m_pCurReleasePool )
{
v2 = sub_100720070(a1->m_pReleasePoolStack);
m_pCurReleasePool = a1->m_pCurReleasePool;
if ( (unsigned int)sub_100720070(m_pCurReleasePool->m_pManagedObjectArray) )
{
m_pManagedObjectArray = m_pCurReleasePool->m_pManagedObjectArray;
if ( m_pManagedObjectArray )
{
data = m_pManagedObjectArray->data;
num = data->num;
if ( data->num )
{
arr = (unsigned __int64)data->arr;
v8 = arr + 8 * num - 8;
do
{
if ( !*(_QWORD *)v8 )
break;
--*(_DWORD *)(*(_QWORD *)v8 + 24LL);
v8 -= 8LL;
}
while ( v8 >= arr );
}
}
sub_100720270(m_pManagedObjectArray);
}
if ( v2 >= 2 )
{
sub_100720230(a1->m_pReleasePoolStack, (unsigned int)(v2 - 1), 1);
a1->m_pCurReleasePool = (cocos2d::CCAutoreleasePool *)sub_1007200C0(
a1->m_pReleasePoolStack,
(unsigned int)(v2 - 2));
}
}
}