{"type": "func", "start": 4299060640, "end": 4299060784, "name": "EditorUI::valueFromXPos", "pseudocode": "// \n// EditorUI::valueFromXPos from 0x1003e75a0 to 0x1003e7630 (144 bytes)\n// \n// 1 xrefs:\n// > EditorUI::updateSlider @ 0x1003e45e0\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nfloat __fastcall EditorUI::valueFromXPos(EditorUI *a1, float a2)\n{\n  float XMin; // s9\n  int SectionCount; // w0\n  unsigned int v6; // w8\n\n  XMin = EditorUI::getXMin(a1, 0);\n  SectionCount = LevelEditorLayer::getSectionCount(a1->m_editorLayer);\n  if ( SectionCount <= 100 )\n    v6 = 100;\n  else\n    v6 = SectionCount;\n  return fminf(\n           fmaxf(\n             (float)(a2 - XMin)\n           / (float)((float)((float)v6 * -100.0)\n                   * ((float (__fastcall *)(cocos2d::CCLayer *))a1->m_editorLayer->m_objectLayer->getScale)(a1->m_editorLayer->m_objectLayer)),\n             0.0),\n           1.0);\n}", "assembly": "; \n; EditorUI::valueFromXPos from 0x1003e75a0 to 0x1003e7630 (144 bytes)\n; \n; 1 xrefs:\n; > EditorUI::updateSlider @ 0x1003e45e0\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSTP             D11, D10, [SP,#-0x10+var_30]!                          ; +0x0, 0x1003e75a0\nSTP             D9, D8, [SP,#0x30+var_20]                              ; +0x4, 0x1003e75a4\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x1003e75a8\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x1003e75ac\nADD             X29, SP, #0x30                                         ; +0x10, 0x1003e75b0\nFMOV            S8, S0                                                 ; +0x14, 0x1003e75b4\nMOV             X19, X0                                                ; +0x18, 0x1003e75b8\nMOV             W1, #0                                                 ; +0x1c, 0x1003e75bc\nBL              EditorUI__getXMin                                      ; +0x20, 0x1003e75c0\nFMOV            S9, S0                                                 ; +0x24, 0x1003e75c4\nLDR             X0, [X19,#0x4E8]                                       ; +0x28, 0x1003e75c8\nBL              LevelEditorLayer__getSectionCount                      ; +0x2c, 0x1003e75cc\nCMP             W0, #0x64 ; 'd'                                        ; +0x30, 0x1003e75d0\nMOV             W8, #0x64 ; 'd'                                        ; +0x34, 0x1003e75d4\nCSEL            W8, W0, W8, GT                                         ; +0x38, 0x1003e75d8\nUCVTF           S0, W8                                                 ; +0x3c, 0x1003e75dc\nMOV             W8, #0xC2C80000                                        ; +0x40, 0x1003e75e0\nFMOV            S1, W8                                                 ; +0x44, 0x1003e75e4\nFMUL            S10, S0, S1                                            ; +0x48, 0x1003e75e8\nLDR             X8, [X19,#0x4E8]                                       ; +0x4c, 0x1003e75ec\nLDR             X0, [X8,#0xEE0]                                        ; +0x50, 0x1003e75f0\nLDR             X8, [X0]                                               ; +0x54, 0x1003e75f4\nLDR             X8, [X8,#0xA8]                                         ; +0x58, 0x1003e75f8\nBLR             X8                                                     ; +0x5c, 0x1003e75fc\nFMUL            S0, S10, S0                                            ; +0x60, 0x1003e7600\nFSUB            S1, S8, S9                                             ; +0x64, 0x1003e7604\nFDIV            S0, S1, S0                                             ; +0x68, 0x1003e7608\nFMOV            S1, WZR                                                ; +0x6c, 0x1003e760c\nFMAXNM          S0, S0, S1                                             ; +0x70, 0x1003e7610\nFMOV            S1, #1.0                                               ; +0x74, 0x1003e7614\nFMINNM          S0, S0, S1                                             ; +0x78, 0x1003e7618\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x7c, 0x1003e761c\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x80, 0x1003e7620\nLDP             D9, D8, [SP,#0x30+var_20]                              ; +0x84, 0x1003e7624\nLDP             D11, D10, [SP+0x30+var_30],#0x40                       ; +0x88, 0x1003e7628\nRET                                                                    ; +0x8c, 0x1003e762c", "xrefs": ["EditorUI::updateSlider @ 0x1003e45e0"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}