//
// PlayLayer::activatePlatformerEndTrigger from 0x100144be0 to 0x100144cd0 (240 bytes)
//
// 1 xrefs:
// > ??> @ 0x1008df910
//
// 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 10:59:33 +0000
//
__int64 __fastcall PlayLayer::activatePlatformerEndTrigger(__int64 result, __int64 a2)
{
__int64 v2; // x19
__int64 MainObject; // x0
double v5; // d0
__int64 v6; // [xsp+0h] [xbp-30h] BYREF
__int64 v7; // [xsp+8h] [xbp-28h] BYREF
if ( (*(_BYTE *)(*(_QWORD *)(result + 3256) + 2424LL) & 1) == 0 )
{
v2 = result;
if ( (*(_BYTE *)(result + 13336) & 1) == 0 )
{
*(_QWORD *)(result + 14896) = a2;
if ( *(int *)(a2 + 1464) >= 1 )
(*(void (__fastcall **)(__int64, double))(*(_QWORD *)result + 1256LL))(result, 0.0);
*(_BYTE *)(v2 + 13336) = 1;
UILayer::disableMenu(*(_QWORD *)(v2 + 13288));
(*(void (__fastcall **)(__int64 *__return_ptr, __int64))(*(_QWORD *)a2 + 1360LL))(&v7, a2);
if ( *(int *)(a2 + 1468) >= 1 )
{
MainObject = GJBaseGameLayer::tryGetMainObject(v2);
if ( MainObject )
{
(*(void (__fastcall **)(__int64 *__return_ptr))(*(_QWORD *)MainObject + 1360LL))(&v6);
sub_10002630C(&v7, (double *)&v6);
}
}
v5 = sub_1000262F4(&v6, (double *)&v7);
return PlayLayer::playPlatformerEndAnimationToPos(v2, &v6, *(unsigned __int8 *)(a2 + 1842), v5);
}
}
return result;
}