//
// sub_4856E8 from 0x4856e8 to 0x485758 (112 bytes)
//
// 4 xrefs:
// > EditorUI::createGradientFromSelection @ 0x487abc
// > EditorUI::createGradientFromSelection @ 0x487ac8
// > EditorUI::createGradientFromSelection @ 0x487ad2
// > EditorUI::createGradientFromSelection @ 0x487adc
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:49:25 +0000
//
int __fastcall sub_4856E8(int *a1, GameObject *a2)
{
int v4; // r2
LevelEditorLayer *v5; // r0
int NextFreeGroupID; // r7
_DWORD v8[5]; // [sp+0h] [bp-18h] BYREF
if ( !a2 )
return 0;
v4 = *a1;
memset(v8, 0, 16);
v5 = *(LevelEditorLayer **)(v4 + 944);
v8[4] = 1065353216;
NextFreeGroupID = LevelEditorLayer::getNextFreeGroupID(v5, (int)v8);
std::__hash_table,std::equal_to,std::allocator>::~__hash_table((int)v8);
LevelEditorLayer::addObjectToGroup(*(LevelEditorLayer **)(*a1 + 944), a2, NextFreeGroupID);
return NextFreeGroupID;
}