//
// cocos2d::ccArrayInsertObjectAtIndex from 0xd91cec to 0xd91d70 (132 bytes)
//
// 3 xrefs:
// > cocos2d::CCArray::insertObject @ 0xd4741c
// > cocos2d::CCArray::replaceObjectAtIndex @ 0xd47510
// > ??> @ 0x100e28
//
// 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:08:19 +0000
//
__int64 __fastcall cocos2d::ccArrayInsertObjectAtIndex(__int64 a1, __int64 a2, unsigned int a3)
{
__int64 result; // x0
cocos2d::ccArrayEnsureExtraCapacity((_DWORD *)a1, 1);
if ( *(_DWORD *)a1 != a3 )
memmove(
(void *)(*(_QWORD *)(a1 + 16) + 8LL * (a3 + 1)),
(const void *)(*(_QWORD *)(a1 + 16) + 8LL * a3),
8LL * (*(_DWORD *)a1 - a3));
cocos2d::CCObject::retain(a2);
*(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * a3) = a2;
result = (unsigned int)(*(_DWORD *)a1 + 1);
*(_DWORD *)a1 = result;
return result;
}