//
// std::vector>::_M_check_len from 0x3cecbc to 0x3cecec (48 bytes)
//
// 7 xrefs:
// > std::vector>::emplace_back @ 0x3d6698
// > GJLevelList::reorderLevel @ 0x3d7e1a
// > GJGameLevel::storeNewLocalScore @ 0x3d82d4
// > SpawnTriggerGameObject::updateRemapKeys @ 0x3fe316
// > SpawnTriggerGameObject::updateRemapKeys @ 0x3fe430
// > std::vector>::resize @ 0x480bce
// > timerItemFromString @ 0x49c706
//
// 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
//
unsigned int __fastcall std::vector::_M_check_len(_DWORD *a1, unsigned int a2, int a3)
{
unsigned int v3; // r3
unsigned int result; // r0
v3 = (a1[1] - *a1) >> 2;
if ( 0x3FFFFFFF - v3 < a2 )
sub_7731C4(a3, a2, a3);
if ( v3 < a2 )
result = v3 + a2;
else
result = 2 * v3;
if ( result < v3 )
return 0x3FFFFFFF;
if ( result >= 0x3FFFFFFF )
return 0x3FFFFFFF;
return result;
}