//
// sub_1002BA2A0 from 0x1002ba2a0 to 0x1002ba37c (220 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::update @ 0x10029afa4
//
// 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:02:25 +0000
//
__int64 __fastcall sub_1002BA2A0(__int64 result)
{
__int64 v1; // x19
int v2; // w8
unsigned __int64 v3; // d1
timeb v4; // [xsp+0h] [xbp-20h] BYREF
v1 = result;
if ( *(_BYTE *)(result + 2353) == 1 )
{
result = PlayerObject::tryPlaceCheckpoint(result);
*(_BYTE *)(v1 + 2353) = 0;
}
if ( ((*(_BYTE *)(v1 + 2417) & 1) != 0
|| (*(_BYTE *)(v1 + 2418) & 1) != 0
|| (*(_BYTE *)(v1 + 2420) & 1) != 0
|| *(_BYTE *)(v1 + 2428) == 1)
&& *(_DWORD *)(v1 + 916) == 1 )
{
v2 = *(_DWORD *)(v1 + 2128);
*(_DWORD *)(v1 + 2128) = v2 + 1;
if ( v2 >= 19 )
{
*(_DWORD *)(v1 + 2128) = 0;
result = PlayerObject::tryPlaceCheckpoint(v1);
}
}
if ( *(_BYTE *)(v1 + 1977) == 1 )
{
result = ftime(&v4);
LOWORD(v3) = v4.millitm;
if ( (double)v3 / 1000.0 + (double)v4.time - *(double *)(v1 + 1984) > 0.100000001 )
*(_BYTE *)(v1 + 1977) = 0;
}
return result;
}