//
// sub_1003A2BE0 from 0x1003a2be0 to 0x1003a2c94 (180 bytes)
//
// 2 xrefs:
// > GJGarageLayer::setupSpecialPage @ 0x1003a21f8
// > sub_1003A2C94 @ 0x1003a2d38
//
// 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:47 +0000
//
__int64 __fastcall sub_1003A2BE0(__int64 result, int a2)
{
__int64 v2; // x19
__int16 v3; // w8
__int64 v4; // x19
unsigned int v5; // w20
__int64 v6; // x0
__int16 v7; // [xsp+Ch] [xbp-14h] BYREF
char v8; // [xsp+Eh] [xbp-12h]
if ( (*(_BYTE *)(result + 620) & 1) == 0 )
{
v2 = *(_QWORD *)(result + 600);
if ( a2 )
{
v3 = -1;
v8 = -1;
}
else
{
v8 = 100;
v3 = 25700;
}
v7 = v3;
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v2 + 960LL))(v2, &v7);
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 488LL))(v2);
if ( result )
{
v4 = result;
result = sub_1002E757C(result);
if ( (_DWORD)result )
{
v5 = 0;
do
{
v6 = sub_1002E75A0(v4, v5);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v6 + 344LL))(v6, 1);
++v5;
result = sub_1002E757C(v4);
}
while ( v5 < (unsigned int)result );
}
}
}
return result;
}