//
// AutoBackupPopup::onSelectAll from 0xc5784c to 0xc57938 (236 bytes)
//
// 3 xrefs:
// > ??> @ 0x99400
// > AutoBackupPopup::init @ 0xc5d6b4
// > ??> @ 0x15442e0
//
// 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:12 +0000
//
GJSelectionStrip **__fastcall AutoBackupPopup::onSelectAll(GJSelectionStrip **this, cocos2d::CCObject *a2)
{
__int64 v2; // x19
unsigned __int64 v3; // x20
_BOOL4 v4; // w21
__int64 v5; // x1
__int64 v6; // x1
v2 = (__int64)this;
if ( *(this + 106) != *(this + 107) )
{
v3 = 0;
v4 = AutoBackupPopup::selectedCount((AutoBackupPopup *)this) == (*(this + 107) - *(this + 106)) >> 7;
std::__tree::clear((_QWORD *)(v2 + 944));
v5 = *(_QWORD *)(v2 + 848);
if ( (*(_QWORD *)(v2 + 856) - v5) >> 7 )
{
do
{
if ( !v4 )
std::__tree::__emplace_unique_key_args(
v2 + 944,
v5 + (v3 << 7),
(_QWORD *)(v5 + (v3 << 7)));
v6 = *(_QWORD *)(v2 + 968);
if ( v3 < (*(_QWORD *)(v2 + 976) - v6) >> 3 )
CCMenuItemToggler::toggle(*(CCMenuItemToggler **)(v6 + 8 * v3), !v4);
v5 = *(_QWORD *)(v2 + 848);
++v3;
}
while ( v3 < (*(_QWORD *)(v2 + 856) - v5) >> 7 );
}
return AutoBackupPopup::updateSelectUI((GJSelectionStrip **)v2);
}
return this;
}