//
// sub_100747310 from 0x100747310 to 0x100747407 (247 bytes)
//
// 1 xrefs:
// > cocos2d::CCSpriteBatchNode::removeSpriteFromAtlas @ 0x100156179
//
// 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
//
char __fastcall sub_100747310(__int64 a1, unsigned int a2, int a3)
{
__int64 v5; // rax
_DWORD *v6; // rdi
int v7; // edx
unsigned int v8; // edx
unsigned int v9; // esi
__int64 v10; // rcx
__int64 v11; // rdx
int i; // esi
v5 = *(_QWORD *)(a1 + 16);
v6 = *(_DWORD **)(v5 + 8LL * a2);
v6[10] = -1;
if ( a3 )
LOBYTE(v5) = cocos2d::CCObject::release(v6);
v7 = *(_DWORD *)a1 - 1;
*(_DWORD *)a1 = v7;
v8 = v7 - a2;
if ( v8 )
{
memmove((void *)(*(_QWORD *)(a1 + 16) + 8LL * a2), (const void *)(*(_QWORD *)(a1 + 16) + 8LL * (a2 + 1)), 8LL * v8);
LODWORD(v5) = *(_DWORD *)a1;
v9 = *(_DWORD *)a1 - a2;
if ( *(_DWORD *)a1 > a2 )
{
v10 = *(_QWORD *)(a1 + 16);
v11 = (int)a2;
for ( i = v9 & 7; i; --i )
{
*(_DWORD *)(*(_QWORD *)(v10 + 8 * v11) + 40LL) = v11;
++v11;
}
if ( a2 - (unsigned int)v5 <= 0xFFFFFFF8 )
{
do
{
*(_DWORD *)(*(_QWORD *)(v10 + 8 * v11) + 40LL) = v11;
*(_DWORD *)(*(_QWORD *)(v10 + 8 * v11 + 8) + 40LL) = v11 + 1;
*(_DWORD *)(*(_QWORD *)(v10 + 8 * v11 + 16) + 40LL) = v11 + 2;
*(_DWORD *)(*(_QWORD *)(v10 + 8 * v11 + 24) + 40LL) = v11 + 3;
*(_DWORD *)(*(_QWORD *)(v10 + 8 * v11 + 32) + 40LL) = v11 + 4;
*(_DWORD *)(*(_QWORD *)(v10 + 8 * v11 + 40) + 40LL) = v11 + 5;
*(_DWORD *)(*(_QWORD *)(v10 + 8 * v11 + 48) + 40LL) = v11 + 6;
*(_DWORD *)(*(_QWORD *)(v10 + 8 * v11 + 56) + 40LL) = v11 + 7;
v11 += 8;
}
while ( (unsigned int)v5 > (unsigned int)v11 );
}
}
}
return v5;
}