//
// cocos2d::extension::CCTableView::_indexFromOffset from 0xaa79fc to 0xaa7ad4 (216 bytes)
//
// 4 xrefs:
// > cocos2d::extension::CCTableView::scrollViewDidScroll @ 0xaa889c
// > cocos2d::extension::CCTableView::scrollViewDidScroll @ 0xaa8918
// > cocos2d::extension::CCTableView::ccTouchBegan @ 0xaa8de0
// > ??> @ 0xa3b00
//
// 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
//
// local variable allocation has failed, the output may be wrong!
unsigned int cocos2d::extension::CCTableView::_indexFromOffset(
cocos2d::extension::CCTableView *a1,
cocos2d::CCPoint a2)
{
const cocos2d::CCPoint *v2; // x1
const cocos2d::CCPoint *v4; // x22
signed int v5; // w23
unsigned int result; // w0
cocos2d::CCNode *Container; // x0
cocos2d::CCPoint v8; // [xsp+40h] [xbp+40h] BYREF
cocos2d::CCPoint v9; // 0:s0.4,4:s1.4
v4 = v2;
v5 = (*(__int64 (__fastcall **)(_QWORD, cocos2d::extension::CCTableView *, long double, long double))(**(_QWORD **)&a1[1].m_fScaleX + 40LL))(
*(_QWORD *)&a1[1].m_fScaleX,
a1,
*(long double *)&a2.x,
*(long double *)&a2.y)
- 1;
if ( !a1[1].m_uID )
{
Container = cocos2d::extension::CCScrollView::getContainer(a1);
v4->y = Container->getContentSize(Container)->height - v4->y;
}
cocos2d::CCPoint::CCPoint(&v8, v4);
result = cocos2d::extension::CCTableView::__indexFromOffset(a1, v9);
if ( result != -1 )
{
if ( (result & 0x80000000) != 0 )
result = 0;
if ( v5 < (int)result )
return -1;
}
return result;
}