//
// sub_1003F3320 from 0x1003f3320 to 0x1003f33b0 (144 bytes)
//
// 1 xrefs:
// > cocos2d::CCSpriteBatchNode::removeSpriteFromAtlas @ 0x10026fc8c
//
// 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 11:04:31 +0000
//
_DWORD *__fastcall sub_1003F3320(int *a1, unsigned int a2, int a3)
{
unsigned int v3; // w19
_DWORD *result; // x0
int v6; // w8
unsigned int v7; // w8
unsigned int v8; // w8
__int64 *v9; // x9
__int64 v10; // t1
v3 = a2;
result = *(_DWORD **)(*((_QWORD *)a1 + 2) + 8LL * a2);
result[10] = -1;
if ( a3 )
result = cocos2d::CCObject::release(result);
v6 = *a1 - 1;
*a1 = v6;
v7 = v6 - v3;
if ( v7 )
{
result = memmove(
(void *)(*((_QWORD *)a1 + 2) + 8LL * v3),
(const void *)(*((_QWORD *)a1 + 2) + 8LL * (v3 + 1)),
8LL * v7);
v8 = *a1;
if ( *a1 > v3 )
{
v9 = (__int64 *)(*((_QWORD *)a1 + 2) + 8LL * (int)v3);
do
{
v10 = *v9++;
*(_DWORD *)(v10 + 40) = v3++;
}
while ( v8 > v3 );
}
}
return result;
}