//
// sub_100747C20 from 0x100747c20 to 0x100747c8b (107 bytes)
//
// 2 xrefs:
// > cocos2d::CCTouchDispatcher::addTargetedDelegate @ 0x1004c7834
// > cocos2d::CCTouchDispatcher::addStandardDelegate @ 0x1004c7a35
//
// 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:32 +0000
//
void __fastcall sub_100747C20(unsigned int *a1, __int64 a2)
{
__int64 v2; // rcx
__int64 v3; // rax
unsigned int v4; // ecx
v2 = *a1;
if ( *a1 )
{
v3 = 0;
while ( *(_QWORD *)(*((_QWORD *)a1 + 2) + 8 * v3) != a2 )
{
if ( v2 == ++v3 )
return;
}
if ( v3 != 0xFFFFFFFFLL )
{
v4 = v2 - 1;
*a1 = v4;
if ( v4 > (unsigned int)v3 )
{
do
{
*(_QWORD *)(*((_QWORD *)a1 + 2) + 8 * v3) = *(_QWORD *)(*((_QWORD *)a1 + 2) + 8 * v3 + 8);
++v3;
}
while ( v4 != v3 );
}
}
}
}