//
// cocos2d::CCSet::containsObject from 0x5c1670 to 0x5c16a2 (50 bytes)
//
// 3 xrefs:
// > BoomScrollLayer::claimTouch @ 0x2e299e
// > TableView::claimTouch @ 0x2e995c
// > cocos2d::CCTouchDispatcher::touches @ 0x5fab84
//
// 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
//
bool cocos2d::CCSet::containsObject(cocos2d::CCSet *a1, cocos2d::CCObject *a2)
{
std::_Rb_tree_node_base *p_M_header; // r3
std::_Rb_tree_node_base::_Base_ptr M_parent; // r2
std::_Rb_tree_node_base *v4; // r0
std::_Rb_tree_node_base *M_left; // r4
p_M_header = &a1->m_pSet->_M_t._M_impl._M_header;
M_parent = a1->m_pSet->_M_t._M_impl._M_header._M_parent;
v4 = p_M_header;
while ( M_parent )
{
if ( M_parent[1]._M_color >= (unsigned int)a2 )
{
M_left = M_parent->_M_left;
}
else
{
M_left = M_parent->_M_right;
M_parent = v4;
}
v4 = M_parent;
M_parent = M_left;
}
if ( v4 != p_M_header && (unsigned int)a2 < v4[1]._M_color )
v4 = p_M_header;
return v4 != p_M_header;
}