//
// TableViewCell::TableViewCell from 0x57d0a4 to 0x57d340 (668 bytes)
//
// 23 xrefs:
// > ListCell::ListCell @ 0x56c538
// > GameCell::GameCell @ 0x56c5cc
// > AchievementCell::AchievementCell @ 0x60d69c
// > LevelCell::LevelCell @ 0x60f02c
// > MapPackCell::MapPackCell @ 0x6128e8
// > StatsCell::StatsCell @ 0x613b00
// > SongCell::SongCell @ 0x614efc
// > CustomSongCell::CustomSongCell @ 0x615518
// > CustomSFXCell::CustomSFXCell @ 0x61583c
// > OptionsCell::OptionsCell @ 0x615d80
// > ArtistCell::ArtistCell @ 0x616338
// > CommentCell::CommentCell @ 0x616838
// > GJScoreCell::GJScoreCell @ 0x618ab8
// > GJLocalLevelScoreCell::GJLocalLevelScoreCell @ 0x61a3ec
// > GJLevelScoreCell::GJLevelScoreCell @ 0x61a978
// > GJUserCell::GJUserCell @ 0x61b640
// > GJRequestCell::GJRequestCell @ 0x61c0a0
// > GJMessageCell::GJMessageCell @ 0x61cd04
// > SmartTemplateCell::SmartTemplateCell @ 0x61db04
// > LevelListCell::LevelListCell @ 0x61e3e4
// > URLCell::URLCell @ 0x61fb94
// > ??> @ 0x678f0
// > ??> @ 0xa4310
//
// 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
//
// Alternative name is '_ZN13TableViewCellC1EPKcff'
TableViewCell *TableViewCell::TableViewCell(TableViewCell *a1, const char *a2, float a3, float a4)
{
CCIndexPath *p_m_indexPath; // x22
cocos2d::CCLayerColor *v9; // x0
cocos2d::CCLayer *v10; // x0
void *v11; // x0
unsigned int *v13; // x19
int v14; // w1
__int64 v15; // [xsp+70h] [xbp+70h] BYREF
p_m_indexPath = &a1->m_indexPath;
cocos2d::CCLayer::CCLayer(a1);
a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (TableViewCell_vtbl *)&off_113B0E0;
a1->cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)off_113B560;
a1->cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&off_113B5D0;
a1->cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)off_113B5E8;
a1->cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&off_113B608;
a1->cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)off_113B628;
cocos2d::CCObject::CCObject(p_m_indexPath);
LOBYTE(v15) = 0;
a1->m_indexPath.__vftable = (CCIndexPath_vtbl *)&off_113AA70;
p_m_indexPath->m_row = 0;
p_m_indexPath->m_section = 0;
*(_WORD *)((char *)&v15 + 1) = 0;
a1->m_cellIdentifier.m_data.m_data = (stl::StringData::Internal *)&byte_124B6C8;
a1->m_width = a3;
BYTE3(v15) = 0;
a1->m_height = a4;
v9 = (cocos2d::CCLayerColor *)cocos2d::CCLayerColor::create(
(cocos2d::CCLayerColor *)&v15,
(const cocos2d::_ccColor4B *)&byte_124B6C8,
a3,
a4);
a1->m_backgroundLayer = v9;
cocos2d::CCNode::addChild(a1, v9, -1);
v10 = cocos2d::CCLayer::create();
a1->m_mainLayer = v10;
cocos2d::CCNode::addChild(a1, v10);
sub_D153B8((int)&v15, (char *)a2);
sub_D18EA8(&a1->m_cellIdentifier, &v15);
LOBYTE(a1->m_unknown2) = 0;
a1->m_tableView = nullptr;
v11 = (void *)(v15 - 24);
if ( (__int64 *)(v15 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v13 = (unsigned int *)(v15 - 8);
do
v14 = __ldaxr(v13);
while ( __stlxr(v14 - 1, v13) );
}
else
{
v14 = *(_DWORD *)(v15 - 8);
*(_DWORD *)(v15 - 8) = v14 - 1;
}
if ( v14 <= 0 )
operator delete(v11);
}
return (TableViewCell *)_stack_chk_guard;
}