//
// SmartTemplateCell::onClick from 0x1400beac0 to 0x1400beb8f (207 bytes)
//
// 3 xrefs:
// > SmartTemplateCell::loadFromObject @ 0x1400be7e5
// > SmartTemplateCell::loadFromObject @ 0x1400be885
// > ??> @ 0x1406c7e9c
//
// 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 SmartTemplateCell::onClick(SmartTemplateCell *a1, cocos2d::CCObject *a2)
{
int v3; // eax
TableViewCellDelegate *m_cellDelegate; // rcx
__int64 v5; // r9
__int64 v6; // rcx
void *v7; // [rsp+48h] [rbp+10h]
if ( a2 )
{
v3 = a2->getTag(a2);
if ( v3 )
{
if ( v3 == 1 )
{
m_cellDelegate = a1->m_tableView->m_cellDelegate;
if ( m_cellDelegate )
{
v5 = 6;
LABEL_11:
m_cellDelegate->cellPerformedAction(m_cellDelegate, a1, 22, (CellAction)v5, nullptr);
}
}
}
else if ( a1->m_smartTemplate )
{
v6 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v7 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280(v7);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v6 = qword_1406C2EC0;
}
*(_QWORD *)(v6 + 960) = a1->m_smartTemplate;
m_cellDelegate = a1->m_tableView->m_cellDelegate;
if ( m_cellDelegate )
{
v5 = 1;
goto LABEL_11;
}
}
}
}