//
// std::__ndk1::vector>::assign from 0x77183c to 0x7718f6 (186 bytes)
//
// 2 xrefs:
// > DeathTrackerPopup::parseGlobal @ 0x77191e
// > DeathTrackerPopup::countsForScope @ 0x771a6c
//
// 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:59:16 +0000
//
int __fastcall std::vector::assign(void **a1, unsigned int a2, int *a3)
{
_BYTE *v4; // r3
unsigned int v5; // r5
char *v6; // r0
unsigned int v8; // r3
unsigned int v9; // r2
int result; // r0
unsigned int v11; // r3
int *v12; // r2
int v13; // r2
char *v14; // r3
char *v15; // r3
unsigned int v16; // r1
unsigned int v17; // r1
int *v18; // r3
v4 = a1[2];
v5 = a2;
v6 = (char *)*a1;
if ( a2 > (v4 - v6) >> 2 )
{
if ( v6 )
{
while ( 1 )
{
v15 = (char *)a1[1];
if ( v6 == v15 )
break;
a1[1] = v15 - 4;
}
operator delete(v6);
a1[2] = nullptr;
a1[1] = nullptr;
*a1 = nullptr;
}
if ( v5 >= 0x40000000 )
sub_38AD98();
v16 = ((_BYTE *)a1[2] - (_BYTE *)*a1) >> 2;
if ( v16 > 0x1FFFFFFE )
{
v17 = 0x3FFFFFFF;
}
else
{
v17 = 2 * v16;
if ( v17 < v5 )
v17 = v5;
}
result = std::vector::allocate(a1, v17);
do
{
v18 = (int *)a1[1];
if ( v18 )
*v18 = *a3;
--v5;
a1[1] = (char *)a1[1] + 4;
}
while ( v5 );
}
else
{
v8 = ((_BYTE *)a1[1] - v6) >> 2;
v9 = v8;
if ( v8 >= a2 )
v9 = a2;
memset32(v6, *a3, v9);
result = (int)&v6[4 * v9];
if ( a2 <= v8 )
{
v13 = (int)*a1 + 4 * a2;
while ( 1 )
{
v14 = (char *)a1[1];
if ( (char *)v13 == v14 )
break;
a1[1] = v14 - 4;
}
}
else
{
v11 = a2 - v8;
do
{
v12 = (int *)a1[1];
if ( v12 )
*v12 = *a3;
--v11;
a1[1] = (char *)a1[1] + 4;
}
while ( v11 );
}
}
return result;
}