//
// sub_18009D9E0 from 0x18009d9e0 to 0x18009da42 (98 bytes)
//
// 2 xrefs:
// > cocos2d::CCArray::fastRemoveObjectAtIndexNew @ 0x180006ee4
// > ??> @ 0x1801b7464
//
// 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_18009D9E0(__int64 a1, unsigned int a2)
{
__int64 v3; // rdi
__int64 v4; // rsi
cocos2d::CCObject *v5; // rcx
__int64 v6; // rcx
__int64 result; // rax
v3 = 8LL * (unsigned int)--*(_DWORD *)a1;
*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 16) + v3) + 32LL) = a2;
v4 = 8LL * a2;
v5 = *(cocos2d::CCObject **)(v4 + *(_QWORD *)(a1 + 16));
if ( v5 )
cocos2d::CCObject::release(v5);
v6 = *(_QWORD *)(a1 + 16);
result = *(_QWORD *)(v6 + v3);
*(_QWORD *)(v6 + v4) = result;
return result;
}