//
// sub_1003F2EAC from 0x1003f2eac to 0x1003f2f04 (88 bytes)
//
// 6 xrefs:
// > cocos2d::CCScheduler::scheduleSelector @ 0x10023f5d4
// > sub_1003F3020 @ 0x1003f3038
// > sub_1003F3064 @ 0x1003f307c
// > sub_1003F30B4 @ 0x1003f30cc
// > sub_1003F3164 @ 0x1003f317c
// > sub_1003F3194 @ 0x1003f31b4
//
// 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 11:04:31 +0000
//
_DWORD *__fastcall sub_1003F2EAC(_DWORD *result, int a2)
{
unsigned int v2; // w8
_DWORD *v4; // x20
unsigned int v5; // w8
v2 = result[1];
if ( v2 < *result + a2 )
{
v4 = result;
result = *((_DWORD **)result + 2);
do
{
v5 = 2 * v2;
v4[1] = v5;
result = realloc(result, 8LL * v5);
*((_QWORD *)v4 + 2) = result;
v2 = v4[1];
}
while ( v2 < *v4 + a2 );
}
return result;
}