//
// cocos2d::extension::CCArrayForObjectSorting::removeSortedObject from 0x10042a130 to 0x10042a287 (343 bytes)
//
// 1 xrefs:
// > cocos2d::extension::CCTableView::_moveCellOutOfSight @ 0x10042cdbd
//
// 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
//
void __fastcall cocos2d::extension::CCArrayForObjectSorting::removeSortedObject(
cocos2d::extension::CCArrayForObjectSorting *a1,
cocos2d::extension::CCSortableObject *a2)
{
unsigned int v2; // eax
unsigned int v3; // r15d
unsigned int v4; // r12d
cocos2d::ccArray *data; // rax
const void **arr; // r13
unsigned int v7; // r14d
void *v8; // rax
unsigned int v9; // eax
const void *v10; // rax
void *v11; // rax
int v12; // r12d
const void **v13; // [rsp+8h] [rbp-38h]
if ( (unsigned int)sub_100720070(a1) )
{
if ( a2 )
{
v2 = ((__int64 (__fastcall *)(cocos2d::extension::CCSortableObject *))a2->getObjectID)(a2);
v3 = 0;
if ( a1 )
{
v4 = v2;
data = a1->data;
if ( data->num )
{
arr = (const void **)data->arr;
v13 = &arr[data->num - 1];
v3 = 0;
v7 = 0;
do
{
if ( !*arr )
break;
v8 = __dynamic_cast(
*arr,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::extension::CCSortableObject,
-2);
v9 = (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v8 + 24LL))(v8);
if ( v4 == v9 )
break;
if ( v4 < v9 && v4 >= v7 )
break;
++v3;
++arr;
v7 = v9;
}
while ( arr <= v13 );
}
}
if ( v3 < (unsigned int)sub_100720070(a1) )
{
v10 = (const void *)sub_1007200C0(a1, v3);
v11 = __dynamic_cast(
v10,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::extension::CCSortableObject,
-2);
v12 = (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v11 + 24LL))(v11);
if ( v12 == ((unsigned int (__fastcall *)(cocos2d::extension::CCSortableObject *))a2->getObjectID)(a2) )
sub_100720230(a1, v3, 1);
}
}
else
{
sub_100720070(a1);
}
}
}