//
// AccountReviewPopup::onToggleRow from 0xc4f490 to 0xc4f5c8 (312 bytes)
//
// 4 xrefs:
// > ??> @ 0x100360
// > AccountReviewPopup::buildFilterRows @ 0xc472e8
// > AccountReviewPopup::buildReportedRows @ 0xc4d534
// > ??> @ 0x1547d20
//
// 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:05:07 +0000
//
__int64 __fastcall AccountReviewPopup::onToggleRow(AccountReviewPopup *this, cocos2d::CCObject *a2)
{
int v3; // w20
__int64 v4; // x0
unsigned int *v5; // x2
unsigned __int8 v6; // w23
__int64 v7; // x0
cocos2d::CCDirector *v8; // x0
__int64 v9; // x0
int v10; // w22
int v11; // w19
int v12; // w1
int v13; // w19
int v14; // w1
v3 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);
v4 = *((_QWORD *)this + 169);
if ( !v4 )
goto LABEL_24;
v5 = (unsigned int *)((char *)this + 1352);
do
{
while ( v3 <= *(_DWORD *)(v4 + 28) )
{
v5 = (unsigned int *)v4;
v4 = *(_QWORD *)v4;
if ( !v4 )
goto LABEL_5;
}
v4 = *(_QWORD *)(v4 + 8);
}
while ( v4 );
LABEL_5:
if ( (unsigned int *)((char *)this + 1352) == v5 )
{
LABEL_24:
v6 = 1;
}
else
{
v4 = v5[7];
v6 = v3 < (int)v4;
}
v7 = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v4);
v8 = (cocos2d::CCDirector *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 192LL))(v7);
if ( !v8
|| (v9 = cocos2d::CCDirector::sharedDirector(v8),
!*(_BYTE *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 192LL))(v9) + 128))
|| (v10 = *((_DWORD *)this + 316), v3 == v10)
|| v10 < 0 )
{
AccountReviewPopup::applySelected((__int64)this, v3, v6);
}
else
{
if ( v3 > v10 )
v11 = *((_DWORD *)this + 316);
else
v11 = v3;
if ( v3 >= v10 )
v10 = v3;
while ( v10 >= v11 )
{
v12 = v11;
v13 = v11 + 1;
AccountReviewPopup::applySelected((__int64)this, v12, v6);
if ( v10 < v13 )
break;
v14 = v13;
v11 = v13 + 1;
AccountReviewPopup::applySelected((__int64)this, v14, v6);
}
}
*((_DWORD *)this + 316) = v3;
return AccountReviewPopup::updateSelectedLabel(this);
}