//
// EmoteSprite::fitToHeight from 0x14007f200 to 0x14007f324 (292 bytes)
//
// 23 xrefs:
// > MultilineBitmapFont::initWithFont @ 0x1400794fb
// > EmoteSprite::attachToLabel @ 0x1400803ac
// > ThreadViewPopup::init @ 0x1400d9fab
// > ThreadViewPopup::layoutTitleRow @ 0x1400e31dc
// > NewThreadPopup::init @ 0x1400f0428
// > NewThreadPopup::refreshIconSlot @ 0x1400f0a0d
// > InvitesPopup::buildRows @ 0x1400f8047
// > ThreadDescPopup::buildUI @ 0x1400fd195
// > ThreadDescPopup::refreshIconSlot @ 0x1400fd88d
// > ThreadRequestPopup::init @ 0x1400feeb9
// > EmotePickerPopup::addCell @ 0x140124011
// > GJThreadCell::loadFromThread @ 0x140159ac9
// > GJNotificationCell::loadFromNotification @ 0x14015b85e
// > EditLevelLayer::init @ 0x140178fb9
// > EditorSoundConfigCell::loadFromConfig @ 0x1401909f6
// > EditorSoundConfigInfoLayer::init @ 0x14019295a
// > SoundPackDescPopup::init @ 0x140199a8e
// > SoundPackDescPopup::refreshIconSlot @ 0x140199f66
// > SetTextPopup::init @ 0x1403a7b19
// > ShareCommentLayer::init @ 0x14062f08c
// > ??> @ 0x14088ade4
// > ??> @ 0x14088adf4
// > ??> @ 0x140911ed0
//
// This function is hookable on this platform (idp: pc, 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 11:25:54 +0000
//
__int64 __fastcall EmoteSprite::fitToHeight(_QWORD *a1, float a2, float a3)
{
__int64 result; // rax
float v5; // xmm0_4
__int64 v6; // rax
float v7; // xmm8_4
float v8; // xmm6_4
double v9; // xmm0_8
float v10; // xmm7_4
double v11; // xmm0_8
__int64 v12; // rax
__int64 v13; // rbx
__int64 v14; // rax
char v15; // [rsp+60h] [rbp+8h] BYREF
char v16; // [rsp+78h] [rbp+20h] BYREF
result = (*(__int64 (__fastcall **)(_QWORD *))(*a1 + 320LL))(a1);
v5 = *(float *)(result + 4);
if ( v5 > 0.0 )
{
if ( a3 > 0.0 )
fminf(a2 / v5, (float)(a2 * a3) / *(float *)(*(__int64 (__fastcall **)(_QWORD *))(*a1 + 320LL))(a1));
(*(void (__fastcall **)(_QWORD *))(*a1 + 160LL))(a1);
v6 = a1[75];
v7 = *(float *)(v6 + 16);
if ( *(_BYTE *)(v6 + 40) )
v7 = -v7;
v8 = *(float *)(v6 + 20);
v9 = (*(double (__fastcall **)(_QWORD *))(*a1 + 168LL))(a1);
v10 = *(float *)&v9 * v8;
v11 = (*(double (__fastcall **)(_QWORD *))(*a1 + 168LL))(a1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v16, *(float *)&v11 * v7, v10);
v13 = v12;
v14 = (*(__int64 (__fastcall **)(_QWORD *))(*a1 + 200LL))(a1);
cocos2d::CCPoint::operator+(v14, &v15, v13);
return (*(__int64 (__fastcall **)(_QWORD *, char *))(*a1 + 184LL))(a1, &v15);
}
return result;
}