//
// LevelEditorLayer::applyGroupState from 0x1402e13d0 to 0x1402e149d (205 bytes)
//
// 8 xrefs:
// > EditorUI::onPasteState @ 0x1401144fe
// > EditorUI::onPasteState @ 0x140114537
// > LevelEditorLayer::copyObjectState @ 0x1402e13b8
// > SetGroupIDLayer::onPaste @ 0x1403fb7de
// > SetGroupIDLayer::onPaste @ 0x1403fb817
// > ??> @ 0x14068ef00
// > ??> @ 0x14068ef10
// > ??> @ 0x1406d3650
//
// 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
//
void LevelEditorLayer::applyGroupState(LevelEditorLayer *a1, GameObject *a2, GameObject *a3)
{
int v6; // ebp
__int64 v7; // rsi
unsigned __int64 v8; // rdi
std::array *m_groups; // rax
int v10; // ebx
_BOOL8 v11; // r9
GJBaseGameLayer::removeFromGroups(a1, a2);
a2->m_groupCount = 0;
v6 = 0;
a2->m_enabledGroupsCounter = 0;
a2->m_isGroupDisabled = 0;
if ( a3->m_groupCount > 0 )
{
v7 = 0;
v8 = 0;
do
{
if ( v8 <= 9 && (m_groups = a3->m_groups) != nullptr )
v10 = m_groups->_Elems[v7];
else
v10 = 0;
if ( a2->addToGroup(a2, v10) == 1 )
{
LOBYTE(v11) = 1;
a1->addToGroup(a1, a2, v10, v11);
}
++v6;
++v8;
++v7;
}
while ( v6 < a3->m_groupCount );
}
}