//
// GameStatsManager::toggleEnableItem from 0x100077920 to 0x100077990 (112 bytes)
//
// 2 xrefs:
// > GameOptionsLayer::onPracticeMusicSync @ 0x1002b1859
// > GJGarageLayer::onToggleItem @ 0x10036e790
//
// 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
//
// local variable allocation has failed, the output may be wrong!
void __fastcall GameStatsManager::toggleEnableItem(GameStatsManager *a1, UnlockType a2, int a3, bool a4)
{
double v4; // xmm0_8
_BOOL4 v5; // r14d
cocos2d::CCDictionary *m_enabledItems; // rbx
__int64 v7; // rax
char v8; // [rsp+0h] [rbp-30h]
size_t v9[5]; // [rsp+8h] [rbp-28h] BYREF
v5 = a4;
GameStatsManager::getItemKey(v9, v4, *(__int64 *)&a2, a3, a2);
m_enabledItems = a1->m_enabledItems;
if ( v5 )
{
v7 = sub_1007AB580("%i", v8);
cocos2d::CCDictionary::setObject_1(m_enabledItems, v7, v9);
}
else
{
cocos2d::CCDictionary::removeObjectForKey_1(m_enabledItems, v9);
}
if ( (v9[0] & 1) != 0 )
operator delete((void *)v9[2]);
}