//
// cocos2d::cc_utf8_find_last_not_char from 0xb1cddc to 0xb1ce30 (84 bytes)
//
// 2 xrefs:
// > cocos2d::CCLabelBMFont::updateLabel @ 0xae7f98
// > ??> @ 0x51f90
//
// 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
//
unsigned int cocos2d::cc_utf8_find_last_not_char(std::vector *a1, unsigned __int16 a2)
{
unsigned __int16 *m_start; // x4
unsigned int result; // w0
int v4; // w3
unsigned __int16 *v5; // x1
int v6; // t1
m_start = a1->m_start;
result = a1->m_finish - a1->m_start - 1;
if ( (result & 0x80000000) == 0 )
{
v4 = m_start[result];
if ( v4 == a2 )
{
v5 = &m_start[result - 1];
do
{
if ( --result == -1 )
break;
v6 = *v5--;
}
while ( v6 == v4 );
}
}
return result;
}