//
// DemonFilterSelectLayer::selectRating from 0x10005fdc8 to 0x10005fe90 (200 bytes)
//
// 2 xrefs:
// > DemonFilterSelectLayer::init @ 0x10005fd78
// > DemonFilterSelectLayer::init @ 0x10005fb38
//
// 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:57:49 +0000
//
__int64 __fastcall DemonFilterSelectLayer::selectRating(__int64 a1, __int64 a2)
{
__int64 result; // x0
__int64 v4; // x20
__int64 v5; // x21
__int64 v6; // x22
int v7; // w25
void *v8; // x1
*(_DWORD *)(a1 + 680) = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
result = sub_1002E757C(*(_QWORD *)(a1 + 664));
if ( (_DWORD)result )
{
v4 = 0;
do
{
v5 = sub_1002E75A0(*(_QWORD *)(a1 + 664), v4);
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 1072LL))(v5);
v7 = *(_DWORD *)(a1 + 680);
if ( v7 == (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v5 + 64LL))(v5) )
v8 = &unk_10075CDAF;
else
v8 = &unk_10075CDAC;
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v6 + 960LL))(v6, v8);
v4 = (unsigned int)(v4 + 1);
result = sub_1002E757C(*(_QWORD *)(a1 + 664));
}
while ( (unsigned int)v4 < (unsigned int)result );
}
return result;
}