//
// cocos2d::ccArrayRemoveObjectAtIndexChild from 0xb21348 to 0xb213b0 (104 bytes)
//
// 2 xrefs:
// > cocos2d::CCArray::removeObjectAtIndexChild @ 0xad462c
// > ??> @ 0x2bb30
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall cocos2d::ccArrayRemoveObjectAtIndexChild(int *a1, unsigned int a2, char a3)
{
__int64 v4; // x20
cocos2d::CCObject **v5; // x3
cocos2d::CCObject *v6; // x0
int v7; // w0
__int64 result; // x0
v4 = 8LL * a2;
v5 = (cocos2d::CCObject **)(*((_QWORD *)a1 + 2) + v4);
v6 = *v5;
(*v5)->m_uUnknown = -1;
if ( a3 )
{
cocos2d::CCObject::release(v6);
v5 = (cocos2d::CCObject **)(*((_QWORD *)a1 + 2) + v4);
}
v7 = *a1;
if ( a1[2] == -1 )
a1[2] = v7;
result = (unsigned int)(v7 - 1);
*a1 = result;
*v5 = nullptr;
return result;
}