//
// cocos2d::extension::CCArrayForObjectSorting::setObjectID_ofSortedObject from 0x7b05b8 to 0x7b0668 (176 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:00:06 +0000
//
unsigned int __fastcall cocos2d::extension::CCArrayForObjectSorting::setObjectID_ofSortedObject(
cocos2d::CCArray *a1,
int a2,
int a3)
{
unsigned int v6; // r5
unsigned int result; // r0
const void *v8; // r0
void *v9; // r0
void *v10; // r4
cocos2d::CCObject *v11; // r7
int v12; // r8
v6 = cocos2d::extension::CCArrayForObjectSorting::indexOfSortedObject((int)a1, a3);
result = cocos2d::CCArray::count(a1);
if ( v6 < result && v6 != -1 )
{
v8 = (const void *)cocos2d::CCArray::objectAtIndex(a1, v6);
if ( !v8
|| (v9 = _dynamic_cast(
v8,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::extension::CCSortableObject,
-2),
(v10 = v9) == nullptr) )
{
cocos2d::CCObject::retain(nullptr);
__und(0xFFu);
}
v11 = (cocos2d::CCObject *)_dynamic_cast(
v9,
(const struct __class_type_info *)&`typeinfo for'cocos2d::extension::CCSortableObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
-2);
cocos2d::CCObject::retain(v11);
v12 = (*(int (__fastcall **)(void *))(*(_DWORD *)v10 + 12))(v10);
if ( v12 == (*(int (__fastcall **)(int))(*(_DWORD *)a3 + 12))(a3) )
{
cocos2d::CCArray::removeObjectAtIndex(a1, v6, 1);
(*(void (__fastcall **)(void *, int))(*(_DWORD *)v10 + 8))(v10, a2);
cocos2d::extension::CCArrayForObjectSorting::insertSortedObject(a1, v10);
}
return cocos2d::CCObject::release(v11);
}
return result;
}