//
// CCTextInputNode::ccTouchEnded from 0x6c2088 to 0x6c2180 (248 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'CCTextInputNode::ccTouchEnded @ 0x6c2184
// > ??> @ 0x831a0
// > ??> @ 0x141fe10
//
// 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 12:51:19 +0000
//
__int64 __fastcall CCTextInputNode::ccTouchEnded(__int64 a1, cocos2d::CCTouch *a2)
{
int v4; // w21
__int64 v5; // x2
unsigned int v6; // w23
__int64 v7; // x0
__int64 v9; // [xsp+50h] [xbp+50h] BYREF
_BYTE v10[16]; // [xsp+58h] [xbp+58h] BYREF
v4 = *(unsigned __int8 *)(a1 + 697);
CCTextInputNode::disarmHold(a1);
v5 = *(_QWORD *)(a1 + 640);
if ( v5 )
{
v6 = *(unsigned __int8 *)(v5 + 480);
ScrollableContentLayer::handleTouchEnded(*(ScrollableContentLayer **)(a1 + 640), a2);
if ( v6 < (v4 ^ 1u) )
{
v7 = *(_QWORD *)(a1 + 584);
if ( !v7 || (*(unsigned __int8 (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 40LL))(v7, a1) )
{
cocos2d::CCTouch::getLocation(&v9, a2);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v10, (const cocos2d::CCRect *)&unk_155C0E8);
CCTextInputNode::updateCursorPosition(a1, (float *)&v9);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1160LL))(a1, 1);
}
}
}
return _stack_chk_guard;
}