{"type": "func", "start": 4300064316, "end": 4300064640, "name": "EmoteSprite::fitToHeight", "pseudocode": "// \n// EmoteSprite::fitToHeight from 0x1004dc63c to 0x1004dc780 (324 bytes)\n// \n// 20 xrefs:\n// > EditLevelLayer::init @ 0x10010f5e4\n// > GJThreadCell::loadFromThread @ 0x10012ff70\n// > GJNotificationCell::loadFromNotification @ 0x1001311ec\n// > ShareCommentLayer::init @ 0x10026d2c0\n// > sub_1002D0568 @ 0x1002d0c3c\n// > sub_10037C930 @ 0x10037cfac\n// > EditorSoundConfigCell::loadFromConfig @ 0x1004ce770\n// > sub_1004CF9C0 @ 0x1004d00a0\n// > sub_1004D4894 @ 0x1004d4f10\n// > sub_1004D5188 @ 0x1004d5234\n// > EmotePickerPopup::addCell @ 0x1004db7c4\n// > EmoteSprite::attachToLabel @ 0x1004dd17c\n// > ThreadViewPopup::init @ 0x1004f8948\n// > ThreadViewPopup::layoutTitleRow @ 0x1004f90cc\n// > sub_100508F28 @ 0x10050a028\n// > sub_10050A328 @ 0x10050a3d4\n// > InvitesPopup::buildRows @ 0x10050f1a4\n// > ThreadDescPopup::buildUI @ 0x1005133d8\n// > sub_100513850 @ 0x1005138fc\n// > sub_100514348 @ 0x1005146fc\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 11:06:34 +0000\n// \n\n__int64 __fastcall EmoteSprite::fitToHeight(_QWORD *a1, float a2, float a3)\n{\n  __int64 result; // x0\n  float v7; // s0\n  float v8; // s10\n  float v9; // s8\n  __int64 v10; // x8\n  float v11; // s8\n  float32x2_t *v12; // x20\n  float v13; // s8\n  float v14; // s9\n  float v15; // s0\n  double v16; // d0\n  float32x2_t v17; // [xsp+0h] [xbp-40h] BYREF\n  float32x2_t v18; // [xsp+8h] [xbp-38h] BYREF\n\n  result = (*(__int64 (__fastcall **)(_QWORD *))(*a1 + 328LL))(a1);\n  v7 = *(float *)(result + 4);\n  if ( v7 > 0.0 )\n  {\n    v8 = a2 / v7;\n    if ( a3 > 0.0 )\n    {\n      v9 = a2 * a3;\n      if ( v8 > (float)(v9 / *(float *)(*(__int64 (__fastcall **)(_QWORD *))(*a1 + 328LL))(a1)) )\n        v8 = v9 / *(float *)(*(__int64 (__fastcall **)(_QWORD *))(*a1 + 328LL))(a1);\n    }\n    (*(void (__fastcall **)(_QWORD *, float))(*a1 + 160LL))(a1, v8 * *(float *)(a1[75] + 12LL));\n    v10 = a1[75];\n    if ( *(_BYTE *)(v10 + 40) )\n      v11 = -*(float *)(v10 + 16);\n    else\n      v11 = *(float *)(v10 + 16);\n    v12 = (float32x2_t *)(*(__int64 (__fastcall **)(_QWORD *))(*a1 + 192LL))(a1);\n    v13 = v11 * (*(float (__fastcall **)(_QWORD *))(*a1 + 168LL))(a1);\n    v14 = *(float *)(a1[75] + 20LL);\n    v15 = (*(float (__fastcall **)(_QWORD *))(*a1 + 168LL))(a1);\n    sub_1000262BC((float *)&v17, v13, v14 * v15);\n    *(float32x2_t *)&v16 = sub_100026318(v12, &v17, &v18);\n    return (*(__int64 (__fastcall **)(_QWORD *, float32x2_t *, double))(*a1 + 184LL))(a1, &v18, v16);\n  }\n  return result;\n}", "assembly": "; \n; EmoteSprite::fitToHeight from 0x1004dc63c to 0x1004dc780 (324 bytes)\n; \n; 20 xrefs:\n; > EditLevelLayer::init @ 0x10010f5e4\n; > GJThreadCell::loadFromThread @ 0x10012ff70\n; > GJNotificationCell::loadFromNotification @ 0x1001311ec\n; > ShareCommentLayer::init @ 0x10026d2c0\n; > sub_1002D0568 @ 0x1002d0c3c\n; > sub_10037C930 @ 0x10037cfac\n; > EditorSoundConfigCell::loadFromConfig @ 0x1004ce770\n; > sub_1004CF9C0 @ 0x1004d00a0\n; > sub_1004D4894 @ 0x1004d4f10\n; > sub_1004D5188 @ 0x1004d5234\n; > EmotePickerPopup::addCell @ 0x1004db7c4\n; > EmoteSprite::attachToLabel @ 0x1004dd17c\n; > ThreadViewPopup::init @ 0x1004f8948\n; > ThreadViewPopup::layoutTitleRow @ 0x1004f90cc\n; > sub_100508F28 @ 0x10050a028\n; > sub_10050A328 @ 0x10050a3d4\n; > InvitesPopup::buildRows @ 0x10050f1a4\n; > ThreadDescPopup::buildUI @ 0x1005133d8\n; > sub_100513850 @ 0x1005138fc\n; > sub_100514348 @ 0x1005146fc\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 11:06:34 +0000\n; \nSUB             SP, SP, #0x50                                          ; +0x0, 0x1004dc63c\nSTP             D11, D10, [SP,#0x40+var_30]                            ; +0x4, 0x1004dc640\nSTP             D9, D8, [SP,#0x40+var_20]                              ; +0x8, 0x1004dc644\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0xc, 0x1004dc648\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0x10, 0x1004dc64c\nADD             X29, SP, #0x40                                         ; +0x14, 0x1004dc650\nFMOV            S8, S1                                                 ; +0x18, 0x1004dc654\nFMOV            S9, S0                                                 ; +0x1c, 0x1004dc658\nMOV             X19, X0                                                ; +0x20, 0x1004dc65c\nLDR             X8, [X0]                                               ; +0x24, 0x1004dc660\nLDR             X8, [X8,#0x148]                                        ; +0x28, 0x1004dc664\nBLR             X8                                                     ; +0x2c, 0x1004dc668\nLDR             S0, [X0,#4]                                            ; +0x30, 0x1004dc66c\nFCMP            S0, #0.0                                               ; +0x34, 0x1004dc670\nB.LS            loc_1004DC768                                          ; +0x38, 0x1004dc674\nFCMP            S8, #0.0                                               ; +0x3c, 0x1004dc678\nFDIV            S10, S9, S0                                            ; +0x40, 0x1004dc67c\nB.LE            loc_1004DC6C0                                          ; +0x44, 0x1004dc680\nFMUL            S8, S9, S8                                             ; +0x48, 0x1004dc684\nLDR             X8, [X19]                                              ; +0x4c, 0x1004dc688\nLDR             X8, [X8,#0x148]                                        ; +0x50, 0x1004dc68c\nMOV             X0, X19                                                ; +0x54, 0x1004dc690\nBLR             X8                                                     ; +0x58, 0x1004dc694\nLDR             S0, [X0]                                               ; +0x5c, 0x1004dc698\nFDIV            S0, S8, S0                                             ; +0x60, 0x1004dc69c\nFCMP            S10, S0                                                ; +0x64, 0x1004dc6a0\nB.LE            loc_1004DC6C0                                          ; +0x68, 0x1004dc6a4\nLDR             X8, [X19]                                              ; +0x6c, 0x1004dc6a8\nLDR             X8, [X8,#0x148]                                        ; +0x70, 0x1004dc6ac\nMOV             X0, X19                                                ; +0x74, 0x1004dc6b0\nBLR             X8                                                     ; +0x78, 0x1004dc6b4\nLDR             S0, [X0]                                               ; +0x7c, 0x1004dc6b8\nFDIV            S10, S8, S0                                            ; +0x80, 0x1004dc6bc\nLDR             X8, [X19,#0x258]                                       ; +0x84, 0x1004dc6c0\nLDR             S0, [X8,#0xC]                                          ; +0x88, 0x1004dc6c4\nFMUL            S0, S10, S0                                            ; +0x8c, 0x1004dc6c8\nLDR             X8, [X19]                                              ; +0x90, 0x1004dc6cc\nLDR             X8, [X8,#0xA0]                                         ; +0x94, 0x1004dc6d0\nMOV             X0, X19                                                ; +0x98, 0x1004dc6d4\nBLR             X8                                                     ; +0x9c, 0x1004dc6d8\nLDR             X8, [X19,#0x258]                                       ; +0xa0, 0x1004dc6dc\nLDRB            W9, [X8,#0x28]                                         ; +0xa4, 0x1004dc6e0\nLDR             S0, [X8,#0x10]                                         ; +0xa8, 0x1004dc6e4\nFNEG            S1, S0                                                 ; +0xac, 0x1004dc6e8\nCMP             W9, #0                                                 ; +0xb0, 0x1004dc6ec\nFCSEL           S8, S1, S0, NE                                         ; +0xb4, 0x1004dc6f0\nLDR             X8, [X19]                                              ; +0xb8, 0x1004dc6f4\nLDR             X8, [X8,#0xC0]                                         ; +0xbc, 0x1004dc6f8\nMOV             X0, X19                                                ; +0xc0, 0x1004dc6fc\nBLR             X8                                                     ; +0xc4, 0x1004dc700\nMOV             X20, X0                                                ; +0xc8, 0x1004dc704\nLDR             X8, [X19]                                              ; +0xcc, 0x1004dc708\nLDR             X8, [X8,#0xA8]                                         ; +0xd0, 0x1004dc70c\nMOV             X0, X19                                                ; +0xd4, 0x1004dc710\nBLR             X8                                                     ; +0xd8, 0x1004dc714\nFMUL            S8, S8, S0                                             ; +0xdc, 0x1004dc718\nLDR             X8, [X19,#0x258]                                       ; +0xe0, 0x1004dc71c\nLDR             S9, [X8,#0x14]                                         ; +0xe4, 0x1004dc720\nLDR             X8, [X19]                                              ; +0xe8, 0x1004dc724\nLDR             X8, [X8,#0xA8]                                         ; +0xec, 0x1004dc728\nMOV             X0, X19                                                ; +0xf0, 0x1004dc72c\nBLR             X8                                                     ; +0xf4, 0x1004dc730\nFMUL            S1, S9, S0                                             ; +0xf8, 0x1004dc734\nMOV             X0, SP                                                 ; +0xfc, 0x1004dc738\nFMOV            S0, S8                                                 ; +0x100, 0x1004dc73c\nBL              sub_1000262BC                                          ; +0x104, 0x1004dc740\nADD             X8, SP, #0x40+var_38                                   ; +0x108, 0x1004dc744\nMOV             X1, SP                                                 ; +0x10c, 0x1004dc748\nMOV             X0, X20                                                ; +0x110, 0x1004dc74c\nBL              sub_100026318                                          ; +0x114, 0x1004dc750\nLDR             X8, [X19]                                              ; +0x118, 0x1004dc754\nLDR             X8, [X8,#0xB8]                                         ; +0x11c, 0x1004dc758\nADD             X1, SP, #0x40+var_38                                   ; +0x120, 0x1004dc75c\nMOV             X0, X19                                                ; +0x124, 0x1004dc760\nBLR             X8                                                     ; +0x128, 0x1004dc764\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0x12c, 0x1004dc768\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0x130, 0x1004dc76c\nLDP             D9, D8, [SP,#0x40+var_20]                              ; +0x134, 0x1004dc770\nLDP             D11, D10, [SP,#0x40+var_30]                            ; +0x138, 0x1004dc774\nADD             SP, SP, #0x50 ; 'P'                                    ; +0x13c, 0x1004dc778\nRET                                                                    ; +0x140, 0x1004dc77c", "xrefs": ["EditLevelLayer::init @ 0x10010f5e4", "GJThreadCell::loadFromThread @ 0x10012ff70", "GJNotificationCell::loadFromNotification @ 0x1001311ec", "ShareCommentLayer::init @ 0x10026d2c0", "sub_1002D0568 @ 0x1002d0c3c", "sub_10037C930 @ 0x10037cfac", "EditorSoundConfigCell::loadFromConfig @ 0x1004ce770", "sub_1004CF9C0 @ 0x1004d00a0", "sub_1004D4894 @ 0x1004d4f10", "sub_1004D5188 @ 0x1004d5234", "EmotePickerPopup::addCell @ 0x1004db7c4", "EmoteSprite::attachToLabel @ 0x1004dd17c", "ThreadViewPopup::init @ 0x1004f8948", "ThreadViewPopup::layoutTitleRow @ 0x1004f90cc", "sub_100508F28 @ 0x10050a028", "sub_10050A328 @ 0x10050a3d4", "InvitesPopup::buildRows @ 0x10050f1a4", "ThreadDescPopup::buildUI @ 0x1005133d8", "sub_100513850 @ 0x1005138fc", "sub_100514348 @ 0x1005146fc"], "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"}