//
// cocos2d::CCPoolManager::pop from 0xd41624 to 0xd41684 (96 bytes)
//
// 3 xrefs:
// > cocos2d::CCDirector::~CCDirector @ 0xd48830
// > cocos2d::CCDisplayLinkDirector::mainLoop @ 0xd4a2fc
// > ??> @ 0x6f550
//
// 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 13:07:31 +0000
//
__int64 __fastcall cocos2d::CCPoolManager::pop(__int64 this)
{
__int64 v1; // x19
int v2; // w20
if ( *(_QWORD *)(this + 8) )
{
v1 = this;
v2 = cocos2d::CCArray::count(*(cocos2d::CCArray **)this);
this = cocos2d::CCAutoreleasePool::clear(*(cocos2d::CCArray ***)(v1 + 8));
if ( v2 > 1 )
{
cocos2d::CCArray::removeObjectAtIndex(*(cocos2d::CCArray **)v1, v2 - 1, 1);
this = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)v1, v2 - 2);
*(_QWORD *)(v1 + 8) = this;
}
}
return this;
}