//
// GJGarageLayer::selectTab from 0x406618 to 0x40667e (102 bytes)
//
// 2 xrefs:
// > GJGarageLayer::setupIconSelect @ 0x406e1e
// > GJGarageLayer::onSelectTab @ 0x406e74
//
// 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 GJGarageLayer::selectTab(GJGarageLayer *a1, IconType a2)
{
unsigned int v3; // r5
int v4; // r2
CCMenuItemToggler *v5; // r0
CCMenuItemToggler *v6; // r6
int v7; // r7
int *v8; // r0
IconType v9[2]; // [sp+4h] [bp-8h] BYREF
v3 = 0;
v9[0] = a2;
while ( v3 < cocos2d::CCArray::count(a1->m_tabButtons) )
{
v5 = (CCMenuItemToggler *)cocos2d::CCArray::objectAtIndex(a1->m_tabButtons, v3++);
v6 = v5;
v7 = v5->getTag(v5);
CCMenuItemToggler::toggle(v6, v9[0] == v7);
v6->setEnabled(v6, v9[0] != v7);
}
v8 = (int *)std::map::operator[](&a1->m_iconPages.compare.pad, v9, v4);
GJGarageLayer::setupPage(a1, *v8, v9[0]);
}