//
// UILayer::toggleCheckpointsMenu from 0x140672eb0 to 0x140672f2c (124 bytes)
//
// 5 xrefs:
// > PauseLayer::onPracticeMode @ 0x1404dab42
// > PlayLayer::togglePracticeMode @ 0x14051a02f
// > PlayLayer::togglePracticeMode @ 0x14051a05b
// > UILayer::init @ 0x140670612
// > ??> @ 0x140932348
//
// This function is hookable on this platform (idp: pc, 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:35:55 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall UILayer::toggleCheckpointsMenu(__int64 a1, unsigned __int8 a2)
{
unsigned int v2; // ebx
__int64 v4; // rcx
bool GameVariable; // al
__int64 v6; // rdx
void *v8; // [rsp+30h] [rbp+8h]
v2 = a2;
v4 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v8 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v8);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v4 = qword_14090BFD0;
}
GameVariable = GameManager::getGameVariable(v4, "0071");
v6 = 0;
if ( !GameVariable )
v6 = v2;
return (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 560) + 336LL))(*(_QWORD *)(a1 + 560), v6);
}