//
// GJGarageLayer::selectTab from 0x50f678 to 0x50f6de (102 bytes)
//
// 2 xrefs:
// > GJGarageLayer::setupIconSelect @ 0x50fe7e
// > GJGarageLayer::onSelectTab @ 0x50fed4
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:51:30 +0000
//
int *__fastcall GJGarageLayer::selectTab(int a1, int a2, int a3)
{
unsigned int v4; // r5
CCMenuItemToggler *v5; // r0
CCMenuItemToggler *v6; // r6
int v7; // r7
int *v8; // r0
int v10[2]; // [sp+4h] [bp-8h] BYREF
v10[1] = a3;
v4 = 0;
v10[0] = a2;
while ( v4 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 352)) )
{
v5 = (CCMenuItemToggler *)cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 352), v4++);
v6 = v5;
v7 = (*(int (__fastcall **)(CCMenuItemToggler *))(*(_DWORD *)v5 + 32))(v5);
CCMenuItemToggler::toggle(v6, v10[0] == v7);
(*(void (__fastcall **)(CCMenuItemToggler *, bool))(*(_DWORD *)v6 + 528))(v6, v10[0] != v7);
}
v8 = std::map::operator[]((int **)(a1 + 376), v10);
return GJGarageLayer::setupPage(a1, *v8, v10[0]);
}