//
// GJBaseGameLayer::groupStickyObjects from 0x10028edb4 to 0x10028eec4 (272 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::assignNewStickyGroups @ 0x10028f038
// > EditorUI::onGroupSticky @ 0x1004716cc
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:02:02 +0000
//
double __fastcall GJBaseGameLayer::groupStickyObjects(__int64 a1, __int64 a2)
{
__int64 v4; // x0
__int64 v5; // x21
unsigned int v6; // w23
__int64 v7; // x22
__int64 v8; // x0
int v9; // w8
__int64 v11; // x22
__int64 v12; // x0
int v13; // w8
double result; // d0
v4 = sub_1002E757C(a2);
v5 = sub_1002E7510(v4);
if ( !(unsigned int)sub_1002E757C(a2) )
goto LABEL_12;
v6 = 0;
v7 = 0;
do
{
v8 = sub_1002E75A0(a2, v7);
v9 = *(_DWORD *)(v8 + 872);
if ( v6 )
{
if ( v9 >= 1 && v9 != v6 )
{
GJBaseGameLayer::ungroupStickyObjects(a1, a2);
goto LABEL_12;
}
}
else
{
v6 = *(_DWORD *)(v8 + 872);
}
v7 = (unsigned int)(v7 + 1);
}
while ( (unsigned int)v7 < (unsigned int)sub_1002E757C(a2) );
if ( !v6 )
{
LABEL_12:
v6 = *(_DWORD *)(a1 + 3888) + 1;
*(_DWORD *)(a1 + 3888) = v6;
}
if ( (unsigned int)sub_1002E757C(a2) )
{
v11 = 0;
do
{
v12 = sub_1002E75A0(a2, v11);
v13 = *(_DWORD *)(v12 + 1028);
if ( v13 != 747 && v13 != 749 )
{
*(_DWORD *)(v12 + 872) = v6;
sub_1002E74E0(v5, v12);
}
v11 = (unsigned int)(v11 + 1);
}
while ( (unsigned int)v11 < (unsigned int)sub_1002E757C(a2) );
}
*(_QWORD *)&result = cocos2d::CCDictionary::setObject_1(*(_QWORD *)(a1 + 3880), v5, v6).n128_u64[0];
return result;
}