//
// std::__ndk1::__split_buffer &>::__split_buffer from 0x403aec to 0x403b80 (148 bytes)
//
// 5 xrefs:
// > PlayLayer::saveDynamicSaveObjects @ 0x403bea
// > PlayLayer::saveDynamicSaveObjects @ 0x403d3e
// > PlayLayer::saveDynamicSaveObjects @ 0x403da4
// > deserializeDynamicSaveObjects @ 0x718efa
// > deserializeDynamicSaveObjects @ 0x71903a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:47:26 +0000
//
// Alternative name is '_ZNSt6__ndk114__split_bufferI19SavedObjectStateRefRNS_9allocatorIS1_EEEC1EjjS4_'
_DWORD *__fastcall std::__split_buffer::__split_buffer(
_DWORD *a1,
unsigned int a2,
int a3,
int a4)
{
std::length_error *exception; // r5
int v8; // r0
int v9; // r2
_DWORD v11[2]; // [sp+4h] [bp-10h] BYREF
a1[4] = a4;
a1[3] = 0;
if ( a2 )
{
if ( a2 > 0x5555555 )
{
std::logic_error::logic_error(
(std::logic_error *)v11,
"allocator::allocate(size_t n) 'n' exceeds maximum supported size");
v11[0] = &off_D1546C;
exception = (std::length_error *)_cxa_allocate_exception(8u);
std::length_error::length_error(exception, (const std::length_error *)v11);
_cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::length_error,
(void (*)(void *))std::length_error::~length_error);
}
v8 = operator new(48 * a2);
}
else
{
v8 = 0;
}
*a1 = v8;
v9 = v8 + 48 * a3;
a1[2] = v9;
a1[1] = v9;
a1[3] = v8 + 48 * a2;
return a1;
}