//
// sub_1001AA740 from 0x1001aa740 to 0x1001aa7e8 (168 bytes)
//
// 4 xrefs:
// > KeybindingsLayer::showTab @ 0x100025514
// > TabbedPopupLayer::showTab @ 0x1001aa724
// > TabbedPopupLayer::pageChanged @ 0x1001aa8dc
// > EditorSoundsLayer::showTab @ 0x1004d8550
//
// 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 11:00:05 +0000
//
_QWORD *__fastcall sub_1001AA740(_QWORD *result, __int64 a2, __int64 a3)
{
__int64 v3; // x8
_QWORD *v6; // x21
unsigned __int64 v7; // x22
__int64 v8; // x23
__int64 v9; // x1
v3 = result[127];
if ( result[128] != v3 )
{
v6 = result;
v7 = 0;
v8 = 64;
do
{
result = *(_QWORD **)(v3 + v8);
if ( result )
{
result = (_QWORD *)(*(__int64 (__fastcall **)(_QWORD *))(*result + 1072LL))(result);
if ( result )
{
if ( v7 == *((_DWORD *)v6 + 266) )
v9 = a2;
else
v9 = a3;
result = ButtonSprite::updateBGImage((__int64)result, v9);
}
}
++v7;
v3 = v6[127];
v8 += 72;
}
while ( v7 < 0x8E38E38E38E38E39LL * ((v6[128] - v3) >> 3) );
}
return result;
}