//
// PlayLayer::toggleMusicInPractice from 0x1403b2900 to 0x1403b2a2d (301 bytes)
//
// 2 xrefs:
// > ??> @ 0x1405c9d00
// > ??> @ 0x1406d6e60
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=3
void PlayLayer::toggleMusicInPractice(PlayLayer *a1)
{
__int64 v2; // rbx
__int64 v3; // rcx
cocos2d::CCString *v4; // rax
bool v5; // bl
GameManager *v6; // rcx
void *v7; // [rsp+20h] [rbp-38h]
void *v8; // [rsp+20h] [rbp-38h]
_QWORD v9[4]; // [rsp+28h] [rbp-30h] BYREF
v2 = qword_1406C2EE8;
if ( !qword_1406C2EE8 )
{
v7 = operator new(0x3E0u);
qword_1406C2EE8 = sub_1401D0AE0((__int64)v7);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);
v2 = qword_1406C2EE8;
}
if ( GameStatsManager::isItemUnlocked((GameStatsManager *)a1, GJItem, 17) )
{
GameStatsManager::getItemKey(v3, v9, 0x11u, 0xCu);
v4 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v2 + 888), v9);
v5 = cocos2d::CCString::boolValue(v4);
sub_14003A830((__int64)v9);
if ( v5 )
goto LABEL_9;
}
v6 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v8 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v8);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v6 = (GameManager *)qword_1406C2ED8;
}
if ( GameManager::getGameVariable(v6, "0125") && a1->m_level->m_levelType == Editor )
LABEL_9:
a1->m_practiceMusicSync = 1;
else
a1->m_practiceMusicSync = 0;
}