//
// PlayLayer::removeCheckpoint from 0x10014a134 to 0x10014a21c (232 bytes)
//
// 4 xrefs:
// > UILayer::onDeleteCheck @ 0x100050c10
// > PlayLayer::storeCheckpoint @ 0x10014a110
// > PlayLayer::removeAllCheckpoints @ 0x10014a93c
// > PlayerObject::removePlacedCheckpoint @ 0x1002c47c0
//
// 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:36 +0000
//
__int64 __fastcall PlayLayer::removeCheckpoint(__int64 a1, int a2)
{
__int64 result; // x0
__int64 v5; // x0
__int64 v6; // x0
__n128 v7; // q0
__int64 v8; // x21
__int64 v9; // x0
__int64 v10; // x20
result = sub_1002E757C(*(_QWORD *)(a1 + 14248));
if ( (_DWORD)result )
{
v5 = *(_QWORD *)(a1 + 14248);
if ( a2 )
v6 = sub_1002E75A0(v5, 0);
else
v6 = sub_1002E75B0(v5);
v8 = sub_10019CA2C(v6, v7);
GJBaseGameLayer::removeObjectFromSection(a1, v8);
sub_1002F25E4(v8);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 536LL))(v8);
v9 = *(_QWORD *)(a1 + 14248);
if ( a2 )
{
return sub_1002E7664(v9, 0, 1);
}
else
{
result = sub_1002E7648(v9, 1);
if ( *(_BYTE *)(a1 + 12238) == 1 && *(_BYTE *)(a1 + 12544) == 1 )
{
result = sub_1002E757C(*(_QWORD *)(a1 + 14248));
if ( (_DWORD)result )
{
v10 = sub_1002E75B0(*(_QWORD *)(a1 + 14248));
result = GameObject::makeVisible(*(_QWORD *)(v10 + 3112));
*(_DWORD *)(v10 + 3872) = *(_DWORD *)(a1 + 944);
}
}
}
}
return result;
}