//
// tinyxml2::XMLNode::LastChildElement from 0xd9578c to 0xd95884 (248 bytes)
//
// 1 xrefs:
// > ??> @ 0xaa848
//
// 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:21 +0000
//
__int64 __fastcall tinyxml2::XMLNode::LastChildElement(tinyxml2::XMLNode *this, const char *a2)
{
__int64 v3; // x20
__int64 v4; // x0
__int64 v5; // x1
__int64 v6; // x2
int *v7; // x3
__int64 v8; // x23
const char *Str; // x0
const char *v10; // x5
const char *v11; // x2
int v12; // w3
int v13; // t1
int v14; // w1
v3 = *((_QWORD *)this + 7);
if ( !v3 )
return 0;
while ( 1 )
{
v4 = (**(__int64 (__fastcall ***)(__int64))v3)(v3);
v8 = v4;
if ( !v4 )
goto LABEL_15;
if ( !a2 )
return v8;
Str = (const char *)tinyxml2::StrPair::GetStr((tinyxml2::StrPair *)(v4 + 24), v5, v6, v7);
if ( a2 == Str )
return v8;
if ( *Str )
break;
v11 = a2;
LABEL_14:
if ( !*v11 )
return v8;
LABEL_15:
v3 = *(_QWORD *)(v3 + 64);
if ( !v3 )
return 0;
}
if ( *(unsigned __int8 *)Str != *(unsigned __int8 *)a2 || !*a2 )
goto LABEL_15;
v10 = Str + 0x7FFFFFFF;
v11 = a2;
while ( 1 )
{
v13 = *(unsigned __int8 *)++Str;
v12 = v13;
v14 = (_DWORD)++v11 - (_DWORD)a2;
if ( !v13 )
{
if ( v14 == 0x7FFFFFFF )
return v8;
goto LABEL_14;
}
if ( !*v11 || v12 != *(unsigned __int8 *)v11 )
break;
if ( Str == v10 )
return v8;
}
if ( v14 != 0x7FFFFFFF )
goto LABEL_15;
return v8;
}