//
// sub_815D54 from 0x815d54 to 0x815db6 (98 bytes)
//
// 2 xrefs:
// > sub_816CF0 @ 0x817006
// > sub_816CF0 @ 0x817038
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:01:42 +0000
//
void (*__fastcall sub_815D54(int a1, _DWORD *a2, void (*a3)(), void (*a4)(), int a5))()
{
void (*result)(); // r0
int v9; // r1
void (*v10[2])(); // [sp+8h] [bp-8h] BYREF
v10[0] = a3;
v10[1] = a4;
if ( *(_BYTE *)(a1 + 3) == 2 )
sub_815CB4(a1, a2, (pugi::xml_attribute *)a3, (const pugi::xml_node *)a4, a5);
for ( v10[0] = *(void (**)())a4; ; v10[0] = (void (*)())pugi::xml_node::parent((pugi::xml_node *)v10, v9) )
{
result = pugi::xml_node::operator void (*)(pugi::xml_node***)(v10);
if ( !result )
break;
sub_81572C(a1, a2, (pugi::xml_node *)v10, a5);
}
return result;
}