//
// tinyxml2::XMLNode::NextSiblingElement from 0xb24ccc to 0xb24dc0 (244 bytes)
//
// 2 xrefs:
// > sub_B1F9A4 @ 0xb1fa8c
// > ??> @ 0x715e0
//
// 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
//
__int64 __fastcall tinyxml2::XMLNode::NextSiblingElement(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 + 9);
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 + 72);
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);
}