{"type": "func", "start": 7204564, "end": 7204948, "name": "EmoteSprite::fitToHeight", "pseudocode": "// \n// EmoteSprite::fitToHeight from 0x6deed4 to 0x6df054 (384 bytes)\n// \n// 21 xrefs:\n// > MultilineBitmapFont::initWithFont @ 0x6ac834\n// > EmoteSprite::attachToLabel @ 0x6e18ac\n// > GJThreadCell::loadFromThread @ 0x73e458\n// > GJNotificationCell::loadFromNotification @ 0x74a4f8\n// > EditLevelLayer::init @ 0x7f0934\n// > ShareCommentLayer::init @ 0x90f49c\n// > SetTextPopup::init @ 0xa30038\n// > ThreadViewPopup::layoutTitleRow @ 0xc6d78c\n// > NewThreadPopup::refreshIconSlot @ 0xc6df90\n// > ThreadDescPopup::refreshIconSlot @ 0xc6e40c\n// > ThreadDescPopup::buildUI @ 0xc7a358\n// > NewThreadPopup::init @ 0xc7e4b0\n// > ThreadRequestPopup::init @ 0xc80a20\n// > InvitesPopup::buildRows @ 0xc818b4\n// > ThreadViewPopup::init @ 0xc87380\n// > EmotePickerPopup::addCell @ 0xcb91a8\n// > EditorSoundConfigCell::loadFromConfig @ 0xccb248\n// > SoundPackDescPopup::refreshIconSlot @ 0xcce898\n// > SoundPackDescPopup::init @ 0xcd0234\n// > EditorSoundConfigInfoLayer::init @ 0xcd0f7c\n// > <???> @ 0xb0728\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:51:36 +0000\n// \n\n__int64 __fastcall EmoteSprite::fitToHeight(EmoteSprite *this, float a2, long double a3)\n{\n  float v4; // s2\n  long double v5; // q1\n  float v6; // s8\n  __int64 v7; // x0\n  float v8; // s8\n  void (__fastcall *v9)(EmoteSprite *, __int64 *); // x23\n  __int64 v10; // x24\n  float v11; // s8\n  float v12; // s9\n  float v13; // s0\n  _BYTE v17[8]; // [xsp+78h] [xbp+78h] BYREF\n  __int64 v18; // [xsp+80h] [xbp+80h] BYREF\n\n  v4 = *(float *)((*(__int64 (__fastcall **)(EmoteSprite *))(*(_QWORD *)this + 328LL))(this) + 4);\n  if ( v4 > 0.0 )\n  {\n    v5 = a3;\n    v6 = a2 / v4;\n    if ( *(float *)&a3 > 0.0\n      && v6 > (float)((float)(a2 * *(float *)&a3)\n                    / *(float *)(*(__int64 (__fastcall **)(EmoteSprite *))(*(_QWORD *)this + 328LL))(this)) )\n    {\n      v6 = (float)(a2 * *(float *)&a3)\n         / *(float *)(*(__int64 (__fastcall **)(EmoteSprite *))(*(_QWORD *)this + 328LL))(this);\n    }\n    (*(void (__fastcall **)(EmoteSprite *, float, long double))(*(_QWORD *)this + 160LL))(\n      this,\n      v6 * *(float *)(*((_QWORD *)this + 75) + 12LL),\n      v5);\n    v7 = *((_QWORD *)this + 75);\n    v8 = *(float *)(v7 + 16);\n    if ( *(_BYTE *)(v7 + 40) )\n      v8 = -v8;\n    v9 = *(void (__fastcall **)(EmoteSprite *, __int64 *))(*(_QWORD *)this + 184LL);\n    v10 = (*(__int64 (__fastcall **)(EmoteSprite *))(*(_QWORD *)this + 192LL))(this);\n    v11 = v8 * (*(float (__fastcall **)(EmoteSprite *))(*(_QWORD *)this + 168LL))(this);\n    v12 = *(float *)(*((_QWORD *)this + 75) + 20LL);\n    v13 = (*(float (__fastcall **)(EmoteSprite *))(*(_QWORD *)this + 168LL))(this);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, v11, v12 * v13);\n    cocos2d::CCPoint::operator+(&v18, v10);\n    v9(this, &v18);\n  }\n  return _stack_chk_guard;\n}", "assembly": "; \n; EmoteSprite::fitToHeight from 0x6deed4 to 0x6df054 (384 bytes)\n; \n; 21 xrefs:\n; > MultilineBitmapFont::initWithFont @ 0x6ac834\n; > EmoteSprite::attachToLabel @ 0x6e18ac\n; > GJThreadCell::loadFromThread @ 0x73e458\n; > GJNotificationCell::loadFromNotification @ 0x74a4f8\n; > EditLevelLayer::init @ 0x7f0934\n; > ShareCommentLayer::init @ 0x90f49c\n; > SetTextPopup::init @ 0xa30038\n; > ThreadViewPopup::layoutTitleRow @ 0xc6d78c\n; > NewThreadPopup::refreshIconSlot @ 0xc6df90\n; > ThreadDescPopup::refreshIconSlot @ 0xc6e40c\n; > ThreadDescPopup::buildUI @ 0xc7a358\n; > NewThreadPopup::init @ 0xc7e4b0\n; > ThreadRequestPopup::init @ 0xc80a20\n; > InvitesPopup::buildRows @ 0xc818b4\n; > ThreadViewPopup::init @ 0xc87380\n; > EmotePickerPopup::addCell @ 0xcb91a8\n; > EditorSoundConfigCell::loadFromConfig @ 0xccb248\n; > SoundPackDescPopup::refreshIconSlot @ 0xcce898\n; > SoundPackDescPopup::init @ 0xcd0234\n; > EditorSoundConfigInfoLayer::init @ 0xcd0f7c\n; > <???> @ 0xb0728\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:51:36 +0000\n; \nSTP             X29, X30, [SP,#var_90]!                                ; +0x0, 0x6deed4\nMOV             X29, SP                                                ; +0x4, 0x6deed8\nSTP             D8, D9, [SP,#0x90+var_50]                              ; +0x8, 0x6deedc\nSTP             X19, X20, [SP,#0x90+var_80]                            ; +0xc, 0x6deee0\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x6deee4\nMOV             X19, X0                                                ; +0x14, 0x6deee8\nSTP             X21, X22, [SP,#0x90+var_70]                            ; +0x18, 0x6deeec\nSTP             X23, X24, [SP,#0x90+var_60]                            ; +0x1c, 0x6deef0\nLDR             X2, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x6deef4\nLDR             X1, [X0]                                               ; +0x24, 0x6deef8\nSTR             Q0, [X29,#0x90+var_40]                                 ; +0x28, 0x6deefc\nLDR             X2, [X2]                                               ; +0x2c, 0x6def00\nLDR             X1, [X1,#0x148]                                        ; +0x30, 0x6def04\nSTR             X2, [X29,#0x90+var_8]                                  ; +0x34, 0x6def08\nSTR             Q1, [X29,#0x90+var_30]                                 ; +0x38, 0x6def0c\nBLR             X1                                                     ; +0x3c, 0x6def10\nLDR             S2, [X0,#4]                                            ; +0x40, 0x6def14\nFCMPE           S2, #0.0                                               ; +0x44, 0x6def18\nB.LS            loc_6DF000                                             ; +0x48, 0x6def1c\nLDR             Q1, [X29,#0x90+var_30]                                 ; +0x4c, 0x6def20\nLDR             Q0, [X29,#0x90+var_40]                                 ; +0x50, 0x6def24\nFCMPE           S1, #0.0                                               ; +0x54, 0x6def28\nFDIV            S8, S0, S2                                             ; +0x58, 0x6def2c\nB.LE            loc_6DEF58                                             ; +0x5c, 0x6def30\nLDR             X1, [X19]                                              ; +0x60, 0x6def34\nMOV             X0, X19                                                ; +0x64, 0x6def38\nFMUL            S9, S0, S1                                             ; +0x68, 0x6def3c\nLDR             X1, [X1,#0x148]                                        ; +0x6c, 0x6def40\nBLR             X1                                                     ; +0x70, 0x6def44\nLDR             S0, [X0]                                               ; +0x74, 0x6def48\nFDIV            S0, S9, S0                                             ; +0x78, 0x6def4c\nFCMPE           S8, S0                                                 ; +0x7c, 0x6def50\nB.GT            loc_6DF034                                             ; +0x80, 0x6def54\nLDR             X2, [X19,#0x258]                                       ; +0x84, 0x6def58\nMOV             X0, X19                                                ; +0x88, 0x6def5c\nLDR             X1, [X19]                                              ; +0x8c, 0x6def60\nLDR             S0, [X2,#0xC]                                          ; +0x90, 0x6def64\nLDR             X1, [X1,#0xA0]                                         ; +0x94, 0x6def68\nFMUL            S0, S8, S0                                             ; +0x98, 0x6def6c\nBLR             X1                                                     ; +0x9c, 0x6def70\nLDR             X0, [X19,#0x258]                                       ; +0xa0, 0x6def74\nLDRB            W1, [X0,#0x28]                                         ; +0xa4, 0x6def78\nLDR             S8, [X0,#0x10]                                         ; +0xa8, 0x6def7c\nCBNZ            W1, loc_6DF02C                                         ; +0xac, 0x6def80\nLDR             X1, [X19]                                              ; +0xb0, 0x6def84\nMOV             X0, X19                                                ; +0xb4, 0x6def88\nADD             X22, X29, #0x90+var_18                                 ; +0xb8, 0x6def8c\nADD             X21, X29, #0x90+var_10                                 ; +0xbc, 0x6def90\nLDR             X2, [X1,#0xC0]                                         ; +0xc0, 0x6def94\nLDR             X23, [X1,#0xB8]                                        ; +0xc4, 0x6def98\nBLR             X2                                                     ; +0xc8, 0x6def9c\nMOV             X24, X0                                                ; +0xcc, 0x6defa0\nLDR             X1, [X19]                                              ; +0xd0, 0x6defa4\nMOV             X0, X19                                                ; +0xd4, 0x6defa8\nLDR             X1, [X1,#0xA8]                                         ; +0xd8, 0x6defac\nBLR             X1                                                     ; +0xdc, 0x6defb0\nLDR             X2, [X19,#0x258]                                       ; +0xe0, 0x6defb4\nMOV             X0, X19                                                ; +0xe4, 0x6defb8\nLDR             X1, [X19]                                              ; +0xe8, 0x6defbc\nFMUL            S8, S8, S0                                             ; +0xec, 0x6defc0\nLDR             S9, [X2,#0x14]                                         ; +0xf0, 0x6defc4\nLDR             X1, [X1,#0xA8]                                         ; +0xf4, 0x6defc8\nBLR             X1                                                     ; +0xf8, 0x6defcc\nSTR             X22, [X29,#0x90+var_30]                                ; +0xfc, 0x6defd0\nFMUL            S1, S9, S0; float                                      ; +0x100, 0x6defd4\nMOV             X0, X22; this                                          ; +0x104, 0x6defd8\nFMOV            S0, S8; float                                          ; +0x108, 0x6defdc\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x10c, 0x6defe0\nLDR             X1, [X29,#0x90+var_30]                                 ; +0x110, 0x6defe4\nMOV             X0, X24                                                ; +0x114, 0x6defe8\nMOV             X8, X21                                                ; +0x118, 0x6defec\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x11c, 0x6deff0\nMOV             X0, X19                                                ; +0x120, 0x6deff4\nMOV             X1, X21                                                ; +0x124, 0x6deff8\nBLR             X23                                                    ; +0x128, 0x6deffc\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x12c, 0x6df000\nLDR             X1, [X29,#0x90+var_8]                                  ; +0x130, 0x6df004\nLDR             X0, [X20]                                              ; +0x134, 0x6df008\nCMP             X1, X0                                                 ; +0x138, 0x6df00c\nB.NE            loc_6DF050                                             ; +0x13c, 0x6df010\nLDP             X19, X20, [SP,#0x90+var_80]                            ; +0x140, 0x6df014\nLDP             D8, D9, [SP,#0x90+var_50]                              ; +0x144, 0x6df018\nLDP             X21, X22, [SP,#0x90+var_70]                            ; +0x148, 0x6df01c\nLDP             X23, X24, [SP,#0x90+var_60]                            ; +0x14c, 0x6df020\nLDP             X29, X30, [SP+0x90+var_90],#0x90                       ; +0x150, 0x6df024\nRET                                                                    ; +0x154, 0x6df028\nFNEG            S8, S8                                                 ; +0x158, 0x6df02c\nB               loc_6DEF84                                             ; +0x15c, 0x6df030\nLDR             X1, [X19]                                              ; +0x160, 0x6df034\nMOV             X0, X19                                                ; +0x164, 0x6df038\nLDR             X1, [X1,#0x148]                                        ; +0x168, 0x6df03c\nBLR             X1                                                     ; +0x16c, 0x6df040\nLDR             S8, [X0]                                               ; +0x170, 0x6df044\nFDIV            S8, S9, S8                                             ; +0x174, 0x6df048\nB               loc_6DEF58                                             ; +0x178, 0x6df04c\nBL              .__stack_chk_fail                                      ; +0x17c, 0x6df050", "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"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}