//
// GJWriteMessagePopup::updateCharCountLabel from 0x1002dd364 to 0x1002dd478 (276 bytes)
//
// 1 xrefs:
// > GJWriteMessagePopup::updateText @ 0x1002dd2f0
//
// 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
//
void __fastcall GJWriteMessagePopup::updateCharCountLabel(GJWriteMessagePopup *a1, int a2)
{
std::size_t size; // x20
unsigned int v3; // w21
__int64 v4; // x8
__int64 v5; // x19
void (__fastcall *v6)(__int64, void *); // x8
void *v7; // x1
cocos2d::CCString *v8; // x0
const char *CString; // x1
if ( a2 )
{
size = a1->m_messageText.m_data.m_short.shortStorage.__elems_[22];
if ( (size & 0x8000000000000000LL) != 0 )
size = a1->m_messageText.m_data.m_long.size;
v3 = 200;
v4 = 744;
}
else
{
size = a1->m_subjectText.m_data.m_short.shortStorage.__elems_[22];
if ( (size & 0x8000000000000000LL) != 0 )
size = a1->m_subjectText.m_data.m_long.size;
v3 = 35;
v4 = 752;
}
v5 = *(__int64 *)((char *)&a1->FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable
+ v4);
if ( (float)((float)v3 * 0.7) <= (float)(int)size )
{
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v5 + 1008LL))(v5, 255);
v6 = *(void (__fastcall **)(__int64, void *))(*(_QWORD *)v5 + 1056LL);
if ( (float)((float)v3 * 0.9) <= (float)(int)size )
{
v7 = &unk_10064474E;
goto LABEL_13;
}
}
else
{
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v5 + 1008LL))(v5, 100);
v6 = *(void (__fastcall **)(__int64, void *))(*(_QWORD *)v5 + 1056LL);
}
v7 = &unk_10064474B;
LABEL_13:
v6(v5, v7);
v8 = (cocos2d::CCString *)sub_100268F4C("%i", v3 - (unsigned int)size);
CString = cocos2d::CCString::getCString(v8);
(*(void (__fastcall **)(__int64, const char *))(*(_QWORD *)v5 + 912LL))(v5, CString);
}