//
// std::vector>::_M_erase from 0x4807ac to 0x48080a (94 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::controlEventLink @ 0x48085e
// > GJBaseGameLayer::activateEventTrigger @ 0x493104
//
// 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
//
int __fastcall std::vector::_M_erase(int a1, int a2)
{
void *v2; // r2
int v3; // r3
int v6; // r4
int v7; // r5
int v8; // r3
void **v9; // r0
int v10; // r3
int v11; // r0
v2 = (void *)(a2 + 28);
v3 = *(_DWORD *)(a1 + 4);
if ( a2 + 28 != v3 )
{
v6 = a2 + 16;
v7 = -1227133513 * ((v3 - (int)v2) >> 2);
while ( v7 > 0 )
{
v8 = *(_DWORD *)(v6 + 12);
v9 = (void **)v6;
v6 += 28;
--v7;
*(_DWORD *)(v6 - 44) = v8;
*(_DWORD *)(v6 - 40) = *(_DWORD *)(v6 - 12);
*(_DWORD *)(v6 - 36) = *(_DWORD *)(v6 - 8);
v10 = *(unsigned __int8 *)(v6 - 4);
*(_BYTE *)(v6 - 32) = v10;
sub_47EF98(v9, (void **)v6, v2, v10);
}
}
v11 = *(_DWORD *)(a1 + 4);
*(_DWORD *)(a1 + 4) = v11 - 28;
std::_Vector_base::~_Vector_base((void **)(v11 - 12));
return a2;
}