//
// TableView::touchFinish from 0x140088790 to 0x140088a95 (773 bytes)
//
// 7 xrefs:
// > TableView::ccTouchEnded @ 0x140088414
// > TableView::ccTouchCancelled @ 0x140088497
// > ??> @ 0x14088bcac
// > ??> @ 0x14088bcbc
// > ??> @ 0x14088bcec
// > ??> @ 0x140912620
// > ??> @ 0x14091262c
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:25:58 +0000
//
void __fastcall TableView::touchFinish(__int64 a1, __int64 a2)
{
__int64 v4; // rcx
__int64 v5; // rax
__int64 v6; // rax
__int64 v7; // rcx
__int64 v8; // rax
__int64 v9; // rax
cocos2d::CCArray *v10; // rcx
unsigned int v11; // r12d
struct cocos2d::CCObject *v12; // rax
struct cocos2d::CCObject *v13; // r13
float *v14; // rbx
float *v15; // r14
float *v16; // rbp
float *v17; // rsi
__int64 v18; // rax
float v19; // xmm7_4
float v20; // xmm6_4
__int64 v21; // rdi
__int64 v22; // rbx
__int64 v23; // rax
__int64 v24; // rax
__int64 v25; // rcx
_BYTE v26[16]; // [rsp+30h] [rbp-68h] BYREF
char v27; // [rsp+A0h] [rbp+8h] BYREF
char v28; // [rsp+A8h] [rbp+10h] BYREF
char v29; // [rsp+B0h] [rbp+18h] BYREF
cocos2d::CCTouch::getLocationInView(a2, &v28);
v5 = cocos2d::CCDirector::sharedDirector(v4);
v6 = cocos2d::CCDirector::convertToGL(v5, &v27, &v28);
cocos2d::CCPoint::operator=(&v28, v6);
if ( a2 == *(_QWORD *)(a1 + 536) )
{
cocos2d::CCTouch::getLocationInView(a2, &v27);
v8 = cocos2d::CCDirector::sharedDirector(v7);
v9 = cocos2d::CCDirector::convertToGL(v8, &v29, &v27);
cocos2d::CCPoint::operator=(&v27, v9);
v10 = *(cocos2d::CCArray **)(a1 + 584);
if ( v10 && cocos2d::CCArray::count(v10) && (v11 = 0, cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 584))) )
{
while ( 1 )
{
v12 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 584), v11);
v13 = v12;
if ( v12 )
{
cocos2d::CCNode::convertToNodeSpace(v12, &v29, &v27);
v14 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v13 + 320LL))(v13);
v15 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v13 + 296LL))(v13);
v16 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v13 + 320LL))(v13);
v17 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v13 + 200LL))(v13);
v18 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v13 + 320LL))(v13);
v19 = *v14;
v20 = *(float *)(v18 + 4);
v21 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v13 + 200LL))(v13);
v22 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v13 + 320LL))(v13);
v23 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v13 + 296LL))(v13);
cocos2d::CCRect::CCRect(
(cocos2d::CCRect *)v26,
*v17 - (float)(*v15 * *v16),
*(float *)(v21 + 4) - (float)(*(float *)(v22 + 4) * *(float *)(v23 + 4)),
v19,
v20);
cocos2d::CCPoint::operator=(v26, &unk_140909E08);
if ( cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v26, (const struct cocos2d::CCPoint *)&v29) )
break;
}
if ( ++v11 >= cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 584)) )
goto LABEL_8;
}
v25 = *(_QWORD *)(a1 + 608);
*(_QWORD *)(a1 + 568) = v13;
if ( v25 && !*(_BYTE *)(a1 + 449) )
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v25 + 48LL))(v25, (__int64)v13 + 424, a1);
}
else
{
LABEL_8:
*(_QWORD *)(a1 + 568) = 0;
}
}
cocos2d::CCPoint::operator=(a1 + 560, &unk_140909E08);
cocos2d::CCPoint::operator=(a1 + 544, v24);
*(_BYTE *)(a1 + 576) = 0;
}