//
// sub_1800A1A20 from 0x1800a1a20 to 0x1800a1ad5 (181 bytes)
//
// 4 xrefs:
// > cocos2d::CCArray::removeObjectsInArray @ 0x180007398
// > ??> @ 0x180148288
// > ??> @ 0x180148298
// > ??> @ 0x1801c174c
//
// 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
//
void __fastcall sub_1800A1A20(__int64 a1, __int64 a2)
{
__int64 i; // rdi
__int64 v5; // rbx
_QWORD *v6; // rax
cocos2d::CCObject *v7; // rcx
for ( i = 0; (unsigned int)i < *(_DWORD *)a2; i = (unsigned int)(i + 1) )
{
v5 = 0;
v6 = *(_QWORD **)(a1 + 16);
if ( *(_DWORD *)a1 )
{
while ( *v6 != *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * i) )
{
v5 = (unsigned int)(v5 + 1);
++v6;
if ( (unsigned int)v5 >= *(_DWORD *)a1 )
goto LABEL_11;
}
if ( (_DWORD)v5 != -1 )
{
v7 = *(cocos2d::CCObject **)(8 * v5 + *(_QWORD *)(a1 + 16));
if ( v7 )
cocos2d::CCObject::release(v7);
if ( --*(_DWORD *)a1 != (_DWORD)v5 )
memmove(
(void *)(8 * v5 + *(_QWORD *)(a1 + 16)),
(const void *)(*(_QWORD *)(a1 + 16) + 8LL * (unsigned int)(v5 + 1)),
8LL * (unsigned int)(*(_DWORD *)a1 - v5));
}
}
LABEL_11:
;
}
}