//
// TableView::reloadData from 0x140074d30 to 0x140075270 (1344 bytes)
//
// 6 xrefs:
// > BoomListView::setupList @ 0x14003c3b3
// > BoomListView::setupList @ 0x14003c3d5
// > CustomListView::setupList @ 0x1400abe40
// > CustomListView::setupList @ 0x1400ac29f
// > CustomListView::setupList @ 0x1400ac2bd
// > ??> @ 0x1406c63b4
//
// 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
//
// Hidden C++ exception states: #wind=1
void TableView::reloadData(TableView *a1)
{
TableViewDataSource *m_dataSource; // rcx
TableViewCell *v3; // r13
signed int v4; // edi
signed int v5; // eax
signed int j; // r12d
struct cocos2d::CCObject *v7; // rax
struct cocos2d::CCObject *v8; // rbx
TableViewDelegate *m_tableDelegate; // rcx
CCIndexPath *v10; // r15
double v11; // xmm0_8
float v12; // xmm9_4
float v13; // xmm8_4
float y; // xmm6_4
float *v15; // rax
__int64 v16; // rax
struct cocos2d::CCObject *v17; // r14
const struct cocos2d::CCSize *v18; // rax
CCContentLayer_vtbl *v19; // rbx
const cocos2d::CCSize *v20; // rax
signed int k; // ebp
struct cocos2d::CCObject *v22; // rdi
float *v23; // rax
__int64 v24; // rax
float v25; // xmm6_4
float *v26; // rax
__int64 v27; // rax
cocos2d::CCPoint *v28; // rcx
__int64 v29; // rbx
__int64 v30; // rax
float v31; // xmm6_4
float v32; // xmm7_4
float *v33; // rax
TableViewCell *v34; // rax
TableViewCell *v35; // rdi
TableViewCell_vtbl *v36; // rbx
const cocos2d::CCPoint *v37; // rax
TableViewCell_vtbl *v38; // rbx
const cocos2d::CCSize *v39; // rax
const cocos2d::CCSize *v40; // rax
TableViewCell_vtbl *v41; // rbx
const cocos2d::CCPoint *v42; // rax
TableViewDelegate *v43; // rcx
TableViewDelegate *v44; // rcx
cocos2d::CCPoint v45; // [rsp+20h] [rbp-108h] BYREF
cocos2d::CCPoint v46; // [rsp+28h] [rbp-100h] BYREF
cocos2d::CCSize v47[2]; // [rsp+30h] [rbp-F8h] BYREF
cocos2d::CCPoint v48; // [rsp+40h] [rbp-E8h] BYREF
cocos2d::CCSize v49; // [rsp+48h] [rbp-E0h] BYREF
cocos2d::CCPoint v50; // [rsp+50h] [rbp-D8h] BYREF
cocos2d::CCPoint v51; // [rsp+58h] [rbp-D0h] BYREF
cocos2d::CCPoint v52; // [rsp+60h] [rbp-C8h] BYREF
cocos2d::CCPoint v53; // [rsp+68h] [rbp-C0h] BYREF
cocos2d::CCSize v54; // [rsp+70h] [rbp-B8h] BYREF
cocos2d::CCPoint v55; // [rsp+78h] [rbp-B0h] BYREF
signed int i; // [rsp+130h] [rbp+8h]
int v57; // [rsp+138h] [rbp+10h]
signed int v58; // [rsp+140h] [rbp+18h]
signed int v59; // [rsp+148h] [rbp+20h]
if ( a1->m_tableDelegate )
{
m_dataSource = a1->m_dataSource;
if ( m_dataSource )
{
v3 = nullptr;
v59 = m_dataSource->numberOfSectionsInTableView(m_dataSource, a1);
v4 = 0;
for ( i = 0; v4 < v59; i = v4 )
{
v57 = a1->m_dataSource->numberOfRowsInSection(a1->m_dataSource, v4, a1);
v5 = cocos2d::CCArray::count(a1->m_cellArray);
v58 = v5;
for ( j = 0; j < v57; v5 = v58 )
{
if ( j < v5 && (v7 = cocos2d::CCArray::objectAtIndex(a1->m_cellArray, j), (v8 = v7) != nullptr) )
{
m_tableDelegate = a1->m_tableDelegate;
if ( m_tableDelegate )
m_tableDelegate->TableViewWillReloadCellForRowAtIndexPath(
m_tableDelegate,
(CCIndexPath *)&v7[7].m_uIndexInArray,
(TableViewCell *)v7,
a1);
v3 = (TableViewCell *)v8;
if ( !j )
v8->__vftable[2].getTag(v8);
}
else
{
v10 = (CCIndexPath *)operator new(0x40u);
v47[1] = (cocos2d::CCSize)v10;
cocos2d::CCObject::CCObject(v10);
v10->__vftable = (CCIndexPath_vtbl *)&CCIndexPath::`vftable';
v10->m_row = j;
v10->m_section = v4;
cocos2d::CCObject::autorelease(v10);
v11 = ((double (__fastcall *)(TableViewDelegate *, CCIndexPath *, TableView *))a1->m_tableDelegate->cellHeightForRowAtIndexPath)(
a1->m_tableDelegate,
v10,
a1);
v12 = *(float *)&v11;
cocos2d::CCPoint::CCPoint(&v45);
if ( v3 )
{
y = v3->getPosition_0(v3)->y;
v15 = (float *)v3->getPosition_0(v3);
cocos2d::CCPoint::CCPoint(&v48, *v15, y - *(float *)&v11);
cocos2d::CCPoint::operator=(&v45, v16);
v13 = v45.y;
}
else
{
v13 = (float)(a1->m_contentLayer->getContentSize(a1->m_contentLayer)->height
- (float)((float)j * *(float *)&v11))
- *(float *)&v11;
v45.y = v13;
}
v17 = nullptr;
if ( v13 < 0.0 && !TableView::isDuplicateIndexPath(a1, v10) )
{
v18 = a1->m_contentLayer->getContentSize(a1->m_contentLayer);
cocos2d::CCSize::CCSize(v47, v18);
v19 = a1->m_contentLayer->CCScrollLayerExt::__vftable;
cocos2d::CCSize::CCSize(&v49, v47[0].width, v47[0].height - v13);
v19->setContentSize(a1->m_contentLayer, v20);
for ( k = cocos2d::CCArray::count(a1->m_cellArray) - 1; k >= 0; --k )
{
v22 = cocos2d::CCArray::objectAtIndex(a1->m_cellArray, k);
cocos2d::CCPoint::CCPoint(&v46);
if ( k == cocos2d::CCArray::count(a1->m_cellArray) - 1 )
{
v23 = (float *)((__int64 (__fastcall *)(struct cocos2d::CCObject *))v22->__vftable[2].getTag)(v22);
cocos2d::CCPoint::CCPoint(&v50, *v23, (float)(0.0 - v13) + 1.0);
cocos2d::CCPoint::operator=(&v46, v24);
v25 = v46.y - v12;
v26 = (float *)((__int64 (__fastcall *)(struct cocos2d::CCObject *))v22->__vftable[2].getTag)(v22);
cocos2d::CCPoint::CCPoint(&v51, *v26, v25);
v28 = &v45;
}
else
{
v29 = ((__int64 (__fastcall *)(struct cocos2d::CCObject *))v17->__vftable[4].isEqual)(v17);
v30 = ((__int64 (__fastcall *)(struct cocos2d::CCObject *))v17->__vftable[2].getTag)(v17);
v31 = *(float *)(v29 + 4);
v32 = *(float *)(v30 + 4);
v33 = (float *)((__int64 (__fastcall *)(struct cocos2d::CCObject *))v22->__vftable[2].getTag)(v22);
cocos2d::CCPoint::CCPoint(&v52, *v33, v32 + v31);
v28 = &v46;
}
cocos2d::CCPoint::operator=(v28, v27);
v22->__vftable[2].encodeWithCoder(v22, (DS_Dictionary *)&v46);
v17 = v22;
}
}
v34 = a1->m_dataSource->cellForRowAtIndexPath(a1->m_dataSource, v10, a1);
v35 = v34;
if ( v34 )
{
v36 = v34->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(&v53, 0.0, 1.0);
v36->setAnchorPoint(v35, v37);
v38 = v35->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v39 = a1->getContentSize(a1);
cocos2d::CCSize::CCSize(&v54, v39->width, v12);
v38->setContentSize(v35, v40);
v41 = v35->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(&v55, 0.0, v45.y);
v41->setPosition_0(v35, v42);
cocos2d::CCObject::operator=(&v35->m_indexPath, v10);
v35->m_indexPath.m_row = v10->m_row;
v35->m_indexPath.m_section = v10->m_section;
cocos2d::CCArray::addObject(a1->m_cellArray, v35);
cocos2d::CCArray::addObject(a1->m_indexPathArray, v10);
v43 = a1->m_tableDelegate;
if ( v43 )
v43->TableViewWillDisplayCellForRowAtIndexPath(v43, v10, v35, a1);
a1->m_contentLayer->addChild_1(a1->m_contentLayer, v35);
v44 = a1->m_tableDelegate;
if ( v44 )
v44->TableViewDidDisplayCellForRowAtIndexPath(v44, v10, v35, a1);
v3 = v35;
}
v4 = i;
}
++j;
}
++v4;
}
}
}
}