//
// std::__ndk1::vector>::reserve from 0xa142e0 to 0xa145e8 (776 bytes)
//
// 2 xrefs:
// > GJEffectManager::createKeyframeCommand @ 0xa163cc
// > ??> @ 0x6b7b8
//
// 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:59:32 +0000
//
__int64 __fastcall std::vector::reserve(__int64 *a1, unsigned __int64 a2)
{
char *v4; // x21
_QWORD *v5; // x19
char *v6; // x0
char *v7; // x2
char *v8; // x0
char *v9; // x2
char *v10; // x0
char *v11; // x2
char *v12; // x0
char *v13; // x2
char *v14; // x0
char *v15; // x2
char *v16; // x0
char *v17; // x2
char *v18; // x0
char *v19; // x2
char *v20; // x0
char *v21; // x2
char *v22; // x0
char *v23; // x2
_BYTE *v24; // x0
void **v25; // x19
void *v26[2]; // [xsp+30h] [xbp+30h] BYREF
char *v27; // [xsp+40h] [xbp+40h]
if ( a2 > 0x6DB6DB6DB6DB6DB7LL * ((a1[2] - *a1) >> 6) )
{
std::__split_buffer::__split_buffer(
(__int64 *)v26,
a2,
0x6DB6DB6DB6DB6DB7LL * ((a1[1] - *a1) >> 6),
(__int64)(a1 + 2));
std::vector::__swap_out_circular_buffer(a1, v26);
v4 = (char *)v26[1];
while ( 1 )
{
v5 = v27;
if ( v4 == v27 )
break;
while ( 1 )
{
v27 = (char *)(v5 - 56);
v6 = (char *)*(v5 - 19);
if ( v6 )
{
v7 = (char *)*(v5 - 18);
if ( v6 != v7 )
*(v5 - 18) = &v7[8 * ~((unsigned __int64)(v7 - 8 - v6) >> 3)];
operator delete(v6);
}
v8 = (char *)*(v5 - 22);
if ( v8 )
{
v9 = (char *)*(v5 - 21);
if ( v8 != v9 )
*(v5 - 21) = &v9[8 * ~((unsigned __int64)(v9 - 8 - v8) >> 3)];
operator delete(v8);
}
v10 = (char *)*(v5 - 25);
if ( v10 )
{
v11 = (char *)*(v5 - 24);
if ( v10 != v11 )
*(v5 - 24) = &v11[8 * ~((unsigned __int64)(v11 - 8 - v10) >> 3)];
operator delete(v10);
}
v12 = (char *)*(v5 - 28);
if ( v12 )
{
v13 = (char *)*(v5 - 27);
if ( v12 != v13 )
*(v5 - 27) = &v13[8 * ~((unsigned __int64)(v13 - 8 - v12) >> 3)];
operator delete(v12);
}
v14 = (char *)*(v5 - 31);
if ( v14 )
{
v15 = (char *)*(v5 - 30);
if ( v14 != v15 )
*(v5 - 30) = &v15[8 * ~((unsigned __int64)(v15 - 8 - v14) >> 3)];
operator delete(v14);
}
v16 = (char *)*(v5 - 40);
if ( v16 )
{
v17 = (char *)*(v5 - 39);
if ( v16 != v17 )
*(v5 - 39) = &v17[8 * ~((unsigned __int64)(v17 - 8 - v16) >> 3)];
operator delete(v16);
}
v18 = (char *)*(v5 - 43);
if ( v18 )
{
v19 = (char *)*(v5 - 42);
if ( v18 != v19 )
*(v5 - 42) = &v19[8 * ~((unsigned __int64)(v19 - 8 - v18) >> 3)];
operator delete(v18);
}
v20 = (char *)*(v5 - 46);
if ( v20 )
{
v21 = (char *)*(v5 - 45);
if ( v20 != v21 )
*(v5 - 45) = &v21[8 * ~((unsigned __int64)(v21 - 8 - v20) >> 3)];
operator delete(v20);
}
v22 = (char *)*(v5 - 49);
if ( v22 )
{
v23 = (char *)*(v5 - 48);
if ( v22 != v23 )
*(v5 - 48) = &v23[8 * ~((unsigned __int64)(v23 - 8 - v22) >> 3)];
operator delete(v22);
}
v24 = (_BYTE *)*(v5 - 52);
if ( !v24 )
break;
v25 = (void **)(v5 - 51);
if ( v24 != *v25 )
*v25 = (char *)*v25 + 8 * ~((unsigned __int64)((char *)*v25 - 8 - v24) >> 3);
operator delete(v24);
v5 = v27;
if ( v4 == v27 )
goto LABEL_45;
}
}
LABEL_45:
if ( v26[0] )
operator delete(v26[0]);
}
return _stack_chk_guard;
}