//
// sub_1007B3450 from 0x1007b3450 to 0x1007b350e (190 bytes)
//
// 3 xrefs:
// > sub_1007B3550 @ 0x1007b3555
// > cocos2d::CCSet::copy @ 0x1007b379d
// > cocos2d::CCSet::mutableCopy @ 0x1007b37dd
//
// 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
//
_QWORD *__fastcall sub_1007B3450(_QWORD *a1, __int64 a2)
{
char *v3; // r14
_QWORD *v4; // rdx
_QWORD *v5; // r15
_QWORD *result; // rax
_QWORD *v7; // r14
cocos2d::CCObject *v8; // rdi
_QWORD *v9; // rcx
bool v10; // zf
cocos2d::CCObject::CCObject((__int64)a1);
*a1 = off_100992CA8;
v3 = (char *)operator new(0x18u);
v4 = *(_QWORD **)(a2 + 56);
v5 = v3 + 8;
*(_OWORD *)(v3 + 8) = 0;
*(_QWORD *)v3 = v3 + 8;
result = (_QWORD *)sub_1007B3A60(v3, *v4, v4 + 1);
a1[7] = v3;
v7 = *(_QWORD **)v3;
if ( v7 != v5 )
{
do
{
v8 = (cocos2d::CCObject *)v7[4];
if ( !v8 )
break;
cocos2d::CCObject::retain(v8);
v9 = (_QWORD *)v7[1];
if ( v9 )
{
do
{
result = v9;
v9 = (_QWORD *)*v9;
}
while ( v9 );
}
else
{
do
{
result = (_QWORD *)v7[2];
v10 = *result == (_QWORD)v7;
v7 = result;
}
while ( !v10 );
}
v7 = result;
}
while ( result != (_QWORD *)(a1[7] + 8LL) );
}
return result;
}