//
// cocos2d::extension::CCTableView::_moveCellOutOfSight from 0x1004199e0 to 0x100419b1f (319 bytes)
//
// 4 xrefs:
// > cocos2d::extension::CCTableView::updateCellAtIndex @ 0x100419962
// > cocos2d::extension::CCTableView::removeCellAtIndex @ 0x100419ee4
// > cocos2d::extension::CCTableView::scrollViewDidScroll @ 0x10041a554
// > cocos2d::extension::CCTableView::scrollViewDidScroll @ 0x10041a5a6
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:30:12 +0000
//
__int64 __fastcall cocos2d::extension::CCTableView::_moveCellOutOfSight(_QWORD *a1, __int64 a2)
{
__int64 v4; // rdi
__int64 v5; // rsi
_QWORD *v6; // r12
unsigned int Idx; // eax
__int64 *v8; // rdi
_QWORD *v9; // r15
__int64 v10; // rdx
_QWORD *v11; // rcx
_QWORD *v12; // rax
_QWORD *v13; // rcx
bool v14; // zf
__int64 v15; // r15
__int64 result; // rax
__int64 Container; // rax
v4 = a1[81];
if ( v4 )
(*(void (__fastcall **)(__int64, _QWORD *, __int64))(*(_QWORD *)v4 + 56LL))(v4, a1, a2);
sub_1007FEBF0(a1[79], a2);
v5 = a2 + 320;
if ( !a2 )
v5 = 0;
cocos2d::extension::CCArrayForObjectSorting::removeSortedObject(a1[78], v5);
v6 = (_QWORD *)a1[74];
Idx = cocos2d::extension::CCTableViewCell::getIdx(a2);
v8 = (__int64 *)v6[1];
if ( v8 )
{
v9 = v6 + 1;
v10 = v6[1];
do
{
if ( *(_DWORD *)(v10 + 28) >= Idx )
v9 = (_QWORD *)v10;
v10 = *(_QWORD *)(v10 + 8LL * (*(_DWORD *)(v10 + 28) < Idx));
}
while ( v10 );
if ( v9 != v6 + 1 && Idx >= *((_DWORD *)v9 + 7) )
{
v11 = (_QWORD *)v9[1];
if ( v11 )
{
do
{
v12 = v11;
v11 = (_QWORD *)*v11;
}
while ( v11 );
}
else
{
v13 = v9;
do
{
v12 = (_QWORD *)v13[2];
v14 = *v12 == (_QWORD)v13;
v13 = v12;
}
while ( !v14 );
}
if ( (_QWORD *)*v6 == v9 )
*v6 = v12;
--v6[2];
sub_1001454C0(v8, v9);
operator delete(v9);
}
}
cocos2d::extension::CCTableViewCell::reset(a2);
v15 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 512LL))(a2);
result = cocos2d::extension::CCScrollView::getContainer((__int64)a1);
if ( v15 == result )
{
Container = cocos2d::extension::CCScrollView::getContainer((__int64)a1);
return (*(__int64 (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)Container + 552LL))(Container, a2, 1);
}
return result;
}