//
// sub_1000BDE50 from 0x1000bde50 to 0x1000bdefd (173 bytes)
//
// 1 xrefs:
// > PlayLayer::saveActiveSaveObjects @ 0x1000bce66
//
// 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_1000BDE50(__int64 a1)
{
void *v1; // rbx
signed __int64 v2; // r15
unsigned __int64 v3; // r13
char *v4; // r12
char *v5; // r13
v1 = *(void **)a1;
v2 = *(_QWORD *)(a1 + 8) - *(_QWORD *)a1;
if ( *(_QWORD *)(a1 + 16) - *(_QWORD *)a1 > (unsigned __int64)v2 )
{
v3 = v2 >> 4;
if ( *(void **)(a1 + 8) == v1 )
{
v4 = nullptr;
}
else
{
if ( v3 >> 60 )
sub_100054850();
v4 = (char *)operator new(*(_QWORD *)(a1 + 8) - *(_QWORD *)a1);
}
v5 = &v4[16 * v3];
memcpy(v4, v1, v2);
*(_QWORD *)a1 = v4;
*(_QWORD *)(a1 + 8) = v5;
*(_QWORD *)(a1 + 16) = v5;
if ( v1 )
operator delete(v1);
}
}