//
// tinyxml2::XMLPrinter::CloseElement from 0xd9945c to 0xd99540 (228 bytes)
//
// 2 xrefs:
// > tinyxml2::XMLPrinter::VisitExit @ 0xd99548
// > ??> @ 0xe3830
//
// 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:23 +0000
//
__int64 __fastcall tinyxml2::XMLPrinter::CloseElement(tinyxml2::XMLPrinter *this)
{
int v2; // w1
__int64 v3; // x4
int v4; // w3
int v5; // w2
const char *v6; // x2
__int64 result; // x0
const char *v8; // [xsp+28h] [xbp+28h]
v2 = *((_DWORD *)this + 65) - 1;
v3 = *((_QWORD *)this + 21);
v4 = *((unsigned __int8 *)this + 8);
v5 = *((_DWORD *)this + 6) - 1;
*((_DWORD *)this + 65) = v2;
*((_DWORD *)this + 6) = v5;
v6 = *(const char **)(v3 + 8LL * v2);
if ( v4 )
{
tinyxml2::XMLPrinter::Print(this, "/>", v6);
}
else
{
if ( (*((_DWORD *)this + 7) & 0x80000000) != 0 && !*((_BYTE *)this + 33) )
{
v8 = *(const char **)(v3 + 8LL * v2);
tinyxml2::XMLPrinter::Print(this, &byte_11AAA48);
tinyxml2::XMLPrinter::PrintSpace(this, *((_DWORD *)this + 6));
v6 = v8;
}
tinyxml2::XMLPrinter::Print(this, "%s>", v6);
}
result = *((unsigned int *)this + 6);
if ( *((_DWORD *)this + 7) == (_DWORD)result )
*((_DWORD *)this + 7) = -1;
if ( (_DWORD)result || (result = *((unsigned __int8 *)this + 33), *((_BYTE *)this + 33)) )
{
*((_BYTE *)this + 8) = 0;
}
else
{
result = tinyxml2::XMLPrinter::Print(this, &byte_11AAA48);
*((_BYTE *)this + 8) = 0;
}
return result;
}