//
// pugi::xpath_node_set::sort from 0x607a8c to 0x607af0 (100 bytes)
//
// 0 xrefs:
//
// 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
//
void (*__fastcall pugi::xpath_node_set::sort(void (*this)(), int a2, int a3))()
{
int *v3; // r6
void (*v4)(); // r4
int *v5; // r5
int v6; // r8
int v7; // r2
int *v8; // r0
_DWORD v9[3]; // [sp+0h] [bp-Ch] BYREF
v9[0] = this;
v9[1] = a2;
v9[2] = a3;
v3 = (int *)this;
v4 = *((void (**)())this + 3);
v5 = *((int **)this + 4);
if ( a2 )
v6 = 2;
else
v6 = 1;
v7 = *(_DWORD *)this;
if ( !*(_DWORD *)this )
{
this = sub_607480(v4, v5, (pugi::xml_node_struct *)v9);
v7 = 1;
}
if ( v7 != v6 )
{
while ( (char *)v5 - (char *)v4 > 15 )
{
v5 -= 2;
v8 = (int *)v4;
v4 = (void (*)())((char *)v4 + 8);
this = (void (*)())sub_600614(v8, v5);
}
}
*v3 = v6;
return this;
}