//
// sub_100746890 from 0x100746890 to 0x10074691e (142 bytes)
//
// 4 xrefs:
// > cocos2d::CCActionManager::removeAllActionsFromTarget @ 0x100218ac8
// > cocos2d::CCScheduler::unscheduleAllForTarget @ 0x10043785b
// > cocos2d::CCParallaxNode::removeAllChildrenWithCleanup @ 0x1004a7de3
// > sub_1007FF190 @ 0x1007ff199
//
// 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:36:31 +0000
//
__int64 __fastcall sub_100746890(unsigned int *a1)
{
__int64 v2; // rax
__int64 v3; // rcx
__int64 v4; // rdx
int v5; // esi
__int64 v6; // rdi
__int64 v7; // rcx
unsigned int v8; // eax
__int64 result; // rax
v2 = a1[2];
if ( v2 != 0xFFFFFFFFLL )
{
if ( (int)v2 > 0 )
{
v3 = *((_QWORD *)a1 + 2);
v4 = 0;
v5 = 0;
do
{
v6 = *(_QWORD *)(v3 + 8 * v4);
if ( v6 )
{
if ( v5 > 0 )
{
*(_QWORD *)(v3 - 8LL * v5 + 8 * v4) = v6;
*(_DWORD *)(v6 + 36) = v4 - v5;
}
}
else
{
++v5;
}
++v4;
}
while ( v2 != v4 );
}
a1[2] = -1;
}
while ( 1 )
{
result = *a1;
if ( !(_DWORD)result )
break;
v7 = *((_QWORD *)a1 + 2);
v8 = result - 1;
*a1 = v8;
cocos2d::CCObject::release(*(_DWORD **)(v7 + 8LL * v8));
}
return result;
}