//
// LevelEditorLayer::validGroup from 0x1003fa5c8 to 0x1003fa67c (180 bytes)
//
// 5 xrefs:
// > EditorUI::selectAll @ 0x1001a6420
// > EditorUI::selectAllWithDirection @ 0x1001a6524
// > LevelEditorLayer::objectsInRect @ 0x1003faab0
// > LevelEditorLayer::objectAtPosition @ 0x1003fad38
// > LevelEditorLayer::objectsAtPosition @ 0x1003fb364
//
// 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:04:35 +0000
//
bool __fastcall LevelEditorLayer::validGroup(__int64 a1, __int64 a2, int a3)
{
int v3; // w10
int v4; // w9
int v5; // w11
_BOOL8 v8; // x8
int v9; // w11
int v10; // w8
unsigned __int64 v11; // x10
__int64 v12; // x8
v3 = *(unsigned __int16 *)(a2 + 1202);
if ( *(_WORD *)(a2 + 1204) )
LOWORD(v4) = *(_WORD *)(a2 + 1204);
else
LOWORD(v4) = -1;
v5 = *(unsigned __int16 *)(a1 + 14210);
v8 = v5 == 0xFFFF || v5 == v3 || v5 == (unsigned __int16)v4;
if ( a3 )
{
v9 = (__int16)v4;
if ( (__int16)v4 >= 9999 )
v4 = 9999;
else
v4 = (__int16)v4;
if ( v4 < 0 )
v4 = -1;
if ( v8 )
{
v10 = (__int16)v3;
if ( (__int16)v3 >= 9999 )
v10 = 9999;
v11 = v10 & (unsigned int)~(v10 >> 31);
v12 = *(_QWORD *)(a1 + 14528);
if ( ((*(_QWORD *)(v12 + ((v11 >> 3) & 0x7F8)) >> v11) & 1) != 0 )
return 0;
else
return v9 < 0 || ((*(_QWORD *)(v12 + (((unsigned int)v4 >> 3) & 0x1FF8LL)) >> v4) & 1LL) == 0;
}
}
return v8;
}