//
// cocos2d::CCTextureAtlas::moveQuadsFromIndex from 0x1800a6aa0 to 0x1800a6b8a (234 bytes)
//
// 5 xrefs:
// > cocos2d::CCParticleBatchNode::reorderChild @ 0x180061cc9
// > ??> @ 0x18013fcfc
// > ??> @ 0x18013fd0c
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b7d64
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall cocos2d::CCTextureAtlas::moveQuadsFromIndex(
cocos2d::CCTextureAtlas *this,
unsigned int a2,
unsigned int a3,
unsigned int a4)
{
__int64 v6; // rbx
__int64 v7; // rdi
size_t v8; // r12
void *v9; // rax
cocos2d::ccV3F_C4B_T2F_Quad *m_pQuads; // r13
void *v11; // rbp
__int64 v12; // rax
cocos2d::ccV3F_C4B_T2F_Quad *v13; // rcx
__int64 v14; // r8
if ( a2 != a4 )
{
v6 = a4;
v7 = a2;
v8 = 96LL * a3;
v9 = malloc(v8);
m_pQuads = this->m_pQuads;
v11 = v9;
memcpy(v9, &m_pQuads[v7], v8);
if ( (unsigned int)v6 >= (unsigned int)v7 )
{
v13 = &m_pQuads[v7];
v12 = (unsigned int)v7 + a3;
v14 = 3LL * (unsigned int)(v6 - v7);
}
else
{
v12 = a3 + (unsigned int)v6;
v13 = &m_pQuads[v6];
v14 = 3LL * (unsigned int)(v7 - v6);
}
memmove(v13, &m_pQuads[v12], 32 * v14);
memcpy(&this->m_pQuads[(unsigned int)v6], v11, v8);
free(v11);
this->m_bDirty = 1;
}
}