//
// tinyxml2::XMLPrinter::CloseElement from 0x5ef244 to 0x5ef2b8 (116 bytes)
//
// 1 xrefs:
// > tinyxml2::XMLPrinter::VisitExit @ 0x5ef2ca
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
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;
}