//
// sub_18009DEE0 from 0x18009dee0 to 0x18009df46 (102 bytes)
//
// 7 xrefs:
// > cocos2d::CCArray::removeLastObject @ 0x1800071fc
// > cocos2d::CCArray::removeObjectAtIndex @ 0x180007224
// > cocos2d::CCArray::replaceObjectAtIndex @ 0x180007285
// > cocos2d::CCActionManager::removeActionAtIndex @ 0x1800384e0
// > cocos2d::CCParallaxNode::removeChild @ 0x1800aad51
// > cocos2d::CCScheduler::unscheduleSelector @ 0x1800c29c8
// > ??> @ 0x1801b74f4
//
// 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
//
unsigned __int64 __fastcall sub_18009DEE0(__int64 a1, unsigned int a2, char a3)
{
__int64 v5; // rdi
cocos2d::CCObject *v6; // rcx
unsigned __int64 result; // rax
v5 = 8LL * a2;
if ( a3 )
{
v6 = *(cocos2d::CCObject **)(v5 + *(_QWORD *)(a1 + 16));
if ( v6 )
cocos2d::CCObject::release(v6);
}
result = --*(_DWORD *)a1 - a2;
if ( *(_DWORD *)a1 != a2 )
return (unsigned __int64)memmove(
(void *)(*(_QWORD *)(a1 + 16) + v5),
(const void *)(*(_QWORD *)(a1 + 16) + 8LL * (a2 + 1)),
8LL * (unsigned int)result);
return result;
}