//
// LevelEditorLayer::getDelayedSpawnNode from 0x795370 to 0x795438 (200 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::addDelayedSpawn @ 0x795470
// > ??> @ 0x6ef98
//
// 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 12:53:33 +0000
//
__int64 __fastcall LevelEditorLayer::getDelayedSpawnNode(LevelEditorLayer *this)
{
__int64 v2; // x0
__int64 *v3; // x1
__int64 result; // x0
__int64 v5; // x0
__int64 v6; // [xsp+20h] [xbp+20h] BYREF
v2 = *((_QWORD *)this + 1860);
if ( *((_QWORD *)this + 1859) == v2 )
{
v5 = operator new(0x10u);
*(_QWORD *)v5 = 0;
v6 = v5;
*(_DWORD *)(v5 + 8) = 0;
}
else
{
v6 = *(_QWORD *)(v2 - 8);
*((_QWORD *)this + 1860) = v2 - 8;
}
v3 = *((__int64 **)this + 1857);
if ( *((__int64 **)this + 1858) == v3 )
{
std::vector::__push_back_slow_path((__int64)this + 14848, &v6);
return v6;
}
else
{
if ( v3 )
{
*v3 = v6;
v3 = *((__int64 **)this + 1857);
}
result = v6;
*((_QWORD *)this + 1857) = v3 + 1;
}
return result;
}