//
// cocos2d::CCSprite::addChild from 0x100289970 to 0x100289a25 (181 bytes)
//
// 78 xrefs:
// > ??> @ 0x1008b3f88
// > ??> @ 0x1008b7f70
// > ??> @ 0x1008c4230
// > ??> @ 0x1008c4a68
// > ??> @ 0x1008c5260
// > ??> @ 0x1008c5a58
// > ??> @ 0x1008c6250
// > ??> @ 0x1008c6a48
// > ??> @ 0x1008c7240
// > ??> @ 0x1008c7a38
// > ??> @ 0x1008c8220
// > ??> @ 0x1008c8a30
// > ??> @ 0x1008c92a8
// > ??> @ 0x1008c9ab8
// > ??> @ 0x1008ca2c8
// > ??> @ 0x1008caad8
// > ??> @ 0x1008cb2e8
// > ??> @ 0x1008cbaf8
// > ??> @ 0x1008cc308
// > ??> @ 0x1008ccb18
// > ??> @ 0x1008cd328
// > ??> @ 0x1008cdb38
// > ??> @ 0x1008ce360
// > ??> @ 0x1008cebb8
// > ??> @ 0x1008cf3e0
// > ??> @ 0x1008cfc08
// > ??> @ 0x1008d0430
// > ??> @ 0x1008d0c58
// > ??> @ 0x1008d1468
// > ??> @ 0x1008d1c78
// > ??> @ 0x1008d2488
// > ??> @ 0x1008d2c98
// > ??> @ 0x1008d34a8
// > ??> @ 0x1008d3cb8
// > ??> @ 0x1008d44c8
// > ??> @ 0x1008d4cd8
// > ??> @ 0x1008d54e8
// > ??> @ 0x1008d5cf8
// > ??> @ 0x1008d6508
// > ??> @ 0x1008d6d18
// > ??> @ 0x1008d7528
// > ??> @ 0x1008d7d38
// > ??> @ 0x1008d8548
// > ??> @ 0x1008d8d58
// > ??> @ 0x1008dd338
// > ??> @ 0x1008e0868
// > ??> @ 0x1008f04e0
// > ??> @ 0x1008f3870
// > ??> @ 0x100904c68
// > ??> @ 0x100909840
// > ??> @ 0x10090b878
// > ??> @ 0x100913320
// > ??> @ 0x1009145c8
// > ??> @ 0x100915158
// > ??> @ 0x10091bee8
// > ??> @ 0x10091c470
// > ??> @ 0x10091d8c8
// > ??> @ 0x10091de68
// > ??> @ 0x100923500
// > ??> @ 0x100927e98
// > ??> @ 0x10092abf0
// > ??> @ 0x1009338c8
// > ??> @ 0x1009340f0
// > ??> @ 0x10093c790
// > ??> @ 0x10093cd40
// > ??> @ 0x100941fd0
// > ??> @ 0x10094e6e8
// > ??> @ 0x1009715b0
// > ??> @ 0x100971d98
// > ??> @ 0x1009725a8
// > ??> @ 0x100974810
// > ??> @ 0x100974dc8
// > ??> @ 0x100975380
// > ??> @ 0x10097a370
// > ??> @ 0x10097a928
// > ??> @ 0x1009853f8
// > ??> @ 0x1009917e0
// > ??> @ 0x100996008
//
// 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)
{
cocos2d::CCSprite *v5; // r13
__int64 v6; // rax
__int64 v7; // rax
if ( a1->m_pobBatchNode )
{
v5 = (cocos2d::CCSprite *)__dynamic_cast(
a2,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCNode,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCSprite,
0);
v6 = ((__int64 (__fastcall *)(cocos2d::CCSprite *))v5->getTexture)(v5);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 104LL))(v6);
v7 = ((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))a1->m_pobTextureAtlas->getTexture)(a1->m_pobTextureAtlas);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 104LL))(v7);
cocos2d::CCSpriteBatchNode::appendChild(a1->m_pobBatchNode, v5);
if ( !a1->m_bReorderChildDirty )
((void (__fastcall *)(cocos2d::CCSprite *))a1->setReorderChildDirtyRecursively)(a1);
}
cocos2d::CCNode::addChild(a1, (int)a2, a3);
a1->m_bHasChildren = 1;
}