//
// tinyxml2::XMLNode::InsertEndChild from 0x7f8e9a to 0x7f8ec4 (42 bytes)
//
// 11 xrefs:
// > sub_7E6F24 @ 0x7e6f64
// > sub_7E6F24 @ 0x7e6fd6
// > sub_7E6FF4 @ 0x7e702c
// > sub_7E6FF4 @ 0x7e703c
// > sub_7E6FF4 @ 0x7e7050
// > cocos2d::CCFileUtils::writeToFile @ 0x7e70a2
// > cocos2d::CCFileUtils::writeToFile @ 0x7e70b4
// > cocos2d::CCFileUtils::writeToFile @ 0x7e70e8
// > cocos2d::CCFileUtils::writeToFile @ 0x7e70fc
// > tinyxml2::XMLNode::InsertAfterChild @ 0x7f8f04
// > tinyxml2::XMLNode::ParseDeep @ 0x7f9cbe
//
// 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:01:12 +0000
//
tinyxml2::XMLNode *__fastcall tinyxml2::XMLNode::InsertEndChild(tinyxml2::XMLNode *this, tinyxml2::XMLNode *a2)
{
int v3; // r3
int v4; // r0
v3 = *((_DWORD *)this + 7);
if ( v3 )
{
*(_DWORD *)(v3 + 36) = a2;
*((_DWORD *)a2 + 8) = *((_DWORD *)this + 7);
*((_DWORD *)this + 7) = a2;
}
else
{
*((_DWORD *)this + 7) = a2;
*((_DWORD *)this + 6) = a2;
*((_DWORD *)a2 + 8) = 0;
}
*((_DWORD *)a2 + 2) = this;
v4 = *((_DWORD *)a2 + 10);
*((_DWORD *)a2 + 9) = 0;
(*(void (__fastcall **)(int))(*(_DWORD *)v4 + 20))(v4);
return a2;
}