//
// LevelControlConfig::keepClasses from 0xcf598c to 0xcf5a24 (152 bytes)
//
// 2 xrefs:
// > GJGameLevel::shippedControls @ 0x809810
// > ??> @ 0xac1c8
//
// 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 13:06:48 +0000
//
__int64 __fastcall LevelControlConfig::keepClasses(__int64 this, char a2)
{
__int64 v2; // x19
__int64 v3; // x4
__int64 v4; // x3
char v5; // [xsp+28h] [xbp+28h]
v2 = this;
if ( (a2 & 1) == 0 )
{
v5 = a2;
std::__tree>,std::__map_value_compare>,std::less,true>,std::allocator>>>::clear((_QWORD *)(this + 80));
this = 1;
a2 = v5;
*(_BYTE *)(v2 + 104) = 1;
}
if ( (a2 & 2) == 0 )
{
v3 = *(_QWORD *)(v2 + 152);
v4 = *(_QWORD *)(v2 + 160);
if ( v3 != v4 )
{
this = v4 - 60 * (((0x2EEEEEEEEEEEEEEFLL * ((unsigned __int64)(v4 - 60 - v3) >> 2)) & 0x3FFFFFFFFFFFFFFFLL) + 1);
*(_QWORD *)(v2 + 160) = this;
}
}
if ( (a2 & 4) == 0 )
{
std::__tree>,std::__map_value_compare>,std::less,true>,std::allocator>>>::clear((_QWORD *)(v2 + 120));
*(_BYTE *)(v2 + 144) = 1;
return 1;
}
return this;
}