//
// cocos2d::cc_utf8_find_last_not_char from 0x100241e28 to 0x100241e68 (64 bytes)
//
// 1 xrefs:
// > cocos2d::CCLabelBMFont::updateLabel @ 0x1003990bc
//
// 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 11:01:24 +0000
//
unsigned __int64 __fastcall cocos2d::cc_utf8_find_last_not_char(__int64 *a1, int a2)
{
__int64 v2; // x8
unsigned __int64 result; // x0
__int64 v4; // x9
__int64 v5; // x10
bool v6; // vf
int v7; // w11
v2 = *a1;
result = (unsigned __int64)(a1[1] - *a1) >> 1;
v4 = ((unsigned int)result & ((int)result >> 31)) - 1;
v5 = (unsigned int)result - 1LL;
while ( 1 )
{
v6 = __OFSUB__((_DWORD)result, 1);
result = (unsigned int)(result - 1);
if ( ((result & 0x80000000) != 0LL) != v6 )
break;
v7 = *(unsigned __int16 *)(v2 + 2LL * (unsigned int)v5--);
if ( v7 != a2 )
return result;
}
return v4;
}