//
// sub_10051C4D0 from 0x10051c4d0 to 0x10051c560 (144 bytes)
//
// 1 xrefs:
// > PlatformerControlsPopup::init @ 0x10051bce4
//
// 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:07:09 +0000
//
_QWORD *__fastcall sub_10051C4D0(_QWORD *result)
{
__int64 v1; // x8
_QWORD *v2; // x19
__int64 v3; // x0
__int64 v4; // x0
v1 = result[131];
if ( v1 && *(_DWORD *)(v1 + 328) > *(_DWORD *)(v1 + 332) )
{
v2 = result;
*(_QWORD *)(GameLevelManager::sharedState() + 712) = result + 129;
v3 = GameLevelManager::sharedState();
sub_1000CBAE0(v3, *(_DWORD *)(v2[131] + 328LL) - *(_DWORD *)(v2[131] + 332LL));
v4 = v2[147];
if ( v4 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v4 + 344LL))(v4, 0);
result = (_QWORD *)v2[148];
if ( result )
return (_QWORD *)(*(__int64 (__fastcall **)(_QWORD *, __int64))(*result + 344LL))(result, 1);
}
return result;
}