//
// std::vector>::push_back from 0x374fbc to 0x375032 (118 bytes)
//
// 3 xrefs:
// > LevelEditorLayer::addPlayerPoint @ 0x375056
// > LevelEditorLayer::addTouchPoint @ 0x375060
// > LevelEditorLayer::addPlayer2Point @ 0x3750ea
//
// 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::push_back(int a1, const cocos2d::CCPoint *a2)
{
int v3; // r3
unsigned int v5; // r0
int v6; // r6
cocos2d::CCPoint *v7; // r4
cocos2d::CCPoint *v8; // r0
cocos2d::CCPoint *v9; // r7
v3 = *(_DWORD *)(a1 + 4);
if ( v3 == *(_DWORD *)(a1 + 8) )
{
v5 = std::vector::_M_check_len((_DWORD *)a1, 1u, (int)"vector::_M_emplace_back_aux");
v6 = v5;
if ( v5 )
{
if ( v5 >= 0x20000000 )
sub_772FB4(v5);
v5 = operator new(8 * v5);
}
v7 = (cocos2d::CCPoint *)v5;
v8 = (cocos2d::CCPoint *)(v5 + *(_DWORD *)(a1 + 4) - *(_DWORD *)a1);
if ( v8 )
cocos2d::CCPoint::CCPoint(v8, a2);
v9 = std::__uninitialized_copy::__uninit_copy(
*(cocos2d::CCPoint **)a1,
*(cocos2d::CCPoint **)(a1 + 4),
v7)
+ 1;
if ( *(_DWORD *)a1 )
operator delete(*(void **)a1);
*(_DWORD *)a1 = v7;
*(_DWORD *)(a1 + 4) = v9;
*(_DWORD *)(a1 + 8) = &v7[v6];
}
else
{
if ( v3 )
cocos2d::CCPoint::CCPoint(*(cocos2d::CCPoint **)(a1 + 4), a2);
*(_DWORD *)(a1 + 4) += 8;
}
}