//
// TabbedPopupLayer::refreshPageButtons from 0xc38824 to 0xc38900 (220 bytes)
//
// 5 xrefs:
// > KeybindingsLayer::showTab @ 0x9973a0
// > TabbedPopupLayer::pageChanged @ 0xc38910
// > TabbedPopupLayer::showTab @ 0xc38a9c
// > EditorSoundsLayer::showTab @ 0xcd6ac0
// > ??> @ 0x9e560
//
// This function is hookable on this platform (idp: arm, 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 13:04:52 +0000
//
__int64 __fastcall TabbedPopupLayer::refreshPageButtons(TabbedPopupLayer *this)
{
signed int v2; // w1
__int64 v3; // x3
_BOOL4 v4; // w20
__int64 v5; // x0
__int64 result; // x0
v2 = *((_DWORD *)this + 266);
if ( v2 < 0 )
{
v4 = 0;
}
else
{
v3 = *((_QWORD *)this + 127);
v4 = 0;
if ( v2 < (int)(954437177 * ((*((_QWORD *)this + 128) - v3) >> 3)) )
v4 = *(_DWORD *)(v3 + 72LL * v2 + 56) > 1;
}
v5 = *((_QWORD *)this + 134);
if ( v5 )
{
(*(void (__fastcall **)(__int64, _BOOL4))(*(_QWORD *)v5 + 344LL))(v5, v4);
(*(void (__fastcall **)(_QWORD, _BOOL4))(**((_QWORD **)this + 134) + 1056LL))(*((_QWORD *)this + 134), v4);
}
result = *((_QWORD *)this + 135);
if ( result )
{
(*(void (__fastcall **)(__int64, _BOOL4))(*(_QWORD *)result + 344LL))(result, v4);
return (*(__int64 (__fastcall **)(_QWORD, _BOOL4))(**((_QWORD **)this + 135) + 1056LL))(*((_QWORD *)this + 135), v4);
}
return result;
}