//
// pugi::xml_node::remove_child from 0x813378 to 0x8133be (70 bytes)
//
// 7 xrefs:
// > DS_Dictionary::removeKey @ 0x80af1a
// > DS_Dictionary::removeKey @ 0x80af26
// > DS_Dictionary::removeKey @ 0x80afd8
// > DS_Dictionary::removeKey @ 0x80afe4
// > DS_Dictionary::removeAllKeys @ 0x80b080
// > DS_Dictionary::removeAllKeys @ 0x80b08c
// > pugi::xml_node::remove_child @ 0x8133da
//
// 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:39 +0000
//
int __fastcall pugi::xml_node::remove_child(pugi::xml_node *this, int **a2)
{
int *v2; // r3
int v3; // r4
int v4; // r2
int v5; // r2
int v6; // r3
if ( !*(_DWORD *)this )
return 0;
v2 = *a2;
if ( !*a2 )
return 0;
v3 = v2[1];
if ( v3 != *(_DWORD *)this )
return 0;
v4 = v2[6];
if ( v4 || (v4 = *(_DWORD *)(v3 + 16)) != 0 )
*(_DWORD *)(v4 + 20) = v2[5];
v5 = (*a2)[5];
v6 = (*a2)[6];
if ( *(_DWORD *)(v5 + 24) )
*(_DWORD *)(v5 + 24) = v6;
else
*(_DWORD *)(*(_DWORD *)this + 16) = v6;
sub_81156C(*a2, *(_DWORD **)(**(_DWORD **)this & 0xFFFFFFE0));
return 1;
}