//
// TableView::cellForTouch from 0x100622030 to 0x100622209 (473 bytes)
//
// 1 xrefs:
// > TableView::touchFinish @ 0x100623678
//
// 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
//
TableViewCell *__fastcall TableView::cellForTouch(TableView *a1, cocos2d::CCTouch *a2)
{
cocos2d::CCDirector *v3; // rax
cocos2d::CCArray *m_cellArray; // rdi
unsigned int v5; // r15d
const cocos2d::CCPoint *v6; // rax
TableViewCell *v7; // r13
float *v8; // rax
__int64 v9; // rax
__int64 v10; // rax
double v11; // xmm1_8
double v12; // xmm0_8
float v14; // [rsp+Ch] [rbp-54h] BYREF
double v15[2]; // [rsp+14h] [rbp-4Ch] BYREF
__int64 v16; // [rsp+24h] [rbp-3Ch] BYREF
float v17; // [rsp+2Ch] [rbp-34h]
float v18; // [rsp+30h] [rbp-30h]
float v19; // [rsp+34h] [rbp-2Ch]
double v20; // 0:xmm0_8.8
cocos2d::CCTouch::getLocationInView((cocos2d::CCTouch *)&v16);
v3 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::convertToGL((cocos2d::CCDirector *)v15, (const cocos2d::CCPoint *)v3);
sub_10028CC90(&v16, v15);
m_cellArray = a1->m_cellArray;
if ( !m_cellArray || !(unsigned int)sub_100720070(m_cellArray) || !(unsigned int)sub_100720070(a1->m_cellArray) )
return nullptr;
v5 = 0;
while ( 1 )
{
v6 = (const cocos2d::CCPoint *)sub_1007200C0(a1->m_cellArray, v5);
if ( v6 )
{
v7 = (TableViewCell *)v6;
*(cocos2d::CCPoint *)&v20 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v14, v6);
v17 = *(float *)((__int64 (__fastcall *)(TableViewCell *, double))v7->getPosition)(v7, v20);
v19 = *(float *)((__int64 (__fastcall *)(TableViewCell *))v7->getContentSize)(v7);
v8 = (float *)((__int64 (__fastcall *)(TableViewCell *))v7->getAnchorPoint)(v7);
v17 = v17 - (float)(v19 * *v8);
v19 = *(float *)(((__int64 (__fastcall *)(TableViewCell *))v7->getPosition)(v7) + 4);
v18 = *(float *)(((__int64 (__fastcall *)(TableViewCell *))v7->getContentSize)(v7) + 4);
v9 = ((__int64 (__fastcall *)(TableViewCell *))v7->getAnchorPoint)(v7);
v19 = v19 - (float)(v18 * *(float *)(v9 + 4));
v18 = *(float *)((__int64 (__fastcall *)(TableViewCell *))v7->getContentSize)(v7);
v10 = ((__int64 (__fastcall *)(TableViewCell *))v7->getContentSize)(v7);
*(_QWORD *)&v11 = LODWORD(v19);
sub_10028CC00((__int64)v15, v17, v19, (__m128)LODWORD(v18), (__m128)*(unsigned int *)(v10 + 4));
v12 = sub_10028CC90(v15, &dbl_1009A3608);
if ( sub_10028D2D0((float *)v15, v12, v11, &v14) )
break;
}
if ( ++v5 >= (unsigned int)sub_100720070(a1->m_cellArray) )
return nullptr;
}
return v7;
}