//
// cocos2d::CCTextureAtlas::insertQuadFromIndex from 0x1004adc00 to 0x1004adce4 (228 bytes)
//
// 0 xrefs:
//
// 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 *a1,
unsigned int a2,
unsigned int a3)
{
__int64 v4; // rax
__int64 v5; // rcx
__int64 v6; // r8
cocos2d::ccV3F_C4B_T2F_Quad *m_pQuads; // rdx
__int64 v8; // rsi
cocos2d::ccV3F_C4B_T2F_Quad *v9; // rax
__int64 v10; // rcx
__int128 v11; // [rsp-78h] [rbp-78h]
__int128 v12; // [rsp-68h] [rbp-68h]
__int128 v13; // [rsp-58h] [rbp-58h]
__int128 v14; // [rsp-48h] [rbp-48h]
__int128 v15; // [rsp-38h] [rbp-38h]
__int128 v16; // [rsp-28h] [rbp-28h]
if ( a2 != a3 )
{
v4 = a3 + 1;
v5 = a2 - a3;
if ( a2 <= a3 )
v4 = a2;
v6 = a2 + 1;
if ( a2 > a3 )
v6 = a3;
m_pQuads = a1->m_pQuads;
v8 = a2;
v16 = *(_OWORD *)&m_pQuads[v8].br.vertices.z;
v15 = *(_OWORD *)&m_pQuads[v8].tr.texCoords.u;
v14 = *(_OWORD *)&m_pQuads[v8].tr.vertices.x;
v13 = *(_OWORD *)&m_pQuads[v8].bl.vertices.z;
v12 = *(_OWORD *)&m_pQuads[v8].tl.texCoords.u;
v11 = *(_OWORD *)&m_pQuads[v8].tl.vertices.x;
memmove(&m_pQuads[v4], &m_pQuads[v6], 96 * v5);
v9 = a1->m_pQuads;
v10 = a3;
*(_OWORD *)&v9[v10].tl.vertices.x = v11;
*(_OWORD *)&v9[v10].tl.texCoords.u = v12;
*(_OWORD *)&v9[v10].bl.vertices.z = v13;
*(_OWORD *)&v9[v10].tr.vertices.x = v14;
*(_OWORD *)&v9[v10].tr.texCoords.u = v15;
*(_OWORD *)&v9[v10].br.vertices.z = v16;
LOBYTE(a1->m_uTotalQuads) = 1;
}
}