//
// pugi::xpath_node_set::sort from 0xdd167c to 0xdd1744 (200 bytes)
//
// 1 xrefs:
// > ??> @ 0x99070
//
// 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:59 +0000
//
__int64 __fastcall pugi::xpath_node_set::sort(pugi::xpath_node_set *this, char a2)
{
int v3; // w21
int v4; // w0
char *v5; // x19
char *v6; // x20
__int64 v7; // t1
__int64 v8; // x4
__int64 v9; // x5
__int64 v10; // x0
_BYTE v12[8]; // [xsp+40h] [xbp+40h] BYREF
if ( a2 )
v3 = 2;
else
v3 = 1;
v4 = *(_DWORD *)this;
v5 = *((char **)this + 3);
v6 = *((char **)this + 4);
if ( !v4 )
{
sub_DD08BC(*((char **)this + 3), *((char **)this + 4), (__int64)v12);
v4 = 1;
}
if ( v4 != v3 && v6 - v5 > 31 )
{
do
{
v7 = *(_QWORD *)v5;
v5 += 16;
v8 = *((_QWORD *)v6 - 2);
v9 = *((_QWORD *)v6 - 1);
v6 -= 16;
v10 = *((_QWORD *)v5 - 1);
*((_QWORD *)v5 - 2) = v8;
*((_QWORD *)v5 - 1) = v9;
*(_QWORD *)v6 = v7;
*((_QWORD *)v6 + 1) = v10;
}
while ( v6 - v5 > 31 );
}
*(_DWORD *)this = v3;
return _stack_chk_guard;
}