//
// pugi::xpath_query::xpath_query from 0xb66644 to 0xb66740 (252 bytes)
//
// 4 xrefs:
// > pugi::xml_node::select_single_node @ 0xb66f24
// > pugi::xml_node::select_nodes @ 0xb67014
// > ??> @ 0x40308
// > ??> @ 0x68508
//
// 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
//
// Alternative name is '_ZN4pugi11xpath_queryC1EPKcPNS_18xpath_variable_setE'
void __fastcall pugi::xpath_query::xpath_query(pugi::xpath_query *this, char *a2, pugi::xpath_variable_set *a3)
{
_QWORD *v4; // x0
_QWORD *v5; // x20
_QWORD *v6; // x0
_QWORD *v7; // x0
_QWORD *v8; // x19
char *v11; // [xsp+48h] [xbp+48h]
*(_QWORD *)this = 0;
v11 = (char *)this + 8;
pugi::xpath_parse_result::xpath_parse_result((_QWORD *)this + 1);
v4 = off_1230F88(0x1028u);
v5 = v4;
if ( v4 )
{
*v4 = 0;
v4[1] = v4 + 4;
v4[2] = 0;
v4[3] = 0;
v4[4] = 0;
v6 = sub_B65778((unsigned __int8 *)a2, (__int64)a3, (__int64)(v4 + 1), (__int64)v11);
*v5 = v6;
if ( v6 )
{
*(_QWORD *)this = v5;
*((_QWORD *)this + 1) = 0;
}
else
{
v7 = (_QWORD *)v5[1];
v8 = (_QWORD *)*v7;
if ( *v7 )
{
do
{
off_1230F80(v7);
v7 = v8;
v8 = (_QWORD *)*v8;
}
while ( v8 );
}
off_1230F80(v5);
}
}
else
{
*((_QWORD *)this + 1) = "Out of memory";
}
}