//
// cocos2d::extension::CCTableView::insertCellAtIndex from 0x100419c80 to 0x100419e16 (406 bytes)
//
// 0 xrefs:
//
// 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
//
void __fastcall cocos2d::extension::CCTableView::insertCellAtIndex(__int64 a1, unsigned int a2)
{
int v3; // eax
__int64 v4; // rdi
void *v5; // rax
unsigned int i; // r15d
__int64 v7; // r13
unsigned int v8; // r14d
unsigned int v9; // r12d
__int64 v10; // r15
float v11; // [rsp-3Ch] [rbp-3Ch] BYREF
unsigned int v12; // [rsp-34h] [rbp-34h]
if ( a2 != -1 )
{
v3 = (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 640) + 40LL))(*(_QWORD *)(a1 + 640), a1);
if ( v3 != 0 && v3 - 1 >= a2 )
{
v4 = *(_QWORD *)(a1 + 624);
v12 = a2;
v5 = cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID(v4, a2);
if ( v5 )
{
for ( i = cocos2d::extension::CCArrayForObjectSorting::indexOfSortedObject(*(_QWORD *)(a1 + 624), (__int64)v5);
i < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 624));
++i )
{
v7 = sub_1007FEFE0(*(_QWORD *)(a1 + 624), i);
v8 = cocos2d::extension::CCTableViewCell::getIdx(v7) + 1;
sub_100278250(&v11, 0.0, 0.0);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v7 + 296LL))(v7, &v11);
cocos2d::extension::CCTableView::_offsetFromIndex(&v11, a1, v8);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v7 + 184LL))(v7, &v11);
cocos2d::extension::CCTableViewCell::setIdx(v7, v8);
}
}
v9 = v12;
v10 = (*(__int64 (__fastcall **)(_QWORD, __int64, _QWORD))(**(_QWORD **)(a1 + 640) + 32LL))(
*(_QWORD *)(a1 + 640),
a1,
v12);
sub_100278250(&v11, 0.0, 0.0);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v10 + 296LL))(v10, &v11);
cocos2d::extension::CCTableView::_offsetFromIndex(&v11, a1, v9);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v10 + 184LL))(v10, &v11);
cocos2d::extension::CCTableViewCell::setIdx(v10, v9);
cocos2d::extension::CCTableView::_addCellIfNecessary(a1, v10);
cocos2d::extension::CCTableView::_updateCellPositions(a1);
cocos2d::extension::CCTableView::_updateContentSize(a1);
}
}
}