//
// std::__ndk1::vector>::reserve from 0x404618 to 0x4046fe (230 bytes)
//
// 1 xrefs:
// > PlayLayer::createCheckpoint @ 0x411d78
//
// 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
//
void __fastcall std::vector::reserve(void **a1, unsigned int a2, int a3, int a4)
{
int v6; // r6
std::length_error *exception; // r5
int v8; // r0
char *v9; // r9
char *v10; // r6
char *v11; // r10
void *v12; // r5
char *v13; // r12
char *i; // r3
char *v15; // r8
void *v16; // r0
_DWORD v17[3]; // [sp+4h] [bp-Ch] BYREF
v17[0] = a2;
v17[1] = a3;
v17[2] = a4;
if ( a2 > -252645135 * (((_BYTE *)a1[2] - (_BYTE *)*a1) >> 2) )
{
v6 = (_BYTE *)a1[1] - (_BYTE *)*a1;
if ( a2 )
{
if ( a2 > 0x3C3C3C3 )
{
std::logic_error::logic_error(
(std::logic_error *)v17,
"allocator::allocate(size_t n) 'n' exceeds maximum supported size");
v17[0] = &off_D1546C;
exception = (std::length_error *)_cxa_allocate_exception(8u);
std::length_error::length_error(exception, (const std::length_error *)v17);
_cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::length_error,
(void (*)(void *))std::length_error::~length_error);
}
v8 = operator new(68 * a2);
}
else
{
v8 = 0;
}
v9 = (char *)a1[1];
v10 = (char *)(v6 + v8);
v11 = (char *)*a1;
v12 = (void *)(v8 + 68 * a2);
v13 = v10;
for ( i = v9; i != v11; i = v15 )
{
v13 -= 68;
v15 = i - 68;
if ( v13 )
v13 = (char *)memcpy(v13, i - 68, 0x44u);
}
v16 = *a1;
a1[2] = v12;
*a1 = &v10[-68 * ((821096689 * ((unsigned int)(v9 - i) >> 2)) & 0x3FFFFFFF)];
a1[1] = v10;
if ( v16 )
operator delete(v16);
}
}