//
// cocos2d::ccArrayEnsureExtraCapacity from 0xb20eac to 0xb20eec (64 bytes)
//
// 10 xrefs:
// > cocos2d::CCScheduler::scheduleSelector @ 0xab13b4
// > cocos2d::ccArrayAppendObjectWithResize @ 0xb21094
// > cocos2d::ccArrayAppendObjectWithResizeNew @ 0xb210c4
// > cocos2d::ccArrayAppendObjectWithResizeBatch @ 0xb210f4
// > cocos2d::ccArrayAppendArrayWithResize @ 0xb21178
// > cocos2d::ccArrayInsertObjectAtIndex @ 0xb211b0
// > cocos2d::ccArrayInsertObjectAtIndexBatch @ 0xb21234
// > cocos2d::ccArrayAppendObjectWithResizeChild @ 0xb21484
// > cocos2d::ccCArrayEnsureExtraCapacity @ 0xb21914
// > ??> @ 0x66f18
//
// 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::ccArrayEnsureExtraCapacity(_DWORD *a1, int a2)
{
__int64 result; // x0
while ( 1 )
{
result = (unsigned int)(a2 + *a1);
if ( a1[1] >= (unsigned int)result )
break;
cocos2d::ccArrayDoubleCapacity((__int64)a1);
}
return result;
}