//
// EmoteSprite::effectiveLength from 0x6e0fb0 to 0x6e10f8 (328 bytes)
//
// 26 xrefs:
// > CommentCell::loadFromComment @ 0x74b228
// > CommentCell::loadFromComment @ 0x74c298
// > EditLevelLayer::textChanged @ 0x7ef704
// > ShareLevelLayer::init @ 0x7f41f8
// > ShareLevelLayer::init @ 0x7f46d4
// > InfoLayer::init @ 0x90c314
// > InfoLayer::init @ 0x90cbc0
// > ShareCommentLayer::updateCharCountLabel @ 0x90e308
// > ShareCommentLayer::onShare @ 0x90e4f8
// > FriendRequestPopup::loadFromGJFriendRequest @ 0xa2ba14
// > FriendRequestPopup::loadFromGJFriendRequest @ 0xa2c00c
// > SetTextPopup::onClose @ 0xa2c9c0
// > ShareListLayer::init @ 0xbad250
// > ShareListLayer::init @ 0xbadb28
// > ThreadViewPopup::updateComposeCount @ 0xc66524
// > NewThreadPopup::textChanged @ 0xc67edc
// > ThreadViewPopup::insertShareToken @ 0xc73d8c
// > NewThreadPopup::insertShareToken @ 0xc7440c
// > ThreadDescPopup::onSave @ 0xc7aa34
// > NewThreadPopup::onSend @ 0xc7b2b0
// > NewThreadPopup::applyMode @ 0xc7d5a0
// > ThreadViewPopup::measureBody @ 0xc851dc
// > ThreadViewPopup::onSend @ 0xc89858
// > EmotePickerPopup::canAddEmote @ 0xcb951c
// > SoundPackDescPopup::onSave @ 0xcce31c
// > ??> @ 0xf3508
//
// 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 12:51:39 +0000
//
__int64 __fastcall EmoteSprite::effectiveLength(char *a1, int a2)
{
unsigned int v3; // w19
__int64 *v4; // x2
__int64 v5; // t1
void *v7; // [xsp+20h] [xbp+20h] BYREF
_BYTE *v8; // [xsp+28h] [xbp+28h]
__int64 v9; // [xsp+30h] [xbp+30h]
v7 = nullptr;
v8 = nullptr;
v9 = 0;
EmoteSprite::parseTokens(a1, &v7, a2);
v3 = EmoteSprite::characterCount((__int64)a1);
if ( 0xAAAAAAAAAAAAAAABLL * ((v8 - (_BYTE *)v7) >> 3) )
{
v4 = (__int64 *)((char *)v7 + 8);
do
{
v5 = *v4;
v4 += 3;
v3 -= v5 - 1;
}
while ( v4 != (__int64 *)(v8 + 8) );
}
if ( v7 )
{
if ( v8 != v7 )
v8 += -24 * ((0xAAAAAAAAAAAAAABLL * ((unsigned __int64)(v8 - 24 - (_BYTE *)v7) >> 3)) & 0x1FFFFFFFFFFFFFFFLL) - 24;
operator delete(v7);
}
return v3;
}