//
// cocos2d::extension::CCTableView::removeCellAtIndex from 0xaa8ab4 to 0xaa8bbc (264 bytes)
//
// 1 xrefs:
// > ??> @ 0x75570
//
// 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 cocos2d::extension::CCTableView::removeCellAtIndex(cocos2d::extension::CCTableView *a1, unsigned int a2)
{
int v3; // w0
cocos2d::extension::CCTableViewCell *v4; // x20
unsigned int v5; // w21
_QWORD *v6; // x20
_QWORD *v7; // x0
_QWORD *v8; // x1
unsigned int v9; // w20
unsigned int v10; // w1
unsigned int Idx; // w0
cocos2d::extension::CCTableViewCell *v12; // [xsp+30h] [xbp+30h]
unsigned int v13; // [xsp+3Ch] [xbp+3Ch] BYREF
v13 = a2;
if ( a2 != -1 )
{
v3 = (*(__int64 (__fastcall **)(_QWORD, cocos2d::extension::CCTableView *))(**(_QWORD **)&a1[1].m_fScaleX + 40LL))(
*(_QWORD *)&a1[1].m_fScaleX,
a1);
if ( v3 )
{
if ( v3 - 1 >= v13 )
{
v4 = cocos2d::extension::CCTableView::cellAtIndex(a1, v13);
if ( v4 )
{
v5 = cocos2d::extension::CCArrayForObjectSorting::indexOfSortedObject(
*(cocos2d::extension::CCArrayForObjectSorting **)&a1[1].m_uOrderOfArrival,
&v4->cocos2d::extension::CCSortableObject);
cocos2d::extension::CCTableView::_moveCellOutOfSight(a1, v4);
v6 = *(_QWORD **)&a1[1].m_nTag;
v7 = (_QWORD *)std::_Rb_tree,std::less,std::allocator>::equal_range(
(__int64)v6,
&v13);
std::_Rb_tree,std::less,std::allocator>::_M_erase_aux(
v6,
v7,
v8);
cocos2d::extension::CCTableView::_updateCellPositions(a1);
v9 = cocos2d::CCArray::count(*(cocos2d::CCArray **)&a1[1].m_uOrderOfArrival) - 1;
while ( v5 < v9 )
{
v10 = v9--;
v12 = (cocos2d::extension::CCTableViewCell *)cocos2d::CCArray::objectAtIndex(
*(cocos2d::CCArray **)&a1[1].m_uOrderOfArrival,
v10);
Idx = cocos2d::extension::CCTableViewCell::getIdx(v12);
cocos2d::extension::CCTableView::_setIndexForCell(a1, Idx - 1, v12);
}
}
}
}
}
}