//
// sub_60703C from 0x60703c to 0x60727c (576 bytes)
//
// 8 xrefs:
// > sub_607280 @ 0x60728c
// > sub_607280 @ 0x60729e
// > sub_607280 @ 0x6072b0
// > sub_6072C4 @ 0x6072ec
// > sub_607480 @ 0x607558
// > sub_607480 @ 0x60758a
// > sub_607480 @ 0x6075b4
// > sub_607480 @ 0x6075e2
//
// 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 sub_60703C(void (**a1)(), pugi::xml_attribute_struct *a2, pugi::xml_node_struct *a3))()
{
unsigned int v5; // r4
pugi::xml_attribute_struct *v6; // r1
pugi::xml_node_struct *v7; // r2
unsigned int v8; // r0
pugi::xml_node_struct *v9; // r1
pugi::xml_node_struct *v10; // r2
bool v11; // cf
pugi::xml_node_struct *v12; // r1
pugi::xml_node_struct *v13; // r2
pugi::xml_attribute_struct *i; // r0
void (*result)(); // r0
pugi::xml_attribute_struct *v16; // r1
pugi::xml_node_struct *v17; // r1
pugi::xml_node_struct *v18; // r2
pugi::xml_node_struct *v19; // r1
pugi::xml_node_struct *v20; // r2
unsigned int v21; // r4
pugi::xml_node_struct *v22; // r1
unsigned int v23; // r10
unsigned int v24; // r7
pugi::xml_node_struct *v25; // r1
unsigned int v26; // r6
pugi::xml_node_struct *v27; // r1
pugi::xml_node_struct *v28; // r1
pugi::xml_node_struct *v29; // r1
pugi::xml_node_struct *v30; // r1
pugi::xml_node_struct *v31; // r1
pugi::xml_node_struct *v32; // [sp+4h] [bp-24h] BYREF
pugi::xml_node_struct *v33; // [sp+8h] [bp-20h] BYREF
pugi::xml_node v34; // [sp+Ch] [bp-1Ch] BYREF
pugi::xml_node v35; // [sp+10h] [bp-18h] BYREF
pugi::xml_node v36; // [sp+14h] [bp-14h] BYREF
pugi::xml_node v37; // [sp+18h] [bp-10h] BYREF
pugi::xml_attribute v38; // [sp+1Ch] [bp-Ch] BYREF
pugi::xml_node_struct *v39; // [sp+20h] [bp-8h] BYREF
v5 = sub_606CC4(a1, a2, a3);
v8 = sub_606CC4((void (**)())a2, v6, v7);
if ( v5 && v8 )
{
v11 = v5 >= v8;
return (void (*)())!v11;
}
v32 = pugi::xpath_node::node(a1, v9, v10);
v33 = pugi::xpath_node::node((void (**)())a2, v12, v13);
v39 = (pugi::xml_node_struct *)pugi::xpath_node::attribute((pugi::xpath_node *)a1);
if ( !pugi::xml_attribute::operator void (*)(pugi::xml_attribute***)((void (**)())&v39)
|| (v38._attr = (pugi::xml_attribute_struct *)pugi::xpath_node::attribute(a2),
!pugi::xml_attribute::operator void (*)(pugi::xml_attribute***)((void (**)())&v38)) )
{
v39 = (pugi::xml_node_struct *)pugi::xpath_node::attribute((pugi::xpath_node *)a1);
if ( pugi::xml_attribute::operator void (*)(pugi::xml_attribute***)((void (**)())&v39) )
{
v39 = pugi::xpath_node::parent((pugi::xpath_node *)a1);
v38._attr = pugi::xpath_node::node((void (**)())a2, v17, v18);
if ( pugi::xml_node::operator==(&v39, &v38) )
return nullptr;
v32 = pugi::xpath_node::parent((pugi::xpath_node *)a1);
LABEL_20:
if ( !pugi::xml_node::operator==(&v32, &v33) )
{
v21 = 0;
for ( v34._root = v32;
pugi::xml_node::operator void (*)(pugi::xml_node***)((void (**)())&v34);
v34._root = pugi::xml_node::parent(&v34, v22) )
{
++v21;
}
v23 = v21;
v24 = 0;
for ( v35._root = v33;
pugi::xml_node::operator void (*)(pugi::xml_node***)((void (**)())&v35);
v35._root = pugi::xml_node::parent(&v35, v25) )
{
++v24;
}
v26 = v24;
v36._root = v32;
v37._root = v33;
while ( v26 < v21 )
{
++v26;
v36._root = pugi::xml_node::parent(&v36, v25);
}
while ( v23 < v24 )
{
++v23;
v37._root = pugi::xml_node::parent(&v37, v25);
}
if ( pugi::xml_node::operator==(&v36, &v37) )
{
v11 = v21 >= v24;
return (void (*)())!v11;
}
while ( 1 )
{
v39 = pugi::xml_node::parent(&v36, v27);
v38._attr = pugi::xml_node::parent(&v37, v28);
if ( !pugi::xml_node::operator!=(&v39, &v38) )
break;
v36._root = pugi::xml_node::parent(&v36, v29);
v37._root = pugi::xml_node::parent(&v37, v30);
}
v39 = pugi::xml_node::parent(&v36, v29);
if ( pugi::xml_node::operator!(&v39) )
return (void (*)())pugi::xml_node::operator<(&v36, &v37);
while ( pugi::xml_node::operator void (*)(pugi::xml_node***)((void (**)())&v36) )
{
if ( pugi::xml_node::operator==(&v36, &v37) )
return (void (*)())(&dword_0 + 1);
v36._root = pugi::xml_node::next_sibling(&v36, v31);
}
}
return nullptr;
}
v39 = (pugi::xml_node_struct *)pugi::xpath_node::attribute(a2);
if ( !pugi::xml_attribute::operator void (*)(pugi::xml_attribute***)((void (**)())&v39) )
goto LABEL_20;
v39 = pugi::xpath_node::parent(a2);
v38._attr = pugi::xpath_node::node(a1, v19, v20);
if ( pugi::xml_node::operator==(&v39, &v38) )
return (void (*)())(&dword_0 + 1);
LABEL_19:
v33 = pugi::xpath_node::parent(a2);
goto LABEL_20;
}
v39 = pugi::xpath_node::parent((pugi::xpath_node *)a1);
v38._attr = pugi::xpath_node::parent(a2);
if ( !pugi::xml_node::operator==(&v39, &v38) )
{
v32 = pugi::xpath_node::parent((pugi::xpath_node *)a1);
goto LABEL_19;
}
for ( i = (pugi::xml_attribute_struct *)pugi::xpath_node::attribute((pugi::xpath_node *)a1);
;
i = pugi::xml_attribute::next_attribute(&v38, v16) )
{
v38._attr = i;
result = pugi::xml_attribute::operator void (*)(pugi::xml_attribute***)((void (**)())&v38);
if ( !result )
break;
v39 = (pugi::xml_node_struct *)pugi::xpath_node::attribute(a2);
result = (void (*)())pugi::xml_attribute::operator==(&v38, &v39);
if ( result )
break;
}
return result;
}