//
// cocos2d::CCTextureAtlas::removeQuadAtIndex from 0x1004a6ed0 to 0x1004a6f24 (84 bytes)
//
// 2 xrefs:
// > cocos2d::CCSpriteBatchNode::removeSpriteFromAtlas @ 0x10015614b
// > cocos2d::CCTMXLayer::removeTileAt @ 0x100245643
//
// 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:30:55 +0000
//
unsigned __int64 __fastcall cocos2d::CCTextureAtlas::removeQuadAtIndex(__int64 a1, unsigned int a2)
{
int v2; // ecx
unsigned __int64 result; // rax
v2 = *(_DWORD *)(a1 + 80);
result = v2 + ~a2;
if ( v2 + ~a2 )
{
result = (unsigned __int64)memmove(
(void *)(*(_QWORD *)(a1 + 96) + 96LL * a2),
(const void *)(*(_QWORD *)(a1 + 96) + 96LL * (a2 + 1)),
96LL * (unsigned int)result);
v2 = *(_DWORD *)(a1 + 80);
}
*(_DWORD *)(a1 + 80) = v2 - 1;
*(_BYTE *)(a1 + 76) = 1;
return result;
}