//
// CCTextInputNode::emoteTokenContaining from 0x6b8128 to 0x6b8180 (88 bytes)
//
// 3 xrefs:
// > CCTextInputNode::updateLabel @ 0x6c34c0
// > CCTextInputNode::onTextFieldInsertText @ 0x6c508c
// > ??> @ 0x6f9e8
//
// 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::emoteTokenContaining(CCTextInputNode *this, int a2)
{
unsigned __int64 v2; // x4
_QWORD *result; // x0
__int64 v4; // x3
v2 = 0xAAAAAAAAAAAAAAABLL * ((__int64)(*((_QWORD *)this + 65) - *((_QWORD *)this + 64)) >> 3);
if ( !v2 )
return nullptr;
result = *((_QWORD **)this + 64);
v4 = 0;
while ( 1 )
{
++v4;
if ( a2 > (int)*result && a2 < (int)(result[1] + *result) )
break;
result += 3;
if ( v4 == v2 )
return nullptr;
}
return result;
}