//
// GJGarageLayer::selectTab from 0x14037e8b0 to 0x14037e96e (190 bytes)
//
// 5 xrefs:
// > GJGarageLayer::setupIconSelect @ 0x14037e71d
// > GJGarageLayer::onSelectTab @ 0x14037e89c
// > ??> @ 0x1408bcf44
// > ??> @ 0x1408bcf54
// > ??> @ 0x140922868
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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:31:04 +0000
//
__int64 __fastcall GJGarageLayer::selectTab(__int64 a1, unsigned int a2)
{
unsigned int i; // ebp
struct cocos2d::CCObject *v4; // rdi
int v5; // ebx
__int64 v6; // rdx
__int64 v7; // rdx
unsigned int *v8; // rax
unsigned int v10; // [rsp+38h] [rbp+10h] BYREF
v10 = a2;
for ( i = 0; i < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 480)); ++i )
{
v4 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 480), i);
v5 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v4 + 56LL))(v4);
LOBYTE(v6) = v10 == v5;
CCMenuItemToggler::toggle((__int64)v4, v6);
LOBYTE(v7) = v10 != v5;
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v4 + 936LL))(v4, v7);
}
v8 = (unsigned int *)sub_14010ECC0((__int64 *)(a1 + 520), (int *)&v10);
return GJGarageLayer::setupPage(a1, *v8, v10);
}