//
// sub_10020E3B0 from 0x10020e3b0 to 0x10020e480 (208 bytes)
//
// 2 xrefs:
// > SelectArtLayer::init @ 0x10020e048
// > SelectArtLayer::init @ 0x10020de2c
//
// 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:01:01 +0000
//
__int64 __fastcall sub_10020E3B0(__int64 a1, __int64 a2)
{
_BOOL4 v3; // w22
__int64 result; // x0
__int64 v5; // x20
__int64 v6; // x0
_WORD v7[2]; // [xsp+Ch] [xbp-34h] BYREF
if ( a2 )
*(_DWORD *)(a1 + 680) = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
v3 = *(_DWORD *)(a1 + 688) < 2u;
result = sub_1002E757C(*(_QWORD *)(a1 + 664));
if ( (_DWORD)result )
{
v5 = 0;
do
{
v6 = sub_1002E75A0(*(_QWORD *)(a1 + 664), v5);
if ( v3 + (_DWORD)v5 != *(_DWORD *)(a1 + 680) )
memset(v7, 125, 3);
(*(void (**)(void))(*(_QWORD *)v6 + 960LL))();
v5 = (unsigned int)(v5 + 1);
result = sub_1002E757C(*(_QWORD *)(a1 + 664));
}
while ( (unsigned int)v5 < (unsigned int)result );
}
return result;
}