//
// tinyxml2::XMLElement::ShallowClone from 0xd97664 to 0xd976f0 (140 bytes)
//
// 2 xrefs:
// > ??> @ 0xb4da8
// > ??> @ 0x152f650
//
// 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:22 +0000
//
tinyxml2::XMLElement *__fastcall tinyxml2::XMLElement::ShallowClone(
tinyxml2::XMLElement *this,
tinyxml2::XMLDocument *a2,
__int64 a3,
int *a4)
{
tinyxml2::XMLDocument *v4; // x20
const char *Str; // x0
tinyxml2::XMLElement *v7; // x0
__int64 v8; // x1
__int64 v9; // x2
int *v10; // x3
_QWORD *v11; // x19
tinyxml2::XMLElement *i; // x21
__int64 v13; // x1
__int64 v14; // x2
int *v15; // x3
const char *v16; // x20
__int64 v17; // x2
int *v18; // x3
tinyxml2::XMLAttribute *Attribute; // x0
char *v21; // [xsp+38h] [xbp+38h]
v4 = a2;
if ( !a2 )
v4 = *((tinyxml2::XMLDocument **)this + 1);
Str = (const char *)tinyxml2::StrPair::GetStr((tinyxml2::XMLElement *)((char *)this + 24), (__int64)a2, a3, a4);
v7 = tinyxml2::XMLDocument::NewElement(v4, Str);
v11 = *((_QWORD **)this + 12);
for ( i = v7; v11; v11 = (_QWORD *)v11[7] )
{
v21 = (char *)tinyxml2::StrPair::GetStr((tinyxml2::StrPair *)(v11 + 1), v8, v9, v10);
v16 = (const char *)tinyxml2::StrPair::GetStr((tinyxml2::StrPair *)(v11 + 4), v13, v14, v15);
Attribute = (tinyxml2::XMLAttribute *)tinyxml2::XMLElement::FindOrCreateAttribute(i, v21, v17, v18);
tinyxml2::XMLAttribute::SetAttribute(Attribute, v16);
}
return i;
}