//
// GJGarageLayer::selectTab from 0x1003a17c4 to 0x1003a189c (216 bytes)
//
// 2 xrefs:
// > GJGarageLayer::setupIconSelect @ 0x1003a1078
// > GJGarageLayer::onSelectTab @ 0x1003a16fc
//
// This function is hookable on this platform (idp: arm, 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:03:46 +0000
//
__int64 __fastcall GJGarageLayer::selectTab(__int64 a1, unsigned int a2)
{
unsigned int v4; // w21
__int64 v5; // x22
int v6; // w0
_BOOL8 v7; // x23
_QWORD *v8; // x0
unsigned int v10; // [xsp+0h] [xbp-40h] BYREF
unsigned int *v11; // [xsp+8h] [xbp-38h] BYREF
v10 = a2;
if ( (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 480)) )
{
v4 = 0;
do
{
v5 = sub_1002E75A0(*(_QWORD *)(a1 + 480), v4);
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 64LL))(v5);
v7 = v6 != a2;
CCMenuItemToggler::toggle(v5, v6 == a2);
(*(void (__fastcall **)(__int64, _BOOL8))(*(_QWORD *)v5 + 1056LL))(v5, v7);
++v4;
}
while ( v4 < (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 480)) );
}
v11 = &v10;
v8 = sub_1001E71D0(a1 + 520, (int *)&v10, (__int64)&unk_10076DCF5, &v11);
return GJGarageLayer::setupPage(a1, *((unsigned int *)v8 + 8), v10);
}