//
// sub_10011BFA4 from 0x10011bfa4 to 0x10011c030 (140 bytes)
//
// 3 xrefs:
// > PlayLayer::processCreateObjectsFromSetup @ 0x1001163d4
// > LevelEditorLayer::createObjectsFromSetup @ 0x100357e5c
// > LevelEditorLayer::createObjectsFromString @ 0x100359800
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall sub_10011BFA4(_QWORD *a1, unsigned __int64 a2)
{
void **v3; // x20
unsigned __int64 v4; // x8
bool v5; // cf
unsigned __int64 v6; // x8
__int64 v7; // x21
int v8; // w8
v3 = (void **)a1[1];
v4 = 0xAAAAAAAAAAAAAAABLL * (((__int64)v3 - *a1) >> 3);
v5 = a2 >= v4;
v6 = a2 - v4;
if ( v6 != 0 && v5 )
{
sub_100127C38(a1, v6);
}
else if ( !v5 )
{
v7 = *a1 + 24 * a2;
while ( v3 != (void **)v7 )
{
v8 = *((char *)v3 - 1);
v3 -= 3;
if ( v8 < 0 )
operator delete(*v3);
}
a1[1] = v7;
}
}