//
// cocos2d::CCSprite::addChild from 0x100238664 to 0x100238738 (212 bytes)
//
// 75 xrefs:
// > ??> @ 0x100763488
// > ??> @ 0x1007735b8
// > ??> @ 0x100773ef0
// > ??> @ 0x100775058
// > ??> @ 0x100777c08
// > ??> @ 0x10077b3a8
// > ??> @ 0x10077b948
// > ??> @ 0x100785bf8
// > ??> @ 0x100790998
// > ??> @ 0x100799788
// > ??> @ 0x1007acbe0
// > ??> @ 0x1007ad198
// > ??> @ 0x1007b3150
// > ??> @ 0x1007b8c10
// > ??> @ 0x1007b9d60
// > ??> @ 0x1007c3d80
// > ??> @ 0x1007c45b8
// > ??> @ 0x1007c74c0
// > ??> @ 0x1007c7fa0
// > ??> @ 0x1007c97c0
// > ??> @ 0x1007c9d78
// > ??> @ 0x1007cfa50
// > ??> @ 0x1007d0238
// > ??> @ 0x1007d0a48
// > ??> @ 0x1007e5210
// > ??> @ 0x1007ea238
// > ??> @ 0x1007ea7f0
// > ??> @ 0x1007ec420
// > ??> @ 0x1007ec9a8
// > ??> @ 0x1007ef7d0
// > ??> @ 0x1007f52b8
// > ??> @ 0x1007f5af0
// > ??> @ 0x1007f62e8
// > ??> @ 0x1007f6ae0
// > ??> @ 0x1007f72d8
// > ??> @ 0x1007f7ad0
// > ??> @ 0x1007f82c8
// > ??> @ 0x1007f8ac0
// > ??> @ 0x1007f92a8
// > ??> @ 0x1007f9ab8
// > ??> @ 0x1007fa320
// > ??> @ 0x1007fab30
// > ??> @ 0x1007fb340
// > ??> @ 0x1007fbb50
// > ??> @ 0x1007fc360
// > ??> @ 0x1007fcb70
// > ??> @ 0x1007fd380
// > ??> @ 0x1007fdb90
// > ??> @ 0x1007fe3a0
// > ??> @ 0x1007febb0
// > ??> @ 0x1007ff3d8
// > ??> @ 0x1007ffc30
// > ??> @ 0x100800458
// > ??> @ 0x100800c80
// > ??> @ 0x1008014a8
// > ??> @ 0x100801cd0
// > ??> @ 0x1008024e0
// > ??> @ 0x100802cf0
// > ??> @ 0x100803500
// > ??> @ 0x100803d10
// > ??> @ 0x100804520
// > ??> @ 0x100804d30
// > ??> @ 0x100805540
// > ??> @ 0x100805d50
// > ??> @ 0x100806560
// > ??> @ 0x100806d70
// > ??> @ 0x100807580
// > ??> @ 0x100807d90
// > ??> @ 0x1008085a0
// > ??> @ 0x100808db0
// > ??> @ 0x1008095c0
// > ??> @ 0x100809dd0
// > ??> @ 0x10080ad58
// > ??> @ 0x100810d68
// > ??> @ 0x1008160f0
//
// 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::CCSprite::addChild(cocos2d::CCSprite *a1, cocos2d::CCNode *a2, int a3, int a4)
{
int v5; // w22
cocos2d::CCSprite *v7; // x23
__int64 v8; // x0
__int64 v9; // x0
v5 = (int)a2;
if ( a1->m_pobBatchNode )
{
v7 = (cocos2d::CCSprite *)__dynamic_cast(
a2,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCSprite,
0);
v8 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v7->getTexture)(v7);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 104LL))(v8);
v9 = ((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))a1->m_pobTextureAtlas->getTexture)(a1->m_pobTextureAtlas);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v9 + 104LL))(v9);
cocos2d::CCSpriteBatchNode::appendChild(a1->m_pobBatchNode, v7);
if ( !a1->m_bReorderChildDirty )
((void (__fastcall *)(cocos2d::CCSprite *))a1->setReorderChildDirtyRecursively)(a1);
}
cocos2d::CCNode::addChild(a1, v5, a3);
a1->m_bHasChildren = 1;
}