//
// tinyxml2::XMLPrinter::CloseElement from 0x7fa29c to 0x7fa310 (116 bytes)
//
// 1 xrefs:
// > tinyxml2::XMLPrinter::VisitExit @ 0x7fa322
//
// 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:13 +0000
//
int __fastcall tinyxml2::XMLPrinter::CloseElement(tinyxml2::XMLPrinter *this)
{
int v2; // r2
int v3; // r3
const char *v4; // r5
int result; // r0
int v6; // r3
v2 = *((_DWORD *)this + 38);
--*((_DWORD *)this + 3);
v3 = *((_DWORD *)this + 50) - 1;
*((_DWORD *)this + 50) = v3;
v4 = *(const char **)(v2 + 4 * v3);
if ( *((_BYTE *)this + 4) )
{
result = tinyxml2::XMLPrinter::Print(this, "/>");
}
else
{
if ( *((int *)this + 4) < 0 && !*((_BYTE *)this + 21) )
{
tinyxml2::XMLPrinter::Print(this, "\n");
tinyxml2::XMLPrinter::PrintSpace((int)this, *((_DWORD *)this + 3));
}
result = tinyxml2::XMLPrinter::Print(this, "%s>", v4);
}
v6 = *((_DWORD *)this + 3);
if ( *((_DWORD *)this + 4) == v6 )
*((_DWORD *)this + 4) = -1;
if ( !v6 && !*((_BYTE *)this + 21) )
result = tinyxml2::XMLPrinter::Print(this, "\n");
*((_BYTE *)this + 4) = 0;
return result;
}