//
// SecretRewardsLayer::onSwitchPage from 0x100632980 to 0x1006329ee (110 bytes)
//
// 2 xrefs:
// > SecretRewardsLayer::init @ 0x100631e12
// > SecretRewardsLayer::init @ 0x100631ed1
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall SecretRewardsLayer::onSwitchPage(SecretRewardsLayer *a1, cocos2d::CCObject *a2)
{
int v2; // r14d
int v3; // eax
BoomScrollLayer *v4; // rbx
int v5; // r14d
v2 = *(_DWORD *)(*((_QWORD *)&a1->m_mainScrollLayer + !a1->m_inMainLayer) + 580LL);
v3 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
v4 = *(&a1->m_mainScrollLayer + !a1->m_inMainLayer);
if ( v4 )
{
v5 = v2 + 2 * (v3 == 1) - 1;
BoomScrollLayer::getTotalPages(v4);
BoomScrollLayer::moveToPage(v4, v5);
}
}