//
// cocos2d::extension::CCTableView::removeCellAtIndex from 0x10042d1b0 to 0x10042d3ba (522 bytes)
//
// 0 xrefs:
//
// 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 cocos2d::extension::CCTableView::removeCellAtIndex(
cocos2d::extension::CCTableView *a1,
unsigned int a2)
{
int v3; // eax
__int64 v4; // rax
__int64 v5; // rcx
__int64 v6; // rax
__int64 v7; // rdx
cocos2d::extension::CCSortableObject *v8; // rax
cocos2d::extension::CCTableViewCell *v9; // r12
unsigned int v10; // r14d
_QWORD *v11; // rax
__int64 *v12; // rdi
_QWORD *v13; // r12
__int64 v14; // rdx
_QWORD *v15; // rdx
_QWORD *v16; // rcx
_QWORD *v17; // rdx
bool v18; // zf
unsigned int v19; // r15d
cocos2d::extension::CCTableViewCell *v20; // r13
unsigned int v21; // r14d
unsigned int v22; // esi
unsigned int v23; // r14d
float v24; // [rsp-3Ch] [rbp-3Ch] BYREF
unsigned int v25; // [rsp-34h] [rbp-34h]
double v26; // 0:xmm0_8.8
if ( a2 != -1 )
{
v3 = (*(__int64 (__fastcall **)(_QWORD, cocos2d::extension::CCTableView *))(**(_QWORD **)&a1[1].m_fScaleX + 40LL))(
*(_QWORD *)&a1[1].m_fScaleX,
a1);
if ( v3 != 0 && v3 - 1 >= a2 )
{
v4 = *(_QWORD *)&a1[1].m_nTag;
v5 = *(_QWORD *)(v4 + 8);
if ( v5 )
{
v6 = v4 + 8;
v7 = v6;
do
{
if ( *(_DWORD *)(v5 + 28) >= a2 )
v7 = v5;
v5 = *(_QWORD *)(v5 + 8LL * (*(_DWORD *)(v5 + 28) < a2));
}
while ( v5 );
if ( v7 != v6 && *(_DWORD *)(v7 + 28) <= a2 )
{
v8 = cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID(
*(cocos2d::extension::CCArrayForObjectSorting **)&a1[1].m_uOrderOfArrival,
a2);
if ( v8 )
{
v9 = (cocos2d::extension::CCTableViewCell *)&v8[-40];
v10 = cocos2d::extension::CCArrayForObjectSorting::indexOfSortedObject(
*(cocos2d::extension::CCArrayForObjectSorting **)&a1[1].m_uOrderOfArrival,
v8);
cocos2d::extension::CCTableView::_moveCellOutOfSight(a1, v9);
v11 = *(_QWORD **)&a1[1].m_nTag;
v12 = (__int64 *)v11[1];
if ( v12 )
{
v13 = v11 + 1;
v14 = v11[1];
do
{
if ( *(_DWORD *)(v14 + 28) >= a2 )
v13 = (_QWORD *)v14;
v14 = *(_QWORD *)(v14 + 8LL * (*(_DWORD *)(v14 + 28) < a2));
}
while ( v14 );
if ( v13 != v11 + 1 && *((_DWORD *)v13 + 7) <= a2 )
{
v15 = (_QWORD *)v13[1];
if ( v15 )
{
do
{
v16 = v15;
v15 = (_QWORD *)*v15;
}
while ( v15 );
}
else
{
v17 = v13;
do
{
v16 = (_QWORD *)v17[2];
v18 = *v16 == (_QWORD)v17;
v17 = v16;
}
while ( !v18 );
}
if ( (_QWORD *)*v11 == v13 )
*v11 = v16;
--v11[2];
sub_100165F60(v12, v13);
operator delete(v13);
}
}
cocos2d::extension::CCTableView::_updateCellPositions(a1);
v19 = sub_100720070(*(_QWORD *)&a1[1].m_uOrderOfArrival) - 1;
if ( v19 > v10 )
{
v25 = v10;
do
{
v20 = (cocos2d::extension::CCTableViewCell *)sub_1007200C0(*(_QWORD *)&a1[1].m_uOrderOfArrival, v19);
v21 = cocos2d::extension::CCTableViewCell::getIdx(v20) - 1;
sub_10028CBE0(&v24, 0.0, 0.0);
((void (__fastcall *)(cocos2d::extension::CCTableViewCell *, float *))v20->setAnchorPoint)(v20, &v24);
*(cocos2d::CCPoint *)&v26 = cocos2d::extension::CCTableView::_offsetFromIndex(
(cocos2d::extension::CCTableView *)&v24,
(unsigned int)a1);
((void (__fastcall *)(cocos2d::extension::CCTableViewCell *, float *, double))v20->setPosition)(
v20,
&v24,
v26);
v22 = v21;
v23 = v25;
cocos2d::extension::CCTableViewCell::setIdx(v20, v22);
--v19;
}
while ( v19 > v23 );
}
}
}
}
}
}
}