//
// std::__ndk1::vector>::assign from 0x5d186c to 0x5d1986 (282 bytes)
//
// 1 xrefs:
// > std::__ndk1::__hash_table>>,std::__ndk1::__unordered_map_hasher>>,std::__ndk1::hash,true>,std::__ndk1::__unordered_map_equal>>,std::__ndk1::equal_to,true>,std::__ndk1::allocator>>>>::__assign_multi>>,void *> *>> @ 0x5d1a42
//
// 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:54:05 +0000
//
int __fastcall std::vector::assign(int a1, int a2, const void **a3)
{
char **v3; // r5
unsigned int v7; // r7
char **v8; // r4
int v9; // r8
char **v10; // r5
char **v11; // r8
int v12; // r7
int v13; // r0
int v14; // r1
int result; // r0
char **v16; // r0
unsigned int v17; // r1
v3 = *(char ***)a1;
v7 = -1171354717 * (((int)a3 - a2) >> 2);
if ( v7 > -1171354717 * ((*(_DWORD *)(a1 + 8) - *(_DWORD *)a1) >> 2) )
{
if ( v3 )
{
while ( 1 )
{
v16 = *(char ***)(a1 + 4);
if ( v3 == v16 )
break;
*(_DWORD *)(a1 + 4) = v16 - 11;
std::__vector_base::~__vector_base(v16 - 3);
}
operator delete(*(void **)a1);
*(_DWORD *)(a1 + 8) = 0;
*(_DWORD *)(a1 + 4) = 0;
*(_DWORD *)a1 = 0;
}
v17 = 97612893;
if ( v7 > 0x5D1745D )
sub_388B90();
if ( (unsigned int)(-1171354717 * ((*(_DWORD *)(a1 + 8) - *(_DWORD *)a1) >> 2)) <= 0x2E8BA2D )
{
v17 = 1952257862 * ((*(_DWORD *)(a1 + 8) - *(_DWORD *)a1) >> 2);
if ( v17 < v7 )
v17 = v7;
}
std::vector::allocate((_DWORD *)a1, v17);
v13 = a1;
v14 = a2;
return sub_5C5110(v13, v14, a3);
}
v8 = (char **)(a2 + 32);
v9 = *(_DWORD *)(a1 + 4) - (_DWORD)v3;
v10 = v3 + 8;
if ( v7 <= -1171354717 * (v9 >> 2) )
{
v11 = (char **)a3;
v12 = 0;
}
else
{
v11 = (char **)(v9 + a2);
v12 = 1;
}
while ( v11 != v8 - 8 )
{
*((_BYTE *)v10 - 32) = *((_BYTE *)v8 - 32);
*(v10 - 7) = *(v8 - 7);
*(v10 - 6) = *(v8 - 6);
*(v10 - 5) = *(v8 - 5);
*(v10 - 4) = *(v8 - 4);
*(v10 - 3) = *(v8 - 3);
*(v10 - 2) = *(v8 - 2);
*((_BYTE *)v10 - 4) = *((_BYTE *)v8 - 4);
if ( v10 != v8 )
std::vector::assign(v10, *v8, v8[1]);
v10 += 11;
v8 += 11;
}
if ( v12 )
{
v13 = a1;
v14 = (int)v11;
return sub_5C5110(v13, v14, a3);
}
while ( 1 )
{
result = *(_DWORD *)(a1 + 4);
if ( v10 - 8 == (char **)result )
break;
*(_DWORD *)(a1 + 4) = result - 44;
std::__vector_base::~__vector_base((char **)(result - 12));
}
return result;
}