//
// sub_6068B0 from 0x6068b0 to 0x606978 (200 bytes)
//
// 2 xrefs:
// > sub_607BBC @ 0x6082f8
// > sub_607BBC @ 0x608348
//
// 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
//
bool __fastcall sub_6068B0(
int a1,
pugi::xml_attribute_struct *a2,
pugi::xml_node_struct **a3,
pugi::xml_attribute_struct *a4)
{
pugi::xml_node_struct *v7; // r1
pugi::xml_node_struct *v8; // r0
pugi::xml_node_struct *v9; // r1
pugi::xml_node_struct *v10; // r1
pugi::xml_node_struct *v11; // r1
_BOOL4 result; // r0
pugi::xml_node v13; // [sp+4h] [bp-10h] BYREF
pugi::xml_node_struct *v14; // [sp+8h] [bp-Ch] BYREF
for ( v13._root = *a3;
pugi::xml_node::operator void (*)(pugi::xml_node***)((void (**)())&v13);
v13._root = pugi::xml_node::parent(&v13, v7) )
{
v14 = pugi::xml_node::next_sibling(&v13, v7);
if ( !pugi::xml_node::operator!(&v14) )
break;
}
LABEL_6:
v8 = pugi::xml_node::next_sibling(&v13, v7);
LABEL_7:
v13._root = v8;
do
{
sub_6065F8(a1, a2, (pugi::xml_attribute_struct *)&v13, a4);
v14 = pugi::xml_node::first_child(&v13, v9);
if ( pugi::xml_node::operator void (*)(pugi::xml_node***)((void (**)())&v14) )
{
v8 = pugi::xml_node::first_child(&v13, v10);
goto LABEL_7;
}
v14 = pugi::xml_node::next_sibling(&v13, v10);
if ( pugi::xml_node::operator void (*)(pugi::xml_node***)((void (**)())&v14) )
goto LABEL_6;
while ( pugi::xml_node::operator void (*)(pugi::xml_node***)((void (**)())&v13) )
{
v14 = pugi::xml_node::next_sibling(&v13, v11);
if ( !pugi::xml_node::operator!(&v14) )
break;
v13._root = pugi::xml_node::parent(&v13, v11);
}
v13._root = pugi::xml_node::next_sibling(&v13, v11);
result = pugi::xml_node::operator!(&v13);
}
while ( !result );
return result;
}