//
// cocos2d::ccCArrayInsertValueAtIndex from 0x7f7a52 to 0x7f7a8c (58 bytes)
//
// 2 xrefs:
// > cocos2d::CCTMXLayer::insertTileForGID @ 0x8041fc
// > cocos2d::CCTMXLayer::appendTileForGID @ 0x804444
//
// 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:11 +0000
//
_DWORD *__fastcall cocos2d::ccCArrayInsertValueAtIndex(_DWORD *result, int a2, int a3)
{
_DWORD *v4; // r4
int v6; // r7
v4 = result;
v6 = *result - a3;
if ( *result + 1 == result[1] )
result = cocos2d::ccCArrayDoubleCapacity((int)result);
if ( v6 )
result = memmove((void *)(4 * (a3 + 1) + v4[3]), (const void *)(4 * (a3 + 1) - 4 + v4[3]), 4 * v6);
++*v4;
*(_DWORD *)(v4[3] + 4 * a3) = a2;
return result;
}