//
// cocos2d::CCString::compare from 0x180010220 to 0x180010249 (41 bytes)
//
// 1 xrefs:
// > ??> @ 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::CCString::compare(cocos2d::CCString *this, const char *a2)
{
std::string *p_m_sString; // rax
const char *v3; // rdx
unsigned __int8 v4; // cl
p_m_sString = &this->m_sString;
if ( this->m_sString.m_data.m_capacity > 0xF )
p_m_sString = (std::string *)p_m_sString->m_data.m_bigStorage;
v3 = (const char *)(a2 - (const char *)p_m_sString);
while ( 1 )
{
v4 = p_m_sString->m_data.m_smallStorage._Elems[0];
if ( p_m_sString->m_data.m_smallStorage._Elems[0] != v3[(_QWORD)p_m_sString] )
break;
p_m_sString = (std::string *)((char *)p_m_sString + 1);
if ( !v4 )
return 0;
}
return v4 < (unsigned int)v3[(_QWORD)p_m_sString] ? -1 : 1;
}