//
// sub_1000AB8B8 from 0x1000ab8b8 to 0x1000ab94c (148 bytes)
//
// 3 xrefs:
// > LevelBrowserLayer::loadPage @ 0x100498658
// > LevelBrowserLayer::FLAlert_Clicked @ 0x10049b0c0
// > sub_100506380 @ 0x1005063d4
//
// 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 10:58:36 +0000
//
__int64 __fastcall sub_1000AB8B8(__int64 a1, int a2)
{
__int64 v4; // x19
__int64 v5; // x8
__int64 v6; // x21
__int64 v7; // x1
v4 = sub_1002E736C(a1);
v5 = *(_QWORD *)(a1 + 784);
if ( v5 )
{
v6 = *(_QWORD *)(v5 + 56);
while ( v6 )
{
v7 = *(_QWORD *)(v6 + 264);
v6 = *(_QWORD *)(v6 + 288);
if ( a2 < 1 || *(_DWORD *)(v7 + 368) == a2 )
sub_1002E74E0(v4, v7);
}
}
if ( (unsigned int)sub_1002E757C(v4) )
qsort(
*(void **)(*(_QWORD *)(v4 + 56) + 16LL),
**(unsigned int **)(v4 + 56),
8u,
(int (__cdecl *)(const void *, const void *))sub_100090EC0);
return v4;
}