//
// TabbedPopupLayer::refreshTabButtons from 0x14066cde0 to 0x14066cec1 (225 bytes)
//
// 7 xrefs:
// > EditorSoundsLayer::showTab @ 0x14019e597
// > KeybindingsLayer::showTab @ 0x1403d7c63
// > TabbedPopupLayer::showTab @ 0x14066cdb9
// > TabbedPopupLayer::pageChanged @ 0x14066d0a6
// > ??> @ 0x1408ea808
// > ??> @ 0x1408ea818
// > ??> @ 0x1409320c0
//
// 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 11:35:52 +0000
//
unsigned __int64 __fastcall TabbedPopupLayer::refreshTabButtons(__int64 a1)
{
__int64 v1; // r8
unsigned __int64 v2; // rbx
unsigned __int64 result; // rax
__int64 v5; // rdi
__int64 v6; // rcx
__int64 v7; // rax
const char *v8; // rdx
__int64 v9; // rcx
v1 = *(_QWORD *)(a1 + 1000);
v2 = 0;
result = (unsigned __int64)((unsigned __int128)((*(_QWORD *)(a1 + 1008) - v1) * (__int128)0x2E8BA2E8BA2E8BA3LL) >> 64) >> 63;
if ( (*(_QWORD *)(a1 + 1008) - v1) / 88 )
{
v5 = 0;
do
{
v6 = *(_QWORD *)(v5 + v1 + 80);
if ( v6 )
{
v7 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 952LL))(v6);
if ( v7 )
{
v8 = "GJ_button_05.png";
if ( v2 == *(_DWORD *)(a1 + 1048) )
v8 = "GJ_button_02.png";
ButtonSprite::updateBGImage(v7, v8);
}
}
v1 = *(_QWORD *)(a1 + 1000);
++v2;
v9 = *(_QWORD *)(a1 + 1008) - v1;
v5 += 88;
result = (unsigned __int64)((unsigned __int128)(v9 * (__int128)0x2E8BA2E8BA2E8BA3LL) >> 64) >> 63;
}
while ( v2 < v9 / 88 );
}
return result;
}