//
// GJLevelList::removeLevelFromList from 0x100562aa0 to 0x100562b51 (177 bytes)
//
// 1 xrefs:
// > LevelListLayer::cellPerformedAction @ 0x10035f779
//
// 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 GJLevelList::removeLevelFromList(GJLevelList *a1, int a2)
{
double v2; // xmm0_8
std::__vector_base::pointer begin; // r14
std::__vector_base::pointer end; // rax
size_t v5; // r15
cocos2d::CCDictionary *m_levelsDict; // r14
size_t v7[7]; // [rsp+8h] [rbp-38h] BYREF
begin = a1->m_levels.__begin_;
end = a1->m_levels.__end_;
if ( begin != end )
{
v5 = (char *)end - (char *)begin - 4;
while ( *begin != a2 )
{
++begin;
v5 -= 4LL;
if ( begin == end )
goto LABEL_9;
}
if ( begin + 1 != end )
memmove(begin, begin + 1, v5);
a1->m_levels.__end_ = (std::__vector_base::pointer)((char *)begin + v5);
GJLevelList::updateLevelsString(a1);
}
LABEL_9:
m_levelsDict = a1->m_levelsDict;
GameToolbox::intToString(v7, a2, v2);
cocos2d::CCDictionary::removeObjectForKey_1((__int64)m_levelsDict, (char *)v7);
if ( (v7[0] & 1) != 0 )
operator delete((void *)v7[2]);
a1->m_modified = 1;
}