//
// cocos2d::extension::CCScrollView::ccTouchEnded from 0xd16a10 to 0xd16ac4 (180 bytes)
//
// 4 xrefs:
// > `non-virtual thunk to'cocos2d::extension::CCScrollView::ccTouchEnded @ 0xd16ac8
// > cocos2d::extension::CCTableView::ccTouchEnded @ 0xd1ab3c
// > ??> @ 0x79ae0
// > ??> @ 0x150eda0
//
// 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:06 +0000
//
__int64 __fastcall cocos2d::extension::CCScrollView::ccTouchEnded(__int64 a1, cocos2d::CCObject *a2)
{
__int64 result; // x0
result = (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)a1 + 352LL))(a1);
if ( (_BYTE)result )
{
if ( (unsigned __int8)cocos2d::CCArray::containsObject(*(cocos2d::CCArray **)(a1 + 496), a2) )
{
if ( (unsigned int)cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 496)) == 1
&& *(_BYTE *)(a1 + 448)
&& !*(_BYTE *)(a1 + 537) )
{
cocos2d::CCNode::schedule(a1, cocos2d::extension::CCScrollView::deaccelerateScrolling, 0);
}
cocos2d::CCArray::removeObject(*(cocos2d::CCArray **)(a1 + 496), a2, 1);
}
result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 496));
if ( !(_DWORD)result )
{
*(_BYTE *)(a1 + 428) = 0;
*(_BYTE *)(a1 + 448) = 0;
}
}
return result;
}