//
// DS_Dictionary::stepBackToRootSubDict from 0xdbad0c to 0xdbadf8 (236 bytes)
//
// 2 xrefs:
// > CCAnimateFrameCache::addDict @ 0x68e014
// > ??> @ 0x7d350
//
// This function is hookable on this platform (idp: arm, 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 13:08:44 +0000
//
__int64 __fastcall DS_Dictionary::stepBackToRootSubDict(DS_Dictionary *this)
{
__int64 v2; // x2
__int64 v3; // x1
__int64 *v4; // x1
_QWORD *v5; // x20
__int64 v7; // [xsp+30h] [xbp+30h] BYREF
v2 = *((_QWORD *)this + 26);
v3 = *((_QWORD *)this + 27);
if ( (unsigned __int64)(v3 - v2) > 0xF )
{
if ( v2 != v3 )
*((_QWORD *)this + 27) = v3 + 8 * ~((unsigned __int64)(v3 - 8 - v2) >> 3);
pugi::xml_node::xml_node((pugi::xml_node *)&v7);
v4 = *((__int64 **)this + 27);
if ( (unsigned __int64)v4 >= *((_QWORD *)this + 28) )
{
std::vector
::__push_back_slow_path((char **)this + 26, &v7);
v5 = *((_QWORD **)this + 27);
}
else
{
if ( v4 )
{
*v4 = v7;
v4 = *((__int64 **)this + 27);
}
v5 = v4 + 1;
*((_QWORD *)this + 27) = v4 + 1;
}
v7 = pugi::xml_node::child(this, "plist");
*(v5 - 1) = pugi::xml_node::child((pugi::xml_node *)&v7, "dict");
}
return _stack_chk_guard;
}