//
// cocos2d::CCTextureAtlas::insertQuad from 0x100307ffc to 0x10030809c (160 bytes)
//
// 1 xrefs:
// > cocos2d::CCSpriteBatchNode::appendChild @ 0x10026fa30
//
// This function is hookable on this platform (idp: arm, 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:03:09 +0000
//
__n128 __fastcall cocos2d::CCTextureAtlas::insertQuad(__int64 a1, __int64 a2, unsigned int a3)
{
int v5; // w8
int v6; // w9
unsigned int v7; // w8
__int64 v9; // x8
__int128 v10; // q1
__n128 result; // q0
__int128 v12; // q1
__int128 v13; // q3
v5 = *(_DWORD *)(a1 + 80);
*(_DWORD *)(a1 + 80) = v5 + 1;
if ( *(_DWORD *)(a1 + 104) <= (unsigned int)(v5 + 1) )
v6 = v5 + 1;
else
v6 = *(_DWORD *)(a1 + 104);
*(_DWORD *)(a1 + 104) = v6;
v7 = v5 - a3;
if ( v7 )
memmove(
(void *)(*(_QWORD *)(a1 + 96) + 96LL * (a3 + 1)),
(const void *)(*(_QWORD *)(a1 + 96) + 96LL * a3),
96LL * v7);
v9 = *(_QWORD *)(a1 + 96) + 96LL * a3;
v10 = *(_OWORD *)(a2 + 16);
*(_OWORD *)v9 = *(_OWORD *)a2;
*(_OWORD *)(v9 + 16) = v10;
result = *(__n128 *)(a2 + 32);
v12 = *(_OWORD *)(a2 + 48);
v13 = *(_OWORD *)(a2 + 80);
*(_OWORD *)(v9 + 64) = *(_OWORD *)(a2 + 64);
*(_OWORD *)(v9 + 80) = v13;
*(__n128 *)(v9 + 32) = result;
*(_OWORD *)(v9 + 48) = v12;
*(_BYTE *)(a1 + 76) = 1;
return result;
}