//
// cocos2d::CCScheduler::unscheduleAllWithMinPriority from 0x100437620 to 0x10043770b (235 bytes)
//
// 4 xrefs:
// > cocos2d::CCScheduler::dCCScheduler @ 0x100436378
// > cocos2d::CCScheduler::unscheduleAll @ 0x1004363ba
// > sub_1004363C0 @ 0x1004363d8
// > sub_100436410 @ 0x100436428
//
// This function is hookable on this platform (idp: pc, 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 12:30:24 +0000
//
__int64 __fastcall cocos2d::CCScheduler::unscheduleAllWithMinPriority(_QWORD *a1, int a2)
{
__int64 v3; // r15
__int64 v4; // rsi
__int64 v5; // rax
__int64 v6; // rax
__int64 v7; // r15
__int64 result; // rax
__int64 v9; // rdi
__int64 v10; // r15
__int64 v11; // r15
v3 = a1[12];
while ( v3 )
{
v4 = *(_QWORD *)(v3 + 8);
v3 = *(_QWORD *)(v3 + 56);
cocos2d::CCScheduler::unscheduleAllForTarget(a1, v4);
}
if ( a2 >= 0 )
{
LABEL_4:
if ( a2 > 0 )
goto LABEL_9;
goto LABEL_7;
}
v5 = a1[8];
if ( v5 )
{
do
{
v11 = *(_QWORD *)(v5 + 8);
if ( *(_DWORD *)(v5 + 24) >= a2 )
cocos2d::CCScheduler::unscheduleUpdateForTarget((__int64)a1, *(_QWORD *)(v5 + 16));
v5 = v11;
}
while ( v11 );
goto LABEL_4;
}
LABEL_7:
v6 = a1[9];
if ( v6 )
{
do
{
v7 = *(_QWORD *)(v6 + 8);
cocos2d::CCScheduler::unscheduleUpdateForTarget((__int64)a1, *(_QWORD *)(v6 + 16));
v6 = v7;
}
while ( v7 );
}
LABEL_9:
result = a1[10];
if ( result )
{
do
{
v10 = *(_QWORD *)(result + 8);
if ( *(_DWORD *)(result + 24) >= a2 )
cocos2d::CCScheduler::unscheduleUpdateForTarget((__int64)a1, *(_QWORD *)(result + 16));
result = v10;
}
while ( v10 );
}
v9 = a1[15];
if ( v9 )
return sub_1007FF190(v9);
return result;
}