//
// pugi::xml_document::create from 0x815080 to 0x8150ca (74 bytes)
//
// 2 xrefs:
// > pugi::xml_document::xml_document @ 0x8150d8
// > pugi::xml_document::reset @ 0x815152
//
// 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:41 +0000
//
// write access to const memory has been detected, the output may be wrong!
int *__fastcall pugi::xml_document::create(int *this)
{
_DWORD *v1; // r3
int v2; // r2
v1 = (_DWORD *)(((unsigned int)this + 39) & 0xFFFFFFE0);
if ( !v1 )
{
*(_DWORD *)&word_10 = 0;
__und(0xFFu);
}
*v1 = 0;
*(int (__fastcall **)(_DWORD, _DWORD))((char *)&byte_4 + (((unsigned int)this + 39) & 0xFFFFFFE0)) = nullptr;
*(_DWORD *)&byte_8[((unsigned int)this + 39) & 0xFFFFFFE0] = 0;
*(_DWORD *)&byte_9[(((unsigned int)this + 39) & 0xFFFFFFE0) + 3] = 0;
*(int *)((char *)&dword_14 + (((unsigned int)this + 39) & 0xFFFFFFE0)) = 0;
*(_DWORD *)((char *)&word_10 + (((unsigned int)this + 39) & 0xFFFFFFE0)) = 0x8000;
*(int *)((char *)&dword_18 + (((unsigned int)this + 39) & 0xFFFFFFE0)) = ((unsigned int)this + 39) & 0xFFFFFFE0;
*(int *)((char *)&dword_1C + (((unsigned int)this + 39) & 0xFFFFFFE0)) = 0;
*(int *)((char *)&dword_20 + (((unsigned int)this + 39) & 0xFFFFFFE0)) = 0;
*(int *)((char *)&dword_24 + (((unsigned int)this + 39) & 0xFFFFFFE0)) = 0;
*(_DWORD *)((char *)&word_28 + (((unsigned int)this + 39) & 0xFFFFFFE0)) = 0;
*(_DWORD *)((char *)&word_30 + (((unsigned int)this + 39) & 0xFFFFFFE0)) = 0;
*(int *)((char *)&dword_34 + (((unsigned int)this + 39) & 0xFFFFFFE0)) = 0;
*(int *)((char *)&dword_38 + (((unsigned int)this + 39) & 0xFFFFFFE0)) = ((unsigned int)this + 39) & 0xFFFFFFE0;
*(int **)((char *)off_3C + (((unsigned int)this + 39) & 0xFFFFFFE0)) = (_DWORD *)(&stru_7FFC + 4);
*(int *)((char *)&dword_40 + (((unsigned int)this + 39) & 0xFFFFFFE0)) = 0;
*(int *)((char *)&dword_44 + (((unsigned int)this + 39) & 0xFFFFFFE0)) = 0;
*this = (int)(v1 + 6);
*(_DWORD *)((char *)&word_2C + (((unsigned int)this + 39) & 0xFFFFFFE0)) = (((unsigned int)this + 39) & 0xFFFFFFE0)
+ 24;
v2 = *this;
if ( *this )
v2 += 32;
*v1 = v2;
return this;
}