//
// cocos2d::CCTextureAtlas::moveQuadsFromIndex from 0x1800aa640 to 0x1800aa723 (227 bytes)
//
// 5 xrefs:
// > cocos2d::CCParticleBatchNode::reorderChild @ 0x1800640ec
// > ??> @ 0x180148fc4
// > ??> @ 0x180148fd4
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c201c
//
// 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 11:22:17 +0000
//
void __fastcall cocos2d::CCTextureAtlas::moveQuadsFromIndex(
cocos2d::CCTextureAtlas *this,
unsigned int a2,
unsigned int a3,
unsigned int a4)
{
__int64 v6; // rdi
__int64 v7; // rbx
size_t v8; // r13
void *v9; // rax
__int64 v10; // r12
void *v11; // rbp
__int64 v12; // r15
__int64 v13; // rax
void *v14; // rcx
__int64 v15; // r8
if ( a2 != a4 )
{
v6 = a4;
v7 = a2;
v8 = 96LL * a3;
v9 = malloc(v8);
v10 = *((_QWORD *)this + 12);
v11 = v9;
memcpy(v9, (const void *)(v10 + 96 * v7), v8);
v12 = 96 * v6;
if ( (unsigned int)v6 >= (unsigned int)v7 )
{
v14 = (void *)(v10 + 96 * v7);
v13 = (unsigned int)v7 + a3;
v15 = 3LL * (unsigned int)(v6 - v7);
}
else
{
v13 = a3 + (unsigned int)v6;
v14 = (void *)(v10 + v12);
v15 = 3LL * (unsigned int)(v7 - v6);
}
memmove(v14, (const void *)(v10 + 96 * v13), 32 * v15);
memcpy((void *)(v12 + *((_QWORD *)this + 12)), v11, v8);
free(v11);
*((_BYTE *)this + 72) = 1;
}
}