//
// BoomScrollLayer::getRelativePageForNum from 0x10038f990 to 0x10038f9eb (91 bytes)
//
// 4 xrefs:
// > ListButtonBar::getPage @ 0x1003dd902
// > EditButtonBar::onDotClicked @ 0x1006b4ae9
// > EditButtonBar::updateDotState @ 0x1006b4ba5
// > EditButtonBar::getPage @ 0x1006b4cc2
//
// This function is hookable on this platform (idp: pc, 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:29:13 +0000
//
unsigned __int64 __fastcall BoomScrollLayer::getRelativePageForNum(__int64 a1, int a2)
{
int v2; // ecx
v2 = sub_1007FEF90(*(_QWORD *)(a1 + 32 * (*(unsigned __int8 *)(a1 + 456) ^ 1u) + 448));
if ( a2 <= 0 )
return a2 + v2 * ((a2 != 0) + ((unsigned __int64)-__SPAIR64__(a2, a2) >> 32) / ((unsigned int)(v2 == 0) + v2));
else
return (unsigned int)(a2 % v2);
}