//
// cocos2d::CCSet::CCSet from 0xad31c4 to 0xad32b0 (236 bytes)
//
// 3 xrefs:
// > cocos2d::CCSet::copy @ 0xad32d0
// > ??> @ 0x5ba58
// > ??> @ 0x72a98
//
// 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
//
// Alternative name is '_ZN7cocos2d5CCSetC2ERKS0_'
__int64 __fastcall cocos2d::CCSet::CCSet(cocos2d::CCSet *this, const cocos2d::CCSet *a2)
{
__int64 result; // x0
__int64 v4; // x21
std::set *v5; // x19
std::set *m_pSet; // x22
int *M_parent; // x1
__int64 v8; // x2
__int64 M_left; // x19
cocos2d::CCObject::CCObject(this);
this->__vftable = (cocos2d::CCSet_vtbl *)&off_1200AF0;
result = operator new(0x30u);
v4 = result + 8;
v5 = (std::set *)result;
m_pSet = a2->m_pSet;
*(_QWORD *)(result + 16) = 0;
*(_QWORD *)(result + 24) = result + 8;
*(_QWORD *)(result + 32) = result + 8;
*(_DWORD *)(result + 8) = 0;
M_parent = (int *)m_pSet->_M_t._M_impl._M_header._M_parent;
*(_QWORD *)(result + 40) = 0;
if ( M_parent )
{
result = std::_Rb_tree,std::less,std::allocator>::_M_copy(
result,
M_parent,
result + 8);
v8 = result;
v5->_M_t._M_impl._M_header._M_parent = (std::_Rb_tree_node_base::_Base_ptr)result;
while ( *(_QWORD *)(v8 + 16) )
v8 = *(_QWORD *)(v8 + 16);
v5->_M_t._M_impl._M_header._M_left = (std::_Rb_tree_node_base::_Base_ptr)v8;
while ( *(_QWORD *)(result + 24) )
result = *(_QWORD *)(result + 24);
v5->_M_t._M_impl._M_node_count = m_pSet->_M_t._M_impl._M_node_count;
v5->_M_t._M_impl._M_header._M_right = (std::_Rb_tree_node_base::_Base_ptr)result;
}
this->m_pSet = v5;
M_left = (__int64)v5->_M_t._M_impl._M_header._M_left;
if ( M_left != v4 )
{
do
{
result = *(_QWORD *)(M_left + 32);
if ( !result )
break;
cocos2d::CCObject::retain((cocos2d::CCObject *)result);
M_left = sub_CFAB74(M_left);
result = (__int64)&this->m_pSet->_M_t._M_impl._M_header;
}
while ( M_left != result );
}
return result;
}