//
// cocos2d::CCSet::anyObject from 0x1007b39e0 to 0x1007b3a51 (113 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
//
cocos2d::CCObject *__fastcall cocos2d::CCSet::anyObject(cocos2d::CCSet *a1)
{
std::set *m_pSet; // rcx
std::__compressed_pair *>> *begin_node; // rdx
std::__compressed_pair *>> *p_pair1; // rcx
cocos2d::CCObject *result; // rax
std::__compressed_pair *>> *left; // rsi
std::__compressed_pair *>> *v6; // rax
bool v7; // zf
m_pSet = a1->m_pSet;
if ( !m_pSet )
return nullptr;
if ( !m_pSet->__tree_.__pair3_.__value_ )
return nullptr;
begin_node = (std::__compressed_pair *>> *)m_pSet->__tree_.__begin_node_;
p_pair1 = &m_pSet->__tree_.__pair1_;
if ( begin_node == p_pair1 )
return nullptr;
while ( 1 )
{
result = (cocos2d::CCObject *)begin_node[4].__value_.__left_;
if ( result )
break;
left = (std::__compressed_pair *>> *)begin_node[1].__value_.__left_;
if ( left )
{
do
{
v6 = left;
left = (std::__compressed_pair *>> *)left->__value_.__left_;
}
while ( left );
}
else
{
do
{
v6 = (std::__compressed_pair *>> *)begin_node[2].__value_.__left_;
v7 = v6->__value_.__left_ == (std::__tree_end_node *>::pointer)begin_node;
begin_node = v6;
}
while ( !v7 );
}
begin_node = v6;
if ( v6 == p_pair1 )
return nullptr;
}
return result;
}