//
// cocos2d::CCScheduler::removeUpdateFromHash from 0xd23e70 to 0xd24188 (792 bytes)
//
// 5 xrefs:
// > cocos2d::CCScheduler::update @ 0xd243d4
// > cocos2d::CCScheduler::update @ 0xd24404
// > cocos2d::CCScheduler::update @ 0xd24434
// > cocos2d::CCScheduler::unscheduleUpdateForTarget @ 0xd245f4
// > ??> @ 0xb2708
//
// 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
//
__int64 __fastcall cocos2d::CCScheduler::removeUpdateFromHash(__int64 result, unsigned __int8 *a2)
{
__int64 v2; // x5
__int64 v3; // x20
int v4; // w19
unsigned int v5; // w2
const void *v6; // x21
unsigned int v7; // w0
__int64 v8; // x22
int v9; // w19
unsigned int v10; // w1
unsigned int v11; // w0
int v12; // w19
__int64 v13; // x19
__int64 v14; // x19
_QWORD *v15; // x0
_QWORD *v16; // x1
bool v17; // zf
_QWORD *v18; // x0
_QWORD *v19; // x0
_QWORD *v20; // x1
cocos2d::CCObject *v21; // x21
__int64 v22; // x1
__int64 v23; // x3
__int64 v24; // x4
__int64 v25; // x1
__int64 v26; // x2
__int64 v27; // x3
__int64 v28; // x1
__int64 v29; // x2
__int64 v30; // x1
__int64 v31; // x1
v2 = *(_QWORD *)(result + 88);
if ( v2 )
{
v3 = result;
v4 = (a2[16] + 17973517 + (a2[19] << 24) + (a2[18] << 16) + (a2[17] << 8)) ^ 0x7F76D;
v5 = (-1622558010 - v4) ^ (v4 << 8);
v6 = a2 + 16;
v7 = (-17973517 - v4 - v5) ^ (v5 >> 13);
v8 = *(_QWORD *)(v2 + 24);
v9 = (v4 - v5 - v7) ^ (v7 >> 12);
v10 = (v5 - v7 - v9) ^ (v9 << 16);
v11 = (v7 - v9 - v10) ^ (v10 >> 5);
v12 = (v9 - v10 - v11) ^ (v11 >> 3);
result = *(_QWORD *)(*(_QWORD *)v8
+ 16LL
* (((v11 - v12 - ((v10 - v11 - v12) ^ (v12 << 10)))
^ (((v10 - v11 - v12) ^ (v12 << 10)) >> 15))
& (*(_DWORD *)(v8 + 8) - 1)));
v13 = result ? result - *(_QWORD *)(v8 + 32) : 0LL;
if ( v13 )
{
while ( 1 )
{
if ( *(_DWORD *)(v13 + 72) == 4 )
{
result = memcmp(*(const void **)(v13 + 64), v6, 4u);
if ( !(_DWORD)result )
break;
}
v14 = *(_QWORD *)(v13 + 56);
if ( v14 )
{
v13 = v14 - *(_QWORD *)(v8 + 32);
if ( v13 )
continue;
}
return result;
}
v15 = *(_QWORD **)(v13 + 8);
v16 = (_QWORD *)*v15;
if ( v15 == (_QWORD *)*v15 )
{
**(_QWORD **)v13 = 0;
free(*(void **)(v13 + 8));
v21 = *(cocos2d::CCObject **)(v13 + 16);
v22 = *(_QWORD *)(v13 + 32);
if ( v22 )
goto LABEL_15;
}
else
{
v17 = v15 == **(_QWORD ***)v13;
v18 = (_QWORD *)v15[1];
if ( v17 )
{
*v18 = v16;
**(_QWORD **)v13 = *(_QWORD *)(*(_QWORD *)(v13 + 8) + 8LL);
}
else
{
v16[1] = v18;
v19 = *(_QWORD **)(v13 + 8);
v20 = (_QWORD *)v19[1];
if ( v20 )
*v20 = *v19;
else
***(_QWORD ***)v13 = *v19;
}
free(*(void **)(v13 + 8));
v21 = *(cocos2d::CCObject **)(v13 + 16);
v22 = *(_QWORD *)(v13 + 32);
if ( v22 )
goto LABEL_15;
}
if ( !*(_QWORD *)(v13 + 40) )
{
free(**(void ***)(*(_QWORD *)(v3 + 88) + 24LL));
free(*(void **)(*(_QWORD *)(v3 + 88) + 24LL));
*(_QWORD *)(v3 + 88) = 0;
LABEL_27:
free((void *)v13);
return cocos2d::CCObject::release(v21);
}
LABEL_15:
v23 = *(_QWORD *)(*(_QWORD *)(v3 + 88) + 24LL);
v24 = *(_QWORD *)(v23 + 32);
if ( *(_QWORD *)(v23 + 24) - v24 == v13 )
{
*(_QWORD *)(v23 + 24) = v22 + v24;
v22 = *(_QWORD *)(v13 + 32);
if ( v22 )
goto LABEL_17;
}
else if ( v22 )
{
LABEL_17:
*(_QWORD *)(v22 + *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v3 + 88) + 24LL) + 32LL) + 16) = *(_QWORD *)(v13 + 40);
v25 = *(_QWORD *)(v3 + 88);
LABEL_18:
v26 = *(_QWORD *)(v13 + 40);
if ( v26 )
{
*(_QWORD *)(v26 + *(_QWORD *)(*(_QWORD *)(v25 + 24) + 32LL) + 8) = *(_QWORD *)(v13 + 32);
v25 = *(_QWORD *)(v3 + 88);
}
v27 = *(_QWORD *)(v25 + 24);
v28 = 16LL * ((unsigned int)(*(_DWORD *)(v27 + 8) - 1) & *(_DWORD *)(v13 + 76));
--*(_DWORD *)(*(_QWORD *)v27 + v28 + 8);
v29 = **(_QWORD **)(*(_QWORD *)(v3 + 88) + 24LL);
if ( *(_QWORD *)(v29 + v28) == v13 + 24 )
*(_QWORD *)(v29 + v28) = *(_QWORD *)(v13 + 56);
v30 = *(_QWORD *)(v13 + 48);
if ( v30 )
*(_QWORD *)(v30 + 32) = *(_QWORD *)(v13 + 56);
v31 = *(_QWORD *)(v13 + 56);
if ( v31 )
*(_QWORD *)(v31 + 24) = *(_QWORD *)(v13 + 48);
--*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(v3 + 88) + 24LL) + 16LL);
goto LABEL_27;
}
v25 = *(_QWORD *)(v13 + 40);
*(_QWORD *)(v3 + 88) = v25;
goto LABEL_18;
}
}
return result;
}