//
// EditorUI::assignNewGroups from 0x10047a8d4 to 0x10047aa08 (308 bytes)
//
// 3 xrefs:
// > EditorUI::handleEditorAction @ 0x100162c0c
// > EditorUI::handleEditorAction @ 0x100162d4c
// > EditorCommandsPopup::onCommand @ 0x1004c5be4
//
// 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:05:43 +0000
//
void __fastcall EditorUI::assignNewGroups(__int64 *a1, int a2)
{
_QWORD *v4; // x0
_QWORD *v5; // x21
int (__cdecl *v6)(const void *, const void *); // x3
unsigned int *v7; // x9
__int64 v8; // x8
__int64 *v9; // x22
unsigned __int64 v10; // x23
__int64 v11; // x20
__int64 v12; // x0
__int64 v13; // x21
_OWORD v14[2]; // [xsp+0h] [xbp-60h] BYREF
int v15; // [xsp+20h] [xbp-40h]
if ( a1[187] || (unsigned int)sub_1002E757C(a1[112]) )
{
v4 = sub_1002E736C();
v5 = v4;
if ( a1[187] )
sub_1002E74E0((__int64)v4);
else
sub_1002E7570((__int64)v4, a1[112]);
if ( a2 )
v6 = (int (__cdecl *)(const void *, const void *))sub_1001A8A3C;
else
v6 = (int (__cdecl *)(const void *, const void *))sub_1001A89D8;
qsort(*(void **)(v5[7] + 16LL), *(unsigned int *)v5[7], 8u, v6);
v7 = (unsigned int *)v5[7];
v8 = *v7;
if ( (_DWORD)v8 )
{
v9 = *((__int64 **)v7 + 2);
v10 = (unsigned __int64)&v9[v8 - 1];
do
{
v11 = *v9;
if ( !*v9 )
break;
v12 = a1[180];
memset(v14, 0, sizeof(v14));
v15 = 1065353216;
v13 = sub_100400CC4(v12, (__int64)v14);
sub_1000184EC((__int64)v14);
if ( (*(unsigned int (__fastcall **)(__int64, __int64))(*(_QWORD *)v11 + 1600LL))(v11, v13) == 1 )
(*(void (__fastcall **)(__int64, __int64, __int64, _QWORD))(*(_QWORD *)a1[180] + 1352LL))(
a1[180],
v11,
v13,
0);
++v9;
}
while ( (unsigned __int64)v9 <= v10 );
}
EditorUI::updateObjectInfoLabel((__int64)a1);
}
}