//
// std::__ndk1::__split_buffer &>::__split_buffer from 0x6fc1f8 to 0x6fc308 (272 bytes)
//
// 7 xrefs:
// > PlayLayer::saveDynamicSaveObjects @ 0x6fc4e4
// > PlayLayer::saveDynamicSaveObjects @ 0x6fc660
// > PlayLayer::saveDynamicSaveObjects @ 0x6fc6e0
// > deserializeDynamicSaveObjects @ 0xc140c8
// > deserializeDynamicSaveObjects @ 0xc142c0
// > ??> @ 0x62ec0
// > ??> @ 0xaa3f8
//
// 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:51:59 +0000
//
// Alternative name is '_ZNSt6__ndk114__split_bufferI19SavedObjectStateRefRNS_9allocatorIS1_EEEC2EmmS4_'
__int64 __fastcall std::__split_buffer::__split_buffer(
__int64 *a1,
unsigned __int64 a2,
__int64 a3,
__int64 a4)
{
__int64 v5; // x0
__int64 v6; // x19
__int64 v7; // x0
__int64 v8; // x2
std::length_error *exception; // x20
__int64 v11; // [xsp+38h] [xbp+38h]
_QWORD v12[3]; // [xsp+48h] [xbp+48h] BYREF
a1[3] = 0;
v5 = _stack_chk_guard;
a1[4] = a4;
v12[2] = v5;
if ( a2 )
{
if ( a2 > 0x555555555555555LL )
{
std::logic_error::logic_error(
(std::logic_error *)v12,
"allocator::allocate(size_t n) 'n' exceeds maximum supported size");
v12[0] = off_1536D28;
exception = (std::length_error *)_cxa_allocate_exception((size_t)&word_10);
std::length_error::length_error(exception, (const std::length_error *)v12);
_cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::length_error,
(void (*)(void *))std::logic_error::~logic_error);
}
v11 = a3;
v6 = 48 * a2;
v7 = operator new(48 * a2);
a3 = v11;
}
else
{
v6 = 0;
v7 = 0;
}
*a1 = v7;
v8 = v7 + 48 * a3;
a1[3] = v7 + v6;
a1[2] = v8;
a1[1] = v8;
return _stack_chk_guard;
}