//
// SFXSearchResult::getSelectedPage from 0x95d828 to 0x95d8f8 (208 bytes)
//
// 3 xrefs:
// > SFXBrowser::setupSFXBrowser @ 0xb93164
// > SFXBrowser::onExitFolder @ 0xb971a8
// > ??> @ 0xa2cb8
//
// 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:57:29 +0000
//
unsigned int __fastcall SFXSearchResult::getSelectedPage(SFXSearchResult *this, int a2, int a3)
{
cocos2d::CCArray *v3; // x20
signed int i; // w19
int v8; // w3
__int64 v9; // x0
int v10; // w3
v3 = *((cocos2d::CCArray **)this + 8);
if ( !v3 || a3 <= 0 )
return 0;
for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(v3); ++i )
{
v9 = cocos2d::CCArray::objectAtIndex(v3, i);
v10 = *((_DWORD *)this + 35);
if ( v10 == 4 )
{
v8 = *(_DWORD *)(v9 + 76);
LABEL_5:
if ( v8 == a2 )
return vcvtms_s32_f32((float)(i / a3));
continue;
}
if ( v10 )
{
v8 = *(_DWORD *)(v9 + 76);
if ( v8 > 0 )
goto LABEL_5;
}
if ( *(_DWORD *)(v9 + 56) == a2 )
return vcvtms_s32_f32((float)(i / a3));
}
i = 0;
return vcvtms_s32_f32((float)(i / a3));
}