//
// TabbedPopupLayer::offsetToNextPage from 0x72da4c to 0x72da8a (62 bytes)
//
// 1 xrefs:
// > GameSettingsLayer::buildTabContent @ 0x712570
//
// 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
//
int __fastcall TabbedPopupLayer::offsetToNextPage(int this, int a2)
{
int v3; // r3
int v4; // r4
int v5; // r2
int v6; // r4
int v7; // r0
int v8; // r1
int v9; // t0
v3 = *(_DWORD *)(this + 740);
if ( v3 >= 0 )
{
v4 = *(_DWORD *)(this + 712);
v5 = *(_DWORD *)(this + 716);
this = -1171354717;
if ( v3 < -1171354717 * ((v5 - v4) >> 2) && a2 > 0 )
{
v6 = v4 + 44 * v3;
v7 = *(_DWORD *)(v6 + 36);
v9 = v7 / a2;
v8 = v7 % a2;
this = v9;
if ( v8 )
*(_DWORD *)(v6 + 36) += a2 - v8;
}
}
return this;
}