//
// cocos2d::extension::CCArrayForObjectSorting::setObjectID_ofSortedObject from 0x5aa954 to 0x5aaa04 (176 bytes)
//
// 0 xrefs:
//
// 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 cocos2d::extension::CCArrayForObjectSorting::setObjectID_ofSortedObject(
cocos2d::extension::CCArrayForObjectSorting *a1,
unsigned int a2,
cocos2d::extension::CCSortableObject *a3)
{
unsigned int v6; // r5
const void *v7; // r0
cocos2d::extension::CCSortableObject *v8; // r0
cocos2d::extension::CCSortableObject *v9; // r4
cocos2d::CCObject *v10; // r7
int v11; // r8
v6 = cocos2d::extension::CCArrayForObjectSorting::indexOfSortedObject(a1, a3);
if ( v6 < cocos2d::CCArray::count(a1) && v6 != -1 )
{
v7 = (const void *)cocos2d::CCArray::objectAtIndex(a1, v6);
if ( !v7
|| (v8 = (cocos2d::extension::CCSortableObject *)_dynamic_cast(
v7,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::extension::CCSortableObject,
-2),
(v9 = v8) == nullptr) )
{
cocos2d::CCObject::retain(nullptr);
__und(0xFFu);
}
v10 = (cocos2d::CCObject *)_dynamic_cast(
v8,
(const struct __class_type_info *)&`typeinfo for'cocos2d::extension::CCSortableObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
-2);
cocos2d::CCObject::retain(v10);
v11 = v9->getObjectID(v9);
if ( v11 == a3->getObjectID(a3) )
{
cocos2d::CCArray::removeObjectAtIndex(a1, v6, 1);
v9->setObjectID(v9, a2);
cocos2d::extension::CCArrayForObjectSorting::insertSortedObject(a1, v9);
}
cocos2d::CCObject::release(v10);
}
}