//
// cocos2d::extension::CCArrayForObjectSorting::removeSortedObject from 0xd1b010 to 0xd1b0e0 (208 bytes)
//
// 2 xrefs:
// > cocos2d::extension::CCTableView::_moveCellOutOfSight @ 0xd1a31c
// > ??> @ 0xe8378
//
// This function is hookable on this platform (idp: arm, 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 13:07:08 +0000
//
__int64 __fastcall cocos2d::extension::CCArrayForObjectSorting::removeSortedObject(cocos2d::CCArray *a1, __int64 a2)
{
__int64 result; // x0
unsigned int v5; // w21
const void *v6; // x0
void *v7; // x0
int v8; // w22
result = cocos2d::CCArray::count(a1);
if ( (_DWORD)result )
{
v5 = cocos2d::extension::CCArrayForObjectSorting::indexOfSortedObject((__int64)a1, a2);
result = cocos2d::CCArray::count(a1);
if ( v5 < (unsigned int)result && v5 != -1 )
{
v6 = (const void *)cocos2d::CCArray::objectAtIndex(a1, v5);
if ( v6 )
{
v7 = _dynamic_cast(
v6,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::extension::CCSortableObject,
-2);
v8 = (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v7 + 24LL))(v7);
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 24LL))(a2);
if ( v8 == (_DWORD)result )
return cocos2d::CCArray::removeObjectAtIndex(a1, v5, 1);
}
else
{
__break(0x3E8u);
return cocos2d::extension::CCArrayForObjectSorting::setObjectID_ofSortedObject(0x10102464C457FLL, 0);
}
}
}
return result;
}