//
// cocos2d::ccArrayInsertObjectAtIndex from 0x7f76a4 to 0x7f76de (58 bytes)
//
// 2 xrefs:
// > cocos2d::CCArray::insertObject @ 0x7c9256
// > cocos2d::CCArray::replaceObjectAtIndex @ 0x7c92de
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:01:10 +0000
//
int __fastcall cocos2d::ccArrayInsertObjectAtIndex(_DWORD *a1, int a2, int a3)
{
int result; // r0
cocos2d::ccArrayEnsureExtraCapacity(a1, 1);
if ( *a1 != a3 )
memmove((void *)(4 * (a3 + 1) + a1[3]), (const void *)(4 * (a3 + 1) - 4 + a1[3]), 4 * (*a1 - a3));
result = cocos2d::CCObject::retain(a2);
*(_DWORD *)(a1[3] + 4 * a3) = a2;
++*a1;
return result;
}