//
// sub_1800A1B70 from 0x1800a1b70 to 0x1800a1bd6 (102 bytes)
//
// 7 xrefs:
// > cocos2d::CCArray::removeLastObject @ 0x18000734c
// > cocos2d::CCArray::removeObjectAtIndex @ 0x180007374
// > cocos2d::CCArray::replaceObjectAtIndex @ 0x1800073d5
// > cocos2d::CCActionManager::removeActionAtIndex @ 0x180038c00
// > cocos2d::CCParallaxNode::removeChild @ 0x1800ae551
// > cocos2d::CCScheduler::unscheduleSelector @ 0x1800c62c5
// > ??> @ 0x1801c1794
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 11:22:13 +0000
//
unsigned __int64 __fastcall sub_1800A1B70(__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;
}