//
// GameStatsManager::toggleEnableItem from 0x41b758 to 0x41b7bc (100 bytes)
//
// 2 xrefs:
// > GJGarageLayer::onToggleItem @ 0x403e0e
// > GameOptionsLayer::onPracticeMusicSync @ 0x4b1a60
//
// 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
//
void GameStatsManager::toggleEnableItem(GameStatsManager *a1, UnlockType a2, int a3, bool a4)
{
_BOOL4 v4; // r7
cocos2d::CCDictionary *m_enabledItems; // r6
cocos2d::CCObject *v7; // r0
_DWORD v8[3]; // [sp+0h] [bp-Ch] BYREF
v8[0] = a1;
v8[1] = a2;
v8[2] = a3;
v4 = a4;
GameStatsManager::getItemKey((GameStatsManager *)v8, (int)a1, a3, a2);
if ( v4 )
{
m_enabledItems = a1->m_enabledItems;
v7 = (cocos2d::CCObject *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", (const char *)&dword_0 + 1);
cocos2d::CCDictionary::setObject((int)m_enabledItems, v7);
}
else
{
cocos2d::CCDictionary::removeObjectForKey(a1->m_enabledItems);
}
sub_774008(v8);
}