//
// sub_1007213E0 from 0x1007213e0 to 0x1007214cd (237 bytes)
//
// 3 xrefs:
// > sub_100721640 @ 0x100721645
// > sub_100724800 @ 0x100724819
// > sub_100724A10 @ 0x100724a30
//
// This function is hookable on this platform (idp: pc, 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 12:36:14 +0000
//
__int64 __fastcall sub_1007213E0(__int64 *a1, __int64 a2, __int64 a3)
{
__int64 v3; // rbx
_QWORD **v4; // r15
__int64 result; // rax
_QWORD *v6; // r14
_QWORD *v7; // rdi
*a1 = 0;
a1[1] = (__int64)"Internal error";
a1[2] = 0;
v3 = off_100BE07E8();
*(_QWORD *)v3 = 0;
v4 = (_QWORD **)(v3 + 8);
*(_QWORD *)(v3 + 8) = v3 + 32;
*(_OWORD *)(v3 + 16) = 0;
*(_QWORD *)(v3 + 32) = 0;
result = sub_100721550(a2, a3, v3 + 8, a1 + 1);
*(_QWORD *)v3 = result;
if ( result )
{
*a1 = v3;
a1[1] = 0;
}
else
{
v6 = *v4;
if ( !*v4 )
__assert_rtn("release", "pugixml.cpp", 6232, "cur");
while ( *v6 )
{
v7 = v6;
v6 = (_QWORD *)*v6;
off_100BE07E0(v7);
}
return off_100BE07E0(v3);
}
return result;
}