//
// SFXSearchResult::getSelectedPage from 0x56c44c to 0x56c4c4 (120 bytes)
//
// 2 xrefs:
// > SFXBrowser::setupSFXBrowser @ 0x6c698c
// > SFXBrowser::onExitFolder @ 0x6c894e
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:52:33 +0000
//
int __fastcall SFXSearchResult::getSelectedPage(SFXSearchResult *this, int a2, int a3)
{
cocos2d::CCArray *v4; // r4
signed int i; // r5
int v8; // r0
int v9; // r3
int v10; // r3
v4 = *((cocos2d::CCArray **)this + 14);
if ( !v4 || a3 <= 0 )
return 0;
for ( i = 0; (unsigned int)i < cocos2d::CCArray::count(v4); ++i )
{
v8 = cocos2d::CCArray::objectAtIndex(v4, i);
v9 = *((_DWORD *)this + 26);
if ( v9 == 4 )
{
v10 = *(_DWORD *)(v8 + 72);
}
else if ( !v9 || (v10 = *(_DWORD *)(v8 + 72), v10 <= 0) )
{
v10 = *(_DWORD *)(v8 + 52);
}
if ( v10 == a2 )
return (int)floorf((float)(i / a3));
}
i = 0;
return (int)floorf((float)(i / a3));
}