//
// SetGroupIDLayer::removeGroupID from 0x976aa0 to 0x976b78 (216 bytes)
//
// 2 xrefs:
// > SetGroupIDLayer::callRemoveFromGroup @ 0x976bdc
// > ??> @ 0x71688
//
// 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 SetGroupIDLayer::removeGroupID(SetGroupIDLayer *a1, int a2)
{
GameObject *m_targetObject; // x0
GameManager *v5; // x0
unsigned int v6; // w19
__int64 v7; // x21
GameManager *v8; // x0
bool v9; // cf
unsigned int v10; // w1
m_targetObject = a1->m_targetObject;
a1->m_addedGroup = 1;
if ( m_targetObject )
{
((void (__fastcall *)(GameObject *))m_targetObject->removeFromGroup)(m_targetObject);
v5 = GameManager::sharedState();
v5->m_levelEditorLayer->removeFromGroup(v5->m_levelEditorLayer, a1->m_targetObject, a2);
SetGroupIDLayer::updateGroupIDButtons(a1);
}
else
{
v6 = 0;
while ( 1 )
{
v9 = v6 >= (unsigned int)cocos2d::CCArray::count(a1->m_targetObjects);
v10 = v6++;
if ( v9 )
break;
v7 = cocos2d::CCArray::objectAtIndex(a1->m_targetObjects, v10);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 1592LL))(v7, (unsigned int)a2);
v8 = GameManager::sharedState();
v8->m_levelEditorLayer->removeFromGroup(v8->m_levelEditorLayer, (GameObject *)v7, a2);
}
SetGroupIDLayer::updateGroupIDButtons(a1);
}
}