//
// TableView::deleteTableViewCell from 0x140074a80 to 0x140074d26 (678 bytes)
//
// 2 xrefs:
// > CustomSongCell::onDelete @ 0x1400b4a3c
// > ??> @ 0x1406c63a8
//
// 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=2
void TableView::deleteTableViewCell(TableView *a1, TableViewCell *a2)
{
int height; // esi
unsigned int m_row; // r14d
_BOOL8 v6; // r8
cocos2d::CCArray *m_indexPathArray; // rcx
unsigned int v8; // edi
struct cocos2d::CCObject *v9; // rax
float v10; // xmm6_4
struct cocos2d::CCObject *v11; // rsi
const struct cocos2d::CCPoint *v12; // rax
cocos2d::CCObject_vtbl *v13; // rbx
DS_Dictionary *v14; // rax
int v15; // edi
TableViewDataSource *m_dataSource; // rcx
cocos2d::CCObject v17; // [rsp+20h] [rbp-F8h] BYREF
int v18; // [rsp+58h] [rbp-C0h]
int v19; // [rsp+5Ch] [rbp-BCh]
cocos2d::CCObject v20; // [rsp+60h] [rbp-B8h] BYREF
int v21; // [rsp+98h] [rbp-80h]
int m_section; // [rsp+9Ch] [rbp-7Ch]
cocos2d::CCObject v23; // [rsp+A0h] [rbp-78h] BYREF
int m_uIndexInArray; // [rsp+D8h] [rbp-40h]
int m_uUnknown; // [rsp+DCh] [rbp-3Ch]
cocos2d::CCPoint v26; // [rsp+128h] [rbp+10h] BYREF
cocos2d::CCPoint v27; // [rsp+130h] [rbp+18h] BYREF
if ( a2 )
{
a2->getContentSize(a2);
height = (int)a2->getContentSize(a2)->height;
m_row = a2->m_indexPath.m_row;
cocos2d::CCObject::CCObject(&v20);
v20.__vftable = (cocos2d::CCObject_vtbl *)&CCIndexPath::`vftable';
m_section = a2->m_indexPath.m_section;
v21 = a2->m_indexPath.m_row;
m_indexPathArray = a1->m_indexPathArray;
if ( m_indexPathArray )
{
if ( cocos2d::CCArray::count(m_indexPathArray) )
{
v8 = 0;
if ( cocos2d::CCArray::count(a1->m_indexPathArray) )
{
while ( 1 )
{
v9 = cocos2d::CCArray::objectAtIndex(a1->m_indexPathArray, v8);
if ( HIDWORD(v9[1].__vftable) == a2->m_indexPath.m_section
&& LODWORD(v9[1].__vftable) == a2->m_indexPath.m_row )
{
break;
}
if ( ++v8 >= cocos2d::CCArray::count(a1->m_indexPathArray) )
goto LABEL_10;
}
cocos2d::CCArray::removeObject(a1->m_indexPathArray, v9, 1);
}
}
}
LABEL_10:
LOBYTE(v6) = 1;
a1->m_contentLayer->removeChild(a1->m_contentLayer, a2, v6);
cocos2d::CCArray::removeObject(a1->m_cellArray, a2, 1);
if ( m_row < cocos2d::CCArray::count(a1->m_cellArray) )
{
v10 = (float)height;
do
{
v11 = cocos2d::CCArray::objectAtIndex(a1->m_cellArray, m_row);
v12 = (const struct cocos2d::CCPoint *)((__int64 (__fastcall *)(struct cocos2d::CCObject *))v11->__vftable[2].getTag)(v11);
cocos2d::CCPoint::CCPoint(&v26, v12);
v13 = v11->__vftable;
cocos2d::CCPoint::CCPoint(&v27, v26.x, v10 + v26.y);
v13[2].encodeWithCoder(v11, v14);
cocos2d::CCObject::CCObject(&v23);
v23.__vftable = (cocos2d::CCObject_vtbl *)&CCIndexPath::`vftable';
m_uUnknown = v11[8].m_uUnknown;
v15 = m_uUnknown;
m_uIndexInArray = v11[8].m_uIndexInArray;
LODWORD(v13) = m_uIndexInArray - 1;
cocos2d::CCObject::CCObject(&v17);
v17.__vftable = (cocos2d::CCObject_vtbl *)&CCIndexPath::`vftable';
v18 = (int)v13;
v19 = v15;
cocos2d::CCObject::operator=(&v11[7].m_uIndexInArray, &v17);
v11[8].m_uIndexInArray = v18;
v11[8].m_uUnknown = v19;
cocos2d::CCObject::~CCObject(&v17);
cocos2d::CCObject::~CCObject(&v23);
++m_row;
}
while ( m_row < cocos2d::CCArray::count(a1->m_cellArray) );
}
m_dataSource = a1->m_dataSource;
if ( m_dataSource )
m_dataSource->TableViewCommitCellEditingStyleForRowAtIndexPath(
m_dataSource,
a1,
(TableViewCellEditingStyle)1LL,
(CCIndexPath *)&v20);
cocos2d::CCObject::~CCObject(&v20);
}
}