//
// sub_1003F34F8 from 0x1003f34f8 to 0x1003f3548 (80 bytes)
//
// 7 xrefs:
// > cocos2d::CCTouchDispatcher::removeDelegate @ 0x1001cdce4
// > cocos2d::CCKeypadDispatcher::removeDelegate @ 0x100242410
// > cocos2d::CCKeypadDispatcher::addDelegate @ 0x1002424ec
// > cocos2d::CCKeyboardDispatcher::removeDelegate @ 0x1002d654c
// > sub_1002D6608 @ 0x1002d6628
// > cocos2d::CCMouseDispatcher::removeDelegate @ 0x10039ab38
// > cocos2d::CCMouseDispatcher::addDelegate @ 0x10039ac14
//
// 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
//
unsigned int *__fastcall sub_1003F34F8(unsigned int *result, __int64 a2)
{
unsigned int v2; // w8
__int64 v3; // x10
unsigned int *v4; // x19
unsigned int v5; // w8
v3 = *result;
v2 = result[1];
*(_QWORD *)(*((_QWORD *)result + 2) + 8 * v3) = a2;
*result = v3 + 1;
if ( (int)v3 + 1 >= v2 )
{
v4 = result;
v5 = 2 * v2;
result[1] = v5;
result = (unsigned int *)realloc(*((void **)result + 2), 8LL * v5);
*((_QWORD *)v4 + 2) = result;
}
return result;
}