//
// CCTextInputNode::emoteTokenEndingAt from 0x6b8180 to 0x6b81f4 (116 bytes)
//
// 2 xrefs:
// > CCTextInputNode::onTextFieldDeleteBackward @ 0x6c3d84
// > ??> @ 0x7dec0
//
// 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:50:53 +0000
//
_QWORD *__fastcall CCTextInputNode::emoteTokenEndingAt(CCTextInputNode *this, int a2)
{
_QWORD *v2; // x2
unsigned __int64 v3; // x6
__int64 v4; // x4
_QWORD *v5; // x3
_QWORD *result; // x0
v2 = *((_QWORD **)this + 64);
v3 = 0xAAAAAAAAAAAAAAABLL * ((__int64)(*((_QWORD *)this + 65) - (_QWORD)v2) >> 3);
if ( v3 )
{
v4 = 0;
v5 = v2 + 3;
if ( (unsigned int)v2[1] + (unsigned int)*v2 == a2 )
return *((_QWORD **)this + 64);
while ( 1 )
{
++v4;
result = v5;
v5 += 3;
if ( v4 == v3 )
break;
if ( (unsigned int)result[1] + (unsigned int)*result == a2 )
return result;
}
}
return nullptr;
}