//
// DeathTrackerPopup::onToggleGlobal from 0xcb5a14 to 0xcb5b28 (276 bytes)
//
// 3 xrefs:
// > ??> @ 0x78c58
// > DeathTrackerPopup::init @ 0xcb47a8
// > ??> @ 0x1543130
//
// 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:06:12 +0000
//
__int64 __fastcall DeathTrackerPopup::onToggleGlobal(DeathTrackerPopup *this, cocos2d::CCObject *a2)
{
__int64 v3; // x21
int v4; // w0
int v6; // w0
int v7; // w0
void *v8[3]; // [xsp+40h] [xbp+40h] BYREF
v3 = *((_QWORD *)this + 89);
if ( !v3 )
goto LABEL_10;
if ( !*((_BYTE *)this + 920) )
{
v6 = *((_DWORD *)this + 182);
if ( v6 == 2 && *((_BYTE *)this + 986) )
{
*((_BYTE *)this + 920) = 1;
goto LABEL_12;
}
DeathTrackerPopup::dtScrollKey(this, v8);
DeathHistogram::persistScroll(v3, (__int64)v8);
if ( ((__int64)v8[0] & 1) != 0 )
operator delete(v8[2]);
LABEL_10:
v7 = *((unsigned __int8 *)this + 920) ^ 1;
*((_BYTE *)this + 920) ^= 1u;
if ( !v7 )
goto LABEL_4;
v6 = *((_DWORD *)this + 182);
LABEL_12:
*((_DWORD *)this + 245) = v6;
v4 = 0;
goto LABEL_5;
}
*((_BYTE *)this + 920) = 0;
LABEL_4:
v4 = *((_DWORD *)this + 245);
*((_BYTE *)this + 985) = 1;
LABEL_5:
*((_DWORD *)this + 182) = v4;
DeathTrackerPopup::setView(this, v4);
DeathTrackerPopup::refreshView(this);
return _stack_chk_guard;
}