//
// cocos2d::CCParticleSystemQuad::setBatchNode from 0x7e6a3c to 0x7e6ade (162 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:00:54 +0000
//
_DWORD *__fastcall cocos2d::CCParticleSystemQuad::setBatchNode(_DWORD *this, cocos2d::CCParticleBatchNode *a2)
{
int v2; // r4
cocos2d::CCParticleBatchNode *v3; // r5
void (__fastcall *v5)(int, int); // r6
int v6; // r0
int v7; // r0
void *v8; // r0
void *v9; // r0
v2 = (int)this;
v3 = (cocos2d::CCParticleBatchNode *)*(this + 89);
if ( v3 != a2 )
{
this = cocos2d::CCParticleSystem::setBatchNode(this, (int)a2);
if ( a2 )
{
if ( !v3 )
{
v7 = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(*(_DWORD *)(v2 + 356) + 268) + 56))(*(_DWORD *)(*(_DWORD *)(v2 + 356) + 268));
memcpy((void *)(v7 + 96 * *(_DWORD *)(v2 + 360)), *(const void **)(v2 + 700), 96 * *(_DWORD *)(v2 + 580));
v8 = *(void **)(v2 + 700);
if ( v8 )
{
free(v8);
*(_DWORD *)(v2 + 700) = 0;
}
v9 = *(void **)(v2 + 704);
if ( v9 )
{
free(v9);
*(_DWORD *)(v2 + 704) = 0;
}
glDeleteBuffers();
return j_memset((void *)(v2 + 708), 0, 8u);
}
}
else
{
cocos2d::CCParticleSystemQuad::allocMemory((cocos2d::CCParticleSystemQuad *)v2);
cocos2d::CCParticleSystemQuad::initIndices(v2);
v5 = *(void (__fastcall **)(int, int))(*(_DWORD *)v2 + 760);
v6 = (*(int (__fastcall **)(cocos2d::CCParticleBatchNode *))(*(_DWORD *)v3 + 448))(v3);
v5(v2, v6);
return (_DWORD *)cocos2d::CCParticleSystemQuad::setupVBO((cocos2d::CCParticleSystemQuad *)v2);
}
}
return this;
}