//
// TabbedPopupLayer::refreshTabButtons from 0xc3875c to 0xc38824 (200 bytes)
//
// 5 xrefs:
// > KeybindingsLayer::showTab @ 0x997398
// > TabbedPopupLayer::pageChanged @ 0xc38930
// > TabbedPopupLayer::showTab @ 0xc38a88
// > EditorSoundsLayer::showTab @ 0xcd6ab8
// > ??> @ 0x88840
//
// 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
//
unsigned __int64 __fastcall TabbedPopupLayer::refreshTabButtons(TabbedPopupLayer *this, const char *a2, const char *a3)
{
__int64 v5; // x2
__int64 v6; // x3
__int64 v8; // x23
unsigned __int64 v9; // x19
unsigned __int64 result; // x0
__int64 v11; // x1
ButtonSprite *v12; // x0
const char *v13; // x1
v5 = *((_QWORD *)this + 127);
v6 = *((_QWORD *)this + 128);
v8 = 0;
v9 = 0;
result = 0x8E38E38E38E38E39LL * ((v6 - v5) >> 3);
if ( result )
{
do
{
v11 = *(_QWORD *)(v5 + v8 + 64);
if ( v11 )
{
v12 = (ButtonSprite *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 1072LL))(v11);
if ( v12 )
{
if ( *((_DWORD *)this + 266) == v9 )
v13 = a2;
else
v13 = a3;
ButtonSprite::updateBGImage(v12, v13);
}
v5 = *((_QWORD *)this + 127);
v6 = *((_QWORD *)this + 128);
}
++v9;
v8 += 72;
result = 0x8E38E38E38E38E39LL * ((v6 - v5) >> 3);
}
while ( v9 < result );
}
return result;
}