//
// EmoteSprite::fitToHeight from 0x6deed4 to 0x6df054 (384 bytes)
//
// 21 xrefs:
// > MultilineBitmapFont::initWithFont @ 0x6ac834
// > EmoteSprite::attachToLabel @ 0x6e18ac
// > GJThreadCell::loadFromThread @ 0x73e458
// > GJNotificationCell::loadFromNotification @ 0x74a4f8
// > EditLevelLayer::init @ 0x7f0934
// > ShareCommentLayer::init @ 0x90f49c
// > SetTextPopup::init @ 0xa30038
// > ThreadViewPopup::layoutTitleRow @ 0xc6d78c
// > NewThreadPopup::refreshIconSlot @ 0xc6df90
// > ThreadDescPopup::refreshIconSlot @ 0xc6e40c
// > ThreadDescPopup::buildUI @ 0xc7a358
// > NewThreadPopup::init @ 0xc7e4b0
// > ThreadRequestPopup::init @ 0xc80a20
// > InvitesPopup::buildRows @ 0xc818b4
// > ThreadViewPopup::init @ 0xc87380
// > EmotePickerPopup::addCell @ 0xcb91a8
// > EditorSoundConfigCell::loadFromConfig @ 0xccb248
// > SoundPackDescPopup::refreshIconSlot @ 0xcce898
// > SoundPackDescPopup::init @ 0xcd0234
// > EditorSoundConfigInfoLayer::init @ 0xcd0f7c
// > ??> @ 0xb0728
//
// 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:36 +0000
//
__int64 __fastcall EmoteSprite::fitToHeight(EmoteSprite *this, float a2, long double a3)
{
float v4; // s2
long double v5; // q1
float v6; // s8
__int64 v7; // x0
float v8; // s8
void (__fastcall *v9)(EmoteSprite *, __int64 *); // x23
__int64 v10; // x24
float v11; // s8
float v12; // s9
float v13; // s0
_BYTE v17[8]; // [xsp+78h] [xbp+78h] BYREF
__int64 v18; // [xsp+80h] [xbp+80h] BYREF
v4 = *(float *)((*(__int64 (__fastcall **)(EmoteSprite *))(*(_QWORD *)this + 328LL))(this) + 4);
if ( v4 > 0.0 )
{
v5 = a3;
v6 = a2 / v4;
if ( *(float *)&a3 > 0.0
&& v6 > (float)((float)(a2 * *(float *)&a3)
/ *(float *)(*(__int64 (__fastcall **)(EmoteSprite *))(*(_QWORD *)this + 328LL))(this)) )
{
v6 = (float)(a2 * *(float *)&a3)
/ *(float *)(*(__int64 (__fastcall **)(EmoteSprite *))(*(_QWORD *)this + 328LL))(this);
}
(*(void (__fastcall **)(EmoteSprite *, float, long double))(*(_QWORD *)this + 160LL))(
this,
v6 * *(float *)(*((_QWORD *)this + 75) + 12LL),
v5);
v7 = *((_QWORD *)this + 75);
v8 = *(float *)(v7 + 16);
if ( *(_BYTE *)(v7 + 40) )
v8 = -v8;
v9 = *(void (__fastcall **)(EmoteSprite *, __int64 *))(*(_QWORD *)this + 184LL);
v10 = (*(__int64 (__fastcall **)(EmoteSprite *))(*(_QWORD *)this + 192LL))(this);
v11 = v8 * (*(float (__fastcall **)(EmoteSprite *))(*(_QWORD *)this + 168LL))(this);
v12 = *(float *)(*((_QWORD *)this + 75) + 20LL);
v13 = (*(float (__fastcall **)(EmoteSprite *))(*(_QWORD *)this + 168LL))(this);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, v11, v12 * v13);
cocos2d::CCPoint::operator+(&v18, v10);
v9(this, &v18);
}
return _stack_chk_guard;
}