//
// sub_100667F20 from 0x100667f20 to 0x100667f69 (73 bytes)
//
// 1 xrefs:
// > cocos2d::CCArray::fastRemoveObjectAtIndexNew @ 0x100720299
//
// 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 sub_100667F20(__int64 a1, unsigned int a2)
{
__int64 v3; // r14
__int64 result; // rax
__int64 v5; // rcx
cocos2d::CCObject *v6; // rdi
v3 = (unsigned int)(*(_DWORD *)a1 - 1);
*(_DWORD *)a1 = v3;
result = *(_QWORD *)(a1 + 16);
v5 = *(_QWORD *)(result + 8 * v3);
*(_DWORD *)(v5 + 32) = a2;
v6 = *(cocos2d::CCObject **)(result + 8LL * a2);
if ( v6 )
{
cocos2d::CCObject::release(v6);
result = *(_QWORD *)(a1 + 16);
v5 = *(_QWORD *)(result + 8 * v3);
}
*(_QWORD *)(result + 8LL * a2) = v5;
return result;
}