//
// TabbedPopupLayer::onTabPage from 0x72d8e8 to 0x72d948 (96 bytes)
//
// 0 xrefs:
//
// 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:58:17 +0000
//
_DWORD *__fastcall TabbedPopupLayer::onTabPage(_DWORD *this, cocos2d::CCObject *a2)
{
_DWORD *v2; // r5
int v3; // r3
int v4; // r4
int v5; // r4
int v6; // r0
int v7; // r3
int v8; // r3
v2 = this;
v3 = *(this + 184);
if ( v3 >= 0 )
{
v4 = *(this + 178);
if ( v3 < -1171354717 * ((*(this + 179) - v4) >> 2) )
{
v5 = v4 + 44 * v3;
if ( *(int *)(v5 + 32) > 1 )
{
v6 = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2) + *(_DWORD *)(v5 + 28);
v7 = *(_DWORD *)(v5 + 32);
*(_DWORD *)(v5 + 28) = v6;
if ( v6 >= 0 )
{
if ( v6 < v7 )
return (_DWORD *)(*(int (__fastcall **)(_DWORD *, _DWORD))(*v2 + 752))(v2, v2[184]);
v8 = 0;
}
else
{
v8 = v7 - 1;
}
*(_DWORD *)(v5 + 28) = v8;
return (_DWORD *)(*(int (__fastcall **)(_DWORD *, _DWORD))(*v2 + 752))(v2, v2[184]);
}
}
}
return this;
}