//
// GJGameLevel::syncUneditedControls from 0x4b35f8 to 0x4b366a (114 bytes)
//
// 2 xrefs:
// > GameLevelManager::setLevelControlsTemplate @ 0x4b5966
// > GameLevelManager::applyLevelControlsSection @ 0x4c7652
//
// 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:50:04 +0000
//
unsigned __int8 *__fastcall GJGameLevel::syncUneditedControls(GJGameLevel *this)
{
unsigned __int8 *result; // r0
GameManager *v3; // r0
int v4; // r5
int v5; // r5
int v6; // r3
int v7; // r3
result = (unsigned __int8 *)GJGameLevel::isPlatformer(this);
if ( result )
{
if ( *((_BYTE *)this + 824) )
{
if ( !*((_BYTE *)this + 1360) )
{
v3 = (GameManager *)GameManager::sharedState((GameManager *)result);
result = (unsigned __int8 *)GameManager::getGameVariable(v3, "0203");
if ( !result )
{
v4 = *((unsigned __int8 *)this + 1344);
if ( (v4 & 1) != 0 )
v5 = *((_DWORD *)this + 337);
else
v5 = v4 >> 1;
result = std::string::operator=((unsigned __int8 *)this + 1344, (unsigned __int8 *)this + 1328);
v6 = *((unsigned __int8 *)this + 1344);
if ( v5 )
{
if ( (v6 & 1) != 0 )
{
LABEL_15:
v7 = *((_DWORD *)this + 337);
goto LABEL_17;
}
}
else
{
result = (unsigned __int8 *)(v6 << 31);
if ( (v6 & 1) != 0 )
{
if ( !*((_DWORD *)this + 337) )
goto LABEL_15;
LABEL_19:
v7 = 1;
goto LABEL_20;
}
if ( (unsigned int)v6 >> 1 )
goto LABEL_19;
}
v7 = v6 >> 1;
LABEL_17:
if ( v7 )
return result;
LABEL_20:
*((_DWORD *)this + 339) = v7;
}
}
}
}
return result;
}