//
// pugi::xml_node::prepend_attribute from 0x812a08 to 0x812a86 (126 bytes)
//
// 1 xrefs:
// > pugi::xml_node::prepend_copy @ 0x812c66
//
// 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:38 +0000
//
int *__fastcall pugi::xml_node::prepend_attribute(pugi::xml_node *this, char *a2)
{
int v4; // r1
int v5; // r2
char *v6; // r0
int *result; // r0
int v8; // r3
int *v9; // [sp+4h] [bp-10h] BYREF
int v10; // [sp+8h] [bp-Ch] BYREF
if ( (pugi::xml_node::type(this) == (int *)((char *)&dword_0 + 2) || pugi::xml_node::type(this) == (_DWORD *)&byte_7)
&& (v6 = sub_8102A8(*(int **)(**(_DWORD **)this & 0xFFFFFFE0), v4, v5),
pugi::xml_attribute::xml_attribute(&v9, (int)v6),
!pugi::xml_attribute::operator!(&v9)) )
{
pugi::xml_attribute::set_name(&v9, a2);
result = v9;
v8 = *(_DWORD *)(*(_DWORD *)this + 28);
if ( v8 )
{
v9[3] = *(_DWORD *)(v8 + 12);
*(_DWORD *)(v8 + 12) = result;
}
else
{
v9[3] = (int)v9;
}
result[4] = v8;
*(_DWORD *)(*(_DWORD *)this + 28) = result;
}
else
{
pugi::xml_attribute::xml_attribute(&v10);
return (int *)v10;
}
return result;
}