//
// tinyxml2::XMLNode::PreviousSiblingElement from 0xd95978 to 0xd95a6c (244 bytes)
//
// 1 xrefs:
// > ??> @ 0x74dd0
//
// 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::PreviousSiblingElement(tinyxml2::XMLNode *this, const char *a2)
{
__int64 v2; // x19
const char *v4; // x20
__int64 v5; // x1
__int64 v6; // x2
int *v7; // x3
const char *Str; // x0
const char *v9; // x2
const char *v10; // x3
int v11; // w4
int v12; // t1
int v13; // w6
v2 = *((_QWORD *)this + 8);
if ( !v2 )
return 0;
v4 = a2 + 0x7FFFFFFF;
while ( 1 )
{
if ( !(**(__int64 (__fastcall ***)(__int64))v2)(v2) )
goto LABEL_16;
if ( !a2 )
return (**(__int64 (__fastcall ***)(__int64))v2)(v2);
Str = (const char *)tinyxml2::StrPair::GetStr((tinyxml2::StrPair *)(v2 + 24), v5, v6, v7);
if ( a2 == Str )
return (**(__int64 (__fastcall ***)(__int64))v2)(v2);
if ( *a2 )
break;
v9 = Str;
LABEL_15:
if ( !*v9 )
return (**(__int64 (__fastcall ***)(__int64))v2)(v2);
LABEL_16:
v2 = *(_QWORD *)(v2 + 64);
if ( !v2 )
return 0;
}
if ( !*Str || *(unsigned __int8 *)a2 != *(unsigned __int8 *)Str )
goto LABEL_16;
v9 = Str;
v10 = a2;
while ( 1 )
{
v12 = *(unsigned __int8 *)++v10;
v11 = v12;
v13 = (_DWORD)++v9 - (_DWORD)Str;
if ( !v12 )
{
if ( v13 == 0x7FFFFFFF )
return (**(__int64 (__fastcall ***)(__int64))v2)(v2);
goto LABEL_15;
}
if ( !*v9 || v11 != *(unsigned __int8 *)v9 )
break;
if ( v10 == v4 )
return (**(__int64 (__fastcall ***)(__int64))v2)(v2);
}
if ( v13 != 0x7FFFFFFF )
goto LABEL_16;
return (**(__int64 (__fastcall ***)(__int64))v2)(v2);
}