//
// cocos2d::CCScheduler::unscheduleAllWithMinPriority from 0x100240244 to 0x100240324 (224 bytes)
//
// 2 xrefs:
// > cocos2d::CCScheduler::dCCScheduler @ 0x10023eff4
// > cocos2d::CCScheduler::unscheduleAll @ 0x10023f01c
//
// 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:01:23 +0000
//
double __fastcall cocos2d::CCScheduler::unscheduleAllWithMinPriority(__int64 a1, int a2)
{
__int64 v4; // x8
__int64 v5; // x21
double result; // d0
__int64 v7; // x8
__int64 v8; // x21
__int64 v9; // x8
__int64 v10; // x21
__int64 v11; // x8
__int64 v12; // x21
__int64 v13; // x0
v4 = *(_QWORD *)(a1 + 96);
if ( v4 )
{
do
{
v5 = *(_QWORD *)(v4 + 56);
cocos2d::CCScheduler::unscheduleAllForTarget(a1, *(_QWORD *)(v4 + 8));
v4 = v5;
}
while ( v5 );
}
if ( (a2 & 0x80000000) == 0 )
{
LABEL_8:
if ( a2 > 0 )
goto LABEL_11;
goto LABEL_9;
}
v7 = *(_QWORD *)(a1 + 64);
if ( v7 )
{
do
{
v8 = *(_QWORD *)(v7 + 8);
if ( *(_DWORD *)(v7 + 24) >= a2 )
cocos2d::CCScheduler::unscheduleUpdateForTarget((_DWORD *)a1, *(_QWORD *)(v7 + 16));
v7 = v8;
}
while ( v8 );
goto LABEL_8;
}
LABEL_9:
v9 = *(_QWORD *)(a1 + 72);
if ( v9 )
{
do
{
v10 = *(_QWORD *)(v9 + 8);
cocos2d::CCScheduler::unscheduleUpdateForTarget((_DWORD *)a1, *(_QWORD *)(v9 + 16));
v9 = v10;
}
while ( v10 );
}
LABEL_11:
v11 = *(_QWORD *)(a1 + 80);
if ( v11 )
{
do
{
v12 = *(_QWORD *)(v11 + 8);
if ( *(_DWORD *)(v11 + 24) >= a2 )
cocos2d::CCScheduler::unscheduleUpdateForTarget((_DWORD *)a1, *(_QWORD *)(v11 + 16));
v11 = v12;
}
while ( v12 );
}
v13 = *(_QWORD *)(a1 + 120);
if ( v13 )
*(_QWORD *)&result = sub_1002E7674(v13).n128_u64[0];
return result;
}