//
// tinyxml2::XMLNode::InsertEndChild from 0xd95548 to 0xd955ac (100 bytes)
//
// 12 xrefs:
// > sub_D748A0 @ 0xd74910
// > sub_D748A0 @ 0xd749a8
// > sub_D74A10 @ 0xd74a70
// > sub_D74A10 @ 0xd74a88
// > sub_D74A10 @ 0xd74aac
// > cocos2d::CCFileUtils::writeToFile @ 0xd74b20
// > cocos2d::CCFileUtils::writeToFile @ 0xd74b3c
// > cocos2d::CCFileUtils::writeToFile @ 0xd74b78
// > cocos2d::CCFileUtils::writeToFile @ 0xd74b94
// > tinyxml2::XMLNode::InsertAfterChild @ 0xd95690
// > tinyxml2::XMLNode::ParseDeep @ 0xd985ec
// > ??> @ 0xe91b8
//
// 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:21 +0000
//
tinyxml2::XMLNode *__fastcall tinyxml2::XMLNode::InsertEndChild(tinyxml2::XMLNode *this, tinyxml2::XMLNode *a2)
{
__int64 v2; // x2
__int64 v3; // x2
v2 = *((_QWORD *)this + 7);
if ( v2 )
{
*(_QWORD *)(v2 + 72) = a2;
*((_QWORD *)a2 + 8) = *((_QWORD *)this + 7);
*((_QWORD *)this + 7) = a2;
}
else
{
*((_QWORD *)this + 7) = a2;
*((_QWORD *)this + 6) = a2;
*((_QWORD *)a2 + 8) = 0;
}
*((_QWORD *)a2 + 9) = 0;
v3 = *((_QWORD *)a2 + 10);
*((_QWORD *)a2 + 2) = this;
(*(void (__fastcall **)(__int64))(*(_QWORD *)v3 + 40LL))(v3);
return a2;
}