//
// cocos2d::extension::CCTableView::_indexFromOffset from 0xd193bc to 0xd19494 (216 bytes)
//
// 4 xrefs:
// > cocos2d::extension::CCTableView::scrollViewDidScroll @ 0xd1a768
// > cocos2d::extension::CCTableView::scrollViewDidScroll @ 0xd1a7e4
// > cocos2d::extension::CCTableView::ccTouchBegan @ 0xd1acb4
// > ??> @ 0xd72a8
//
// This function is hookable on this platform (idp: arm, 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 13:07:07 +0000
//
__int64 __fastcall cocos2d::extension::CCTableView::_indexFromOffset(__int64 a1, float *a2)
{
int v4; // w23
__int64 result; // x0
__int64 Container; // x0
float v7; // [xsp+40h] [xbp+40h] BYREF
v4 = (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 640) + 40LL))(*(_QWORD *)(a1 + 640), a1) - 1;
if ( !*(_DWORD *)(a1 + 584) )
{
Container = cocos2d::extension::CCScrollView::getContainer((cocos2d::extension::CCScrollView *)a1);
a2[1] = *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)Container + 328LL))(Container) + 4) - a2[1];
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v7, (const cocos2d::CCPoint *)a2);
result = cocos2d::extension::CCTableView::__indexFromOffset(a1, &v7);
if ( (_DWORD)result != -1 )
{
if ( (int)result < 0 )
LODWORD(result) = 0;
if ( v4 < (int)result )
return 0xFFFFFFFFLL;
else
return (unsigned int)result;
}
return result;
}