//
// ProfilePage::toggleMainPageVisibility from 0xa54d5c to 0xa54e84 (296 bytes)
//
// 1 xrefs:
// > ??> @ 0x45bc8
//
// 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:00:07 +0000
//
__int64 __fastcall ProfilePage::toggleMainPageVisibility(ProfilePage *this, unsigned __int8 a2)
{
unsigned int v3; // w20
__int64 v4; // x0
unsigned int *v5; // x1
__int64 *v6; // x19
__int64 *v7; // x22
__int64 v8; // x0
__int64 v9; // x0
unsigned int *v10; // x1
__int64 *v11; // x19
__int64 *v12; // x22
__int64 v13; // x0
__int64 v14; // x0
v3 = a2;
v4 = *((_QWORD *)this + 105);
if ( v4 )
{
v5 = *(unsigned int **)(v4 + 56);
if ( *v5 )
{
v6 = *((__int64 **)v5 + 2);
v7 = &v6[*v5 - 1];
while ( v7 >= v6 )
{
v8 = *v6;
if ( !*v6 )
break;
++v6;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v8 + 344LL))(v8, v3);
}
}
}
v9 = *((_QWORD *)this + 104);
if ( v9 )
{
v10 = *(unsigned int **)(v9 + 56);
if ( *v10 )
{
v11 = *((__int64 **)v10 + 2);
v12 = &v11[*v10 - 1];
while ( v12 >= v11 )
{
v13 = *v11;
if ( !*v11 )
break;
++v11;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v13 + 344LL))(v13, v3);
}
}
}
v14 = *((_QWORD *)this + 98);
if ( v14 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v14 + 344LL))(v14, v3);
if ( v3 )
return ProfilePage::updatePageArrows(this);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 99) + 344LL))(*((_QWORD *)this + 99), 0);
return (*(__int64 (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 100) + 344LL))(*((_QWORD *)this + 100), 0);
}