//
// LevelBrowserLayer::selectedCount from 0x7f5de4 to 0x7f5e50 (108 bytes)
//
// 4 xrefs:
// > LevelBrowserLayer::updateSelectUI @ 0x7f5e64
// > LevelBrowserLayer::onToggleAllObjects @ 0x7f5ecc
// > LevelBrowserLayer::onProcessSelected @ 0x7f66b8
// > ??> @ 0xc00b8
//
// 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 12:54:37 +0000
//
__int64 __fastcall LevelBrowserLayer::selectedCount(LevelBrowserLayer *this)
{
__int64 v1; // x0
unsigned int *v2; // x1
__int64 result; // x0
unsigned int v4; // w2
__int64 *v5; // x1
__int64 *v6; // x4
__int64 v7; // x3
unsigned int v8; // w2
v1 = *((_QWORD *)this + 82);
if ( !v1 )
return 0;
v2 = *(unsigned int **)(v1 + 56);
result = 0;
v4 = *v2;
if ( *v2 )
{
v5 = *((__int64 **)v2 + 2);
v6 = &v5[v4 - 1];
if ( v5 <= v6 )
{
v7 = *v5;
v8 = 0;
if ( *v5 )
{
do
{
++v5;
if ( *(_BYTE *)(v7 + 771) )
++v8;
if ( v6 < v5 )
break;
v7 = *v5;
}
while ( *v5 );
return v8;
}
}
}
return result;
}