//
// cocos2d::extension::CCTableView::_moveCellOutOfSight from 0x1800158f0 to 0x180015a1e (302 bytes)
//
// 6 xrefs:
// > cocos2d::extension::CCTableView::updateCellAtIndex @ 0x180014ebf
// > cocos2d::extension::CCTableView::removeCellAtIndex @ 0x18001525a
// > cocos2d::extension::CCTableView::scrollViewDidScroll @ 0x180015eba
// > cocos2d::extension::CCTableView::scrollViewDidScroll @ 0x180015f12
// > ??> @ 0x180032408
// > ??> @ 0x18004c7ac
//
// 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:15:41 +0000
//
void __fastcall cocos2d::extension::CCTableView::_moveCellOutOfSight(
cocos2d::extension::CCTableView *this,
struct cocos2d::extension::CCTableViewCell *a2)
{
__int64 v4; // rcx
struct cocos2d::extension::CCSortableObject *v5; // rdx
__int64 *v6; // r11
unsigned int v7; // r9d
__int64 *v8; // r10
__int64 *v9; // rdx
__int64 *v10; // rax
__int64 *i; // rcx
unsigned int v12; // r8d
__int64 v13; // rax
__int64 v14; // rbx
__int64 v15; // r8
_QWORD v16[3]; // [rsp+20h] [rbp-18h] BYREF
v4 = *((_QWORD *)this + 81);
if ( v4 )
(*(void (__fastcall **)(__int64, cocos2d::extension::CCTableView *, struct cocos2d::extension::CCTableViewCell *))(*(_QWORD *)v4 + 48LL))(
v4,
this,
a2);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 79), a2);
v5 = (struct cocos2d::extension::CCTableViewCell *)((char *)a2 + 320);
if ( !a2 )
v5 = nullptr;
cocos2d::extension::CCArrayForObjectSorting::removeSortedObject(
*((cocos2d::extension::CCArrayForObjectSorting **)this + 78),
v5);
v6 = *((__int64 **)this + 74);
v7 = *((_DWORD *)a2 + 82);
v8 = (__int64 *)*v6;
v9 = (__int64 *)*v6;
v10 = *(__int64 **)(*v6 + 8);
for ( i = v10; !*((_BYTE *)i + 25); i = (__int64 *)*i )
{
v12 = *((_DWORD *)i + 7);
if ( v12 >= v7 )
{
if ( *((_BYTE *)v9 + 25) && v7 < v12 )
v9 = i;
v8 = i;
}
else
{
i += 2;
}
}
if ( !*((_BYTE *)v9 + 25) )
v10 = (__int64 *)*v9;
while ( !*((_BYTE *)v10 + 25) )
{
if ( v7 >= *((_DWORD *)v10 + 7) )
{
v10 = (__int64 *)v10[2];
}
else
{
v9 = v10;
v10 = (__int64 *)*v10;
}
}
v16[1] = v9;
v16[0] = v8;
sub_180016770(v6, v16);
v13 = *(_QWORD *)a2;
*((_DWORD *)a2 + 82) = -1;
v14 = *((_QWORD *)this + 56);
if ( (*(__int64 (__fastcall **)(struct cocos2d::extension::CCTableViewCell *))(v13 + 504))(a2) == v14 )
{
LOBYTE(v15) = 1;
(*(void (__fastcall **)(_QWORD, struct cocos2d::extension::CCTableViewCell *, __int64))(**((_QWORD **)this + 56)
+ 536LL))(
*((_QWORD *)this + 56),
a2,
v15);
}
}