//
// cocos2d::CCSpriteBatchNode::insertQuadFromSprite from 0xd898f0 to 0xd89a2c (316 bytes)
//
// 3 xrefs:
// > cocos2d::CCTMXLayer::insertTileForGID @ 0xdabe0c
// > cocos2d::CCTMXLayer::appendTileForGID @ 0xdac120
// > ??> @ 0x7d1d0
//
// 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 13:08:15 +0000
//
__int64 __fastcall cocos2d::CCSpriteBatchNode::insertQuadFromSprite(
cocos2d::CCSpriteBatchNode *this,
cocos2d::CCSprite *a2,
unsigned int a3)
{
int v6; // w23
__int64 v7; // x0
__int64 v8; // x11
__int64 v9; // x8
__int64 v10; // x9
__int64 v11; // x6
__int64 v12; // x7
__int64 v13; // x4
__int64 v14; // x5
__int64 v15; // x12
__int64 v16; // x13
__int64 v17; // x14
__int64 v18; // x15
_QWORD v20[12]; // [xsp+48h] [xbp+48h] BYREF
while ( 1 )
{
if ( (*(unsigned int (__fastcall **)(_QWORD))(**((_QWORD **)this + 41) + 88LL))(*((_QWORD *)this + 41)) > a3 )
{
v6 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 41) + 88LL))(*((_QWORD *)this + 41));
if ( v6 != (*(unsigned int (__fastcall **)(_QWORD))(**((_QWORD **)this + 41) + 80LL))(*((_QWORD *)this + 41)) )
break;
}
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(this);
}
(*(void (__fastcall **)(cocos2d::CCSprite *, cocos2d::CCSpriteBatchNode *))(*(_QWORD *)a2 + 1120LL))(a2, this);
*((_DWORD *)a2 + 90) = a3;
v7 = *((_QWORD *)this + 41);
v8 = *(_QWORD *)((char *)a2 + 468);
v9 = *(_QWORD *)((char *)a2 + 476);
v10 = *(_QWORD *)((char *)a2 + 484);
v11 = *(_QWORD *)((char *)a2 + 492);
v12 = *(_QWORD *)((char *)a2 + 500);
v13 = *(_QWORD *)((char *)a2 + 508);
v14 = *(_QWORD *)((char *)a2 + 516);
v15 = *(_QWORD *)((char *)a2 + 524);
v16 = *(_QWORD *)((char *)a2 + 532);
v17 = *(_QWORD *)((char *)a2 + 540);
v18 = *(_QWORD *)((char *)a2 + 548);
v20[0] = *(_QWORD *)((char *)a2 + 460);
v20[1] = v8;
v20[2] = v9;
v20[3] = v10;
v20[4] = v11;
v20[5] = v12;
v20[6] = v13;
v20[7] = v14;
v20[8] = v15;
v20[9] = v16;
v20[10] = v17;
v20[11] = v18;
cocos2d::CCTextureAtlas::insertQuad(v7, v20, a3);
(*(void (__fastcall **)(cocos2d::CCSprite *, __int64))(*(_QWORD *)a2 + 1200LL))(a2, 1);
(*(void (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)a2 + 792LL))(a2);
return _stack_chk_guard;
}