//
// sub_DD03CC from 0xdd03cc to 0xdd0490 (196 bytes)
//
// 5 xrefs:
// > pugi::xpath_node_set::first @ 0xdd175c
// > sub_DD4FC4 @ 0xdd5120
// > sub_DD4FC4 @ 0xdd51d0
// > sub_DD4FC4 @ 0xdd5280
// > sub_DD4FC4 @ 0xdd5a44
//
// 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:58 +0000
//
__int64 __fastcall sub_DD03CC(__int64 a1, pugi::xpath_node *a2, int a3)
{
pugi::xpath_node *v4; // x20
pugi::xpath_node *i; // x19
__int64 v7; // [xsp+38h] [xbp+38h] BYREF
v4 = (pugi::xpath_node *)a1;
if ( (pugi::xpath_node *)a1 == a2 )
goto LABEL_12;
if ( a3 == 1 )
return *(_QWORD *)v4;
if ( !a3 )
{
for ( i = (pugi::xpath_node *)(a1 + 16); a2 != i; i = (pugi::xpath_node *)((char *)i + 16) )
{
if ( sub_DCFF48(i, v4) )
v4 = i;
}
return *(_QWORD *)v4;
}
if ( a3 != 2 )
{
LABEL_12:
pugi::xpath_node::xpath_node((pugi::xpath_node *)&v7);
return v7;
}
return *((_QWORD *)a2 - 2);
}