{"type": "func", "start": 4299970732, "end": 4299971092, "name": "EditorCommandsPopup::layoutCommandButtons", "pseudocode": "// \n// EditorCommandsPopup::layoutCommandButtons from 0x1004c58ac to 0x1004c5a14 (360 bytes)\n// \n// 2 xrefs:\n// > EditorCommandsPopup::onBuildWindowContent @ 0x1004c57fc\n// > EditorCommandsPopup::onWindowResized @ 0x1004c5bfc\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:22 +0000\n// \n\n__int64 __fastcall EditorCommandsPopup::layoutCommandButtons(__int64 a1)\n{\n  __int64 result; // x0\n  float v3; // s8\n  __int64 v4; // x20\n  float v5; // s10\n  float v6; // s9\n  float v7; // s11\n  int v8; // w21\n  __n128 v9; // q0\n  unsigned int i; // w22\n  __int64 v11; // x0\n  float *v12; // x23\n  float v13; // s1\n  float v14; // [xsp+8h] [xbp-78h] BYREF\n\n  result = *(_QWORD *)(a1 + 1048);\n  if ( result && *(_QWORD *)(a1 + 1040) )\n  {\n    v3 = (float)(*(float *)(a1 + 1056) / 160.0) >= 0.6 ? *(float *)(a1 + 1056) / 160.0 : 0.6;\n    result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)result + 488LL))(result);\n    if ( result )\n    {\n      v4 = result;\n      v5 = v3 * 16.0;\n      v6 = v3 * 5.0;\n      v7 = v3 * 8.0;\n      v8 = sub_1002E757C(result);\n      if ( v8 >= 1 )\n      {\n        for ( i = 0; i != v8; ++i )\n        {\n          v11 = sub_1002E75A0(v4, i);\n          if ( v11 )\n          {\n            v12 = (float *)v11;\n            (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v11 + 160LL))(v11, v3);\n            v12[101] = v3;\n            sub_1000262BC(\n              &v14,\n              *(float *)(a1 + 1056) * 0.5,\n              (float)((float)(v5 * -0.5) - v7) - (float)((float)i * (float)(v5 + v6)));\n            (*(void (__fastcall **)(float *, float *))(*(_QWORD *)v12 + 184LL))(v12, &v14);\n          }\n        }\n      }\n      v13 = v6 * (float)(unsigned int)(v8 - 1);\n      if ( v8 <= 0 )\n        v13 = 0.0;\n      v9.n128_f32[0] = (float)((float)(v5 * (float)v8) + (float)(v7 * 2.0)) + v13;\n      return ScrollableContentLayer::setContentHeight(*(_QWORD *)(a1 + 1040), v9);\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorCommandsPopup::layoutCommandButtons from 0x1004c58ac to 0x1004c5a14 (360 bytes)\n; \n; 2 xrefs:\n; > EditorCommandsPopup::onBuildWindowContent @ 0x1004c57fc\n; > EditorCommandsPopup::onWindowResized @ 0x1004c5bfc\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:22 +0000\n; \nSUB             SP, SP, #0x90                                          ; +0x0, 0x1004c58ac\nSTP             D15, D14, [SP,#0x80+var_70]                            ; +0x4, 0x1004c58b0\nSTP             D13, D12, [SP,#0x80+var_60]                            ; +0x8, 0x1004c58b4\nSTP             D11, D10, [SP,#0x80+var_50]                            ; +0xc, 0x1004c58b8\nSTP             D9, D8, [SP,#0x80+var_40]                              ; +0x10, 0x1004c58bc\nSTP             X24, X23, [SP,#0x80+var_30]                            ; +0x14, 0x1004c58c0\nSTP             X22, X21, [SP,#0x80+var_20]                            ; +0x18, 0x1004c58c4\nSTP             X20, X19, [SP,#0x80+var_10]                            ; +0x1c, 0x1004c58c8\nSTP             X29, X30, [SP,#0x80+var_s0]                            ; +0x20, 0x1004c58cc\nADD             X29, SP, #0x80                                         ; +0x24, 0x1004c58d0\nMOV             X19, X0                                                ; +0x28, 0x1004c58d4\nLDR             X0, [X0,#0x418]                                        ; +0x2c, 0x1004c58d8\nCBZ             X0, loc_1004C59EC                                      ; +0x30, 0x1004c58dc\nLDR             X8, [X19,#0x410]                                       ; +0x34, 0x1004c58e0\nCBZ             X8, loc_1004C59EC                                      ; +0x38, 0x1004c58e4\nLDR             S0, [X19,#0x420]                                       ; +0x3c, 0x1004c58e8\nMOV             W8, #0x43200000                                        ; +0x40, 0x1004c58ec\nFMOV            S1, W8                                                 ; +0x44, 0x1004c58f0\nFDIV            S0, S0, S1                                             ; +0x48, 0x1004c58f4\nADRP            X8, #dword_10075BCDC@PAGE                              ; +0x4c, 0x1004c58f8\nLDR             S1, [X8,#dword_10075BCDC@PAGEOFF]                      ; +0x50, 0x1004c58fc\nFCMP            S0, S1                                                 ; +0x54, 0x1004c5900\nFCSEL           S8, S1, S0, MI                                         ; +0x58, 0x1004c5904\nLDR             X8, [X0]                                               ; +0x5c, 0x1004c5908\nLDR             X8, [X8,#0x1E8]                                        ; +0x60, 0x1004c590c\nBLR             X8                                                     ; +0x64, 0x1004c5910\nCBZ             X0, loc_1004C59EC                                      ; +0x68, 0x1004c5914\nMOV             X20, X0                                                ; +0x6c, 0x1004c5918\nFMOV            S0, #16.0                                              ; +0x70, 0x1004c591c\nFMUL            S10, S8, S0                                            ; +0x74, 0x1004c5920\nFMOV            S0, #5.0                                               ; +0x78, 0x1004c5924\nFMUL            S9, S8, S0                                             ; +0x7c, 0x1004c5928\nFMOV            S0, #8.0                                               ; +0x80, 0x1004c592c\nFMUL            S11, S8, S0                                            ; +0x84, 0x1004c5930\nBL              sub_1002E757C                                          ; +0x88, 0x1004c5934\nMOV             X21, X0                                                ; +0x8c, 0x1004c5938\nSUBS            W24, W0, #1                                            ; +0x90, 0x1004c593c\nB.LT            loc_1004C59BC                                          ; +0x94, 0x1004c5940\nMOV             W22, #0                                                ; +0x98, 0x1004c5944\nFMOV            S0, #-0.5                                              ; +0x9c, 0x1004c5948\nFMUL            S0, S10, S0                                            ; +0xa0, 0x1004c594c\nFSUB            S12, S0, S11                                           ; +0xa4, 0x1004c5950\nFADD            S13, S10, S9                                           ; +0xa8, 0x1004c5954\nFMOV            S14, #0.5                                              ; +0xac, 0x1004c5958\nMOV             X0, X20                                                ; +0xb0, 0x1004c595c\nMOV             X1, X22                                                ; +0xb4, 0x1004c5960\nBL              sub_1002E75A0                                          ; +0xb8, 0x1004c5964\nCBZ             X0, loc_1004C59B0                                      ; +0xbc, 0x1004c5968\nMOV             X23, X0                                                ; +0xc0, 0x1004c596c\nLDR             X8, [X0]                                               ; +0xc4, 0x1004c5970\nLDR             X8, [X8,#0xA0]                                         ; +0xc8, 0x1004c5974\nFMOV            S0, S8                                                 ; +0xcc, 0x1004c5978\nBLR             X8                                                     ; +0xd0, 0x1004c597c\nSTR             S8, [X23,#0x194]                                       ; +0xd4, 0x1004c5980\nLDR             S0, [X19,#0x420]                                       ; +0xd8, 0x1004c5984\nFMUL            S0, S0, S14                                            ; +0xdc, 0x1004c5988\nUCVTF           S1, W22                                                ; +0xe0, 0x1004c598c\nFMSUB           S1, S1, S13, S12                                       ; +0xe4, 0x1004c5990\nADD             X0, SP, #0x80+var_78                                   ; +0xe8, 0x1004c5994\nBL              sub_1000262BC                                          ; +0xec, 0x1004c5998\nLDR             X8, [X23]                                              ; +0xf0, 0x1004c599c\nLDR             X8, [X8,#0xB8]                                         ; +0xf4, 0x1004c59a0\nADD             X1, SP, #0x80+var_78                                   ; +0xf8, 0x1004c59a4\nMOV             X0, X23                                                ; +0xfc, 0x1004c59a8\nBLR             X8                                                     ; +0x100, 0x1004c59ac\nADD             W22, W22, #1                                           ; +0x104, 0x1004c59b0\nCMP             W21, W22                                               ; +0x108, 0x1004c59b4\nB.NE            loc_1004C595C                                          ; +0x10c, 0x1004c59b8\nSCVTF           S0, W21                                                ; +0x110, 0x1004c59bc\nFMUL            S0, S10, S0                                            ; +0x114, 0x1004c59c0\nFMOV            S1, #2.0                                               ; +0x118, 0x1004c59c4\nFMADD           S0, S11, S1, S0                                        ; +0x11c, 0x1004c59c8\nUCVTF           S1, W24                                                ; +0x120, 0x1004c59cc\nFMUL            S1, S9, S1                                             ; +0x124, 0x1004c59d0\nCMP             W21, #0                                                ; +0x128, 0x1004c59d4\nFMOV            S2, WZR                                                ; +0x12c, 0x1004c59d8\nFCSEL           S1, S1, S2, GT                                         ; +0x130, 0x1004c59dc\nFADD            S0, S0, S1                                             ; +0x134, 0x1004c59e0\nLDR             X0, [X19,#0x410]                                       ; +0x138, 0x1004c59e4\nBL              ScrollableContentLayer__setContentHeight               ; +0x13c, 0x1004c59e8\nLDP             X29, X30, [SP,#0x80+var_s0]                            ; +0x140, 0x1004c59ec\nLDP             X20, X19, [SP,#0x80+var_10]                            ; +0x144, 0x1004c59f0\nLDP             X22, X21, [SP,#0x80+var_20]                            ; +0x148, 0x1004c59f4\nLDP             X24, X23, [SP,#0x80+var_30]                            ; +0x14c, 0x1004c59f8\nLDP             D9, D8, [SP,#0x80+var_40]                              ; +0x150, 0x1004c59fc\nLDP             D11, D10, [SP,#0x80+var_50]                            ; +0x154, 0x1004c5a00\nLDP             D13, D12, [SP,#0x80+var_60]                            ; +0x158, 0x1004c5a04\nLDP             D15, D14, [SP,#0x80+var_70]                            ; +0x15c, 0x1004c5a08\nADD             SP, SP, #0x90                                          ; +0x160, 0x1004c5a0c\nRET                                                                    ; +0x164, 0x1004c5a10", "xrefs": ["EditorCommandsPopup::onBuildWindowContent @ 0x1004c57fc", "EditorCommandsPopup::onWindowResized @ 0x1004c5bfc"], "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"}