//
// sub_1000BDD70 from 0x1000bdd70 to 0x1000bde3b (203 bytes)
//
// 1 xrefs:
// > PlayLayer::saveDynamicSaveObjects @ 0x1000bcc25
//
// 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_1000BDD70(__int64 a1)
{
void *v1; // rbx
signed __int64 v2; // r15
char *v3; // rax
char *v4; // r13
v1 = *(void **)a1;
v2 = *(_QWORD *)(a1 + 8) - *(_QWORD *)a1;
if ( *(_QWORD *)(a1 + 16) - *(_QWORD *)a1 > (unsigned __int64)v2 )
{
if ( *(void **)(a1 + 8) == v1 )
{
v3 = nullptr;
}
else
{
if ( 0xAAAAAAAAAAAAAAABLL * (v2 >> 4) >= 0x555555555555556LL )
sub_100054850();
v3 = (char *)operator new(*(_QWORD *)(a1 + 8) - *(_QWORD *)a1);
}
v4 = &v3[16 * (v2 >> 4)];
memcpy(&v4[-v2], v1, v2);
*(_QWORD *)a1 = &v4[-v2];
*(_QWORD *)(a1 + 8) = v4;
*(_QWORD *)(a1 + 16) = v4;
if ( v1 )
operator delete(v1);
}
}