//
// cocos2d::CCParticleBatchNode::addChild from 0x1003c8c40 to 0x1003c8d40 (256 bytes)
//
// 1 xrefs:
// > ??> @ 0x10092ecc0
//
// 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::CCParticleBatchNode::addChild(
cocos2d::CCParticleBatchNode *a1,
cocos2d::CCNode *a2,
int a3,
int a4)
{
__int64 v6; // rax
__int64 v7; // rax
__int64 v8; // rax
GLenum src; // r13d
unsigned int v10; // eax
_DWORD *v11; // rax
int v12; // r15d
unsigned int v13; // edx
v6 = ((__int64 (__fastcall *)(cocos2d::CCNode *))a2->__vftable[1].setUserData)(a2);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 104LL))(v6);
v7 = ((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))a1->m_pTextureAtlas->getTexture)(a1->m_pTextureAtlas);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 104LL))(v7);
if ( !(unsigned int)sub_100720070(a1->m_pChildren) )
{
v8 = ((__int64 (__fastcall *)(cocos2d::CCNode *))a2->__vftable[1].setUserObject)(a2);
((void (__fastcall *)(cocos2d::CCParticleBatchNode *, __int64))a1->setBlendFunc)(a1, v8);
}
src = a1->m_tBlendFunc.src;
if ( src == ((unsigned int (__fastcall *)(cocos2d::CCNode *))a2->__vftable[1].setUserObject)(a2) )
((void (__fastcall *)(cocos2d::CCNode *))a2->__vftable[1].setUserObject)(a2);
v10 = cocos2d::CCParticleBatchNode::addChildHelper(a1, (cocos2d::CCParticleSystem *)a2, a3, a4);
if ( v10 )
{
v11 = (_DWORD *)sub_1007200C0(a1->m_pChildren, v10 - 1);
v12 = v11[110];
v13 = v12 + (*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)v11 + 1480LL))(v11);
}
else
{
v13 = 0;
}
cocos2d::CCParticleBatchNode::insertChild(a1, (cocos2d::CCParticleSystem *)a2, v13);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCParticleBatchNode *))a2->__vftable[1].~CCNode)(a2, a1);
}