//
// std::vector>::operator= from 0x4a6260 to 0x4a62e6 (134 bytes)
//
// 7 xrefs:
// > tk::spline::operator= @ 0x4a62ec
// > tk::spline::operator= @ 0x4a62f8
// > tk::spline::operator= @ 0x4a6304
// > tk::spline::operator= @ 0x4a6310
// > tk::spline::operator= @ 0x4a631c
// > tk::spline::set_points @ 0x595872
// > tk::spline::set_points @ 0x59587c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void **__fastcall std::vector::operator=(void **a1, void **a2)
{
char *v4; // r7
int v5; // r9
char *v6; // r2
int v7; // r6
unsigned int v8; // r3
char *v9; // r5
char *v10; // r1
char *v11; // r0
int v12; // r1
int v13; // r1
if ( a2 != a1 )
{
v4 = (char *)*a2;
v5 = (int)a2[1];
v6 = (char *)*a1;
v7 = v5 - (_DWORD)*a2;
v8 = v7 >> 3;
if ( v7 >> 3 <= (unsigned int)(((_BYTE *)a1[2] - (_BYTE *)*a1) >> 3) )
{
v10 = (char *)a1[1];
v11 = v4;
v12 = v10 - v6;
if ( v8 > v12 >> 3 )
{
std::__copy_move::__copy_m(v4, (int)&v4[v12], v6);
v6 = (char *)a1[1];
v13 = (int)a2[1];
v11 = (char *)*a2 + v6 - (_BYTE *)*a1;
}
else
{
v13 = v5;
}
std::__copy_move::__copy_m(v11, v13, v6);
}
else
{
if ( v8 )
{
if ( v8 >= 0x20000000 )
sub_772FB4(a1);
v9 = (char *)operator new(v5 - (_DWORD)v4);
}
else
{
v9 = nullptr;
}
std::__copy_move::__copy_m(v4, v5, v9);
if ( *a1 )
operator delete(*a1);
*a1 = v9;
a1[2] = &v9[v7];
}
a1[1] = (char *)*a1 + v7;
}
return a1;
}