//
// cocos2d::CCScheduler::unscheduleAllWithMinPriority from 0xd247e0 to 0xd248e0 (256 bytes)
//
// 2 xrefs:
// > cocos2d::CCScheduler::unscheduleAll @ 0xd248e4
// > ??> @ 0xeb3f0
//
// 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:07:13 +0000
//
cocos2d::CCArray *__fastcall cocos2d::CCScheduler::unscheduleAllWithMinPriority(cocos2d::CCScheduler *this, int a2)
{
__int64 v4; // x2
__int64 v5; // x19
__int64 v6; // x0
__int64 v7; // x19
cocos2d::CCArray *result; // x0
__int64 v9; // x0
__int64 v10; // x19
__int64 v11; // x2
__int64 v12; // x19
v4 = *((_QWORD *)this + 12);
if ( v4 )
{
do
{
v5 = *(_QWORD *)(v4 + 56);
cocos2d::CCScheduler::unscheduleAllForTarget((__int64)this, *(cocos2d::CCObject **)(v4 + 8));
v4 = v5;
}
while ( v5 );
}
if ( a2 < 0 )
{
v9 = *((_QWORD *)this + 8);
if ( v9 )
{
do
{
while ( 1 )
{
v10 = *(_QWORD *)(v9 + 8);
if ( a2 <= *(_DWORD *)(v9 + 24) )
break;
v9 = *(_QWORD *)(v9 + 8);
if ( !v10 )
goto LABEL_17;
}
cocos2d::CCScheduler::unscheduleUpdateForTarget((__int64)this, *(const cocos2d::CCObject **)(v9 + 16));
v9 = v10;
}
while ( v10 );
}
}
else if ( a2 )
{
goto LABEL_5;
}
LABEL_17:
v11 = *((_QWORD *)this + 9);
if ( v11 )
{
do
{
v12 = *(_QWORD *)(v11 + 8);
cocos2d::CCScheduler::unscheduleUpdateForTarget((__int64)this, *(const cocos2d::CCObject **)(v11 + 16));
v11 = v12;
}
while ( v12 );
}
LABEL_5:
v6 = *((_QWORD *)this + 10);
if ( v6 )
{
do
{
while ( 1 )
{
v7 = *(_QWORD *)(v6 + 8);
if ( a2 <= *(_DWORD *)(v6 + 24) )
break;
v6 = *(_QWORD *)(v6 + 8);
if ( !v7 )
goto LABEL_10;
}
cocos2d::CCScheduler::unscheduleUpdateForTarget((__int64)this, *(const cocos2d::CCObject **)(v6 + 16));
v6 = v7;
}
while ( v7 );
}
LABEL_10:
result = *((cocos2d::CCArray **)this + 15);
if ( result )
return (cocos2d::CCArray *)cocos2d::CCArray::removeAllObjects(result);
return result;
}