//
// cocos2d::cc_utf8_find_last_not_char from 0x1800950d0 to 0x180095103 (51 bytes)
//
// 2 xrefs:
// > cocos2d::CCLabelBMFont::updateLabel @ 0x18004d048
// > ??> @ 0x1801438a8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall cocos2d::cc_utf8_find_last_not_char(__int64 *a1, __int16 a2)
{
__int64 v3; // rdx
__int64 result; // rax
__int64 v5; // rcx
_WORD *v6; // rdx
v3 = *a1;
result = (unsigned int)((a1[1] - *a1) >> 1) - 1;
if ( (int)result >= 0 )
{
v5 = (int)result;
v6 = (_WORD *)(v3 + 2LL * (int)result);
do
{
if ( *v6 != a2 )
break;
result = (unsigned int)(result - 1);
--v6;
--v5;
}
while ( v5 >= 0 );
}
return result;
}