//
// GameObject::createColorGroupContainer from 0x76fe00 to 0x76fe7c (124 bytes)
//
// 2 xrefs:
// > GameObject::addToColorGroup @ 0x76febc
// > ??> @ 0xec9e0
//
// 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 12:53:12 +0000
//
__int64 __fastcall GameObject::createColorGroupContainer(__int64 this, int a2)
{
__int64 v3; // x20
unsigned __int64 v4; // x0
__int64 v5; // x1
bool v6; // zf
if ( !*(_QWORD *)(this + 1176) )
{
v3 = this;
v4 = 2LL * a2;
if ( (unsigned __int64)a2 > 0x3F80000000000000LL )
v4 = -1;
this = operator new[](v4);
*(_QWORD *)(v3 + 1176) = this;
if ( a2 > 0 )
{
v5 = 0;
while ( 1 )
{
*(_WORD *)(this + v5) = 0;
v6 = v5 == 2LL * (unsigned int)(a2 - 1);
v5 += 2;
if ( v6 )
break;
this = *(_QWORD *)(v3 + 1176);
}
}
}
return this;
}