//
// cocos2d::CCTextureAtlas::insertQuadFromIndex from 0x1800a6790 to 0x1800a68a0 (272 bytes)
//
// 2 xrefs:
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b7d34
//
// 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::insertQuadFromIndex(
cocos2d::CCTextureAtlas *this,
unsigned int a2,
unsigned int a3)
{
__int64 v3; // rbx
unsigned int v4; // r11d
unsigned int v5; // eax
__int64 v7; // r8
unsigned int v8; // r10d
cocos2d::ccV3F_C4B_T2F_Quad *m_pQuads; // r9
__int64 v10; // rcx
cocos2d::ccV3F_C4B_T2F_Quad *v11; // rax
__int64 v12; // rcx
__int128 v13; // [rsp+20h] [rbp-68h]
__int128 v14; // [rsp+30h] [rbp-58h]
__int128 v15; // [rsp+40h] [rbp-48h]
__int128 v16; // [rsp+50h] [rbp-38h]
__int128 v17; // [rsp+60h] [rbp-28h]
__int128 v18; // [rsp+70h] [rbp-18h]
if ( a2 != a3 )
{
v3 = a3;
v4 = a2 + 1;
v5 = a3 - a2;
v7 = a2 - a3;
v8 = a2;
if ( !(_DWORD)v7 )
v7 = v5;
if ( a2 > (unsigned int)v3 )
{
v8 = v3 + 1;
v4 = v3;
}
m_pQuads = this->m_pQuads;
v10 = a2;
v13 = *(_OWORD *)&m_pQuads[v10].tl.vertices.x;
v14 = *(_OWORD *)&m_pQuads[v10].tl.texCoords.u;
v15 = *(_OWORD *)&m_pQuads[v10].bl.vertices.z;
v16 = *(_OWORD *)&m_pQuads[v10].tr.vertices.x;
v17 = *(_OWORD *)&m_pQuads[v10].tr.texCoords.u;
v18 = *(_OWORD *)&m_pQuads[v10].br.vertices.z;
memmove(&m_pQuads[v8], &m_pQuads[v4], 96 * v7);
v11 = this->m_pQuads;
v12 = v3;
*(_OWORD *)&v11[v12].tl.vertices.x = v13;
*(_OWORD *)&v11[v12].tl.texCoords.u = v14;
*(_OWORD *)&v11[v12].bl.vertices.z = v15;
*(_OWORD *)&v11[v12].tr.vertices.x = v16;
*(_OWORD *)&v11[v12].tr.texCoords.u = v17;
*(_OWORD *)&v11[v12].br.vertices.z = v18;
this->m_bDirty = 1;
}
}