{"type": "func", "start": 6879352, "end": 6879532, "name": "EditorUI::valueFromXPos", "pseudocode": "// \n// EditorUI::valueFromXPos from 0x68f878 to 0x68f92c (180 bytes)\n// \n// 2 xrefs:\n// > EditorUI::updateSlider @ 0x68f960\n// > <???> @ 0x2d1e0\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 EditorUI::valueFromXPos(EditorUI *a1, float a2)\n{\n  float XMin; // s9\n  int SectionCount; // w19\n  float v6; // s0\n  float result; // s0\n\n  XMin = EditorUI::getXMin(a1, 0);\n  SectionCount = LevelEditorLayer::getSectionCount(a1->m_editorLayer);\n  a1->m_editorLayer->m_objectLayer->getScale(a1->m_editorLayer->m_objectLayer);\n  if ( SectionCount < 100 )\n    SectionCount = 100;\n  result = (float)-(float)(a2 - XMin) / (float)((float)((float)SectionCount * 100.0) * v6);\n  if ( result <= 0.0 )\n    return 0.0;\n  if ( result >= 1.0 )\n    return 1.0;\n  return result;\n}", "assembly": "; \n; EditorUI::valueFromXPos from 0x68f878 to 0x68f92c (180 bytes)\n; \n; 2 xrefs:\n; > EditorUI::updateSlider @ 0x68f960\n; > <???> @ 0x2d1e0\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             X29, X30, [SP,#-0x30+var_s0]!                          ; +0x0, 0x68f878\nMOV             W1, #0; int                                            ; +0x4, 0x68f87c\nMOV             X29, SP                                                ; +0x8, 0x68f880\nSTP             D8, D9, [SP,#var_s20]                                  ; +0xc, 0x68f884\nFMOV            S8, S0                                                 ; +0x10, 0x68f888\nSTP             X19, X20, [SP,#var_s10]                                ; +0x14, 0x68f88c\nMOV             X20, X0                                                ; +0x18, 0x68f890\nBL              _ZN8EditorUI7getXMinEi; EditorUI::getXMin(int)         ; +0x1c, 0x68f894\nFMOV            S9, S0                                                 ; +0x20, 0x68f898\nLDR             X0, [X20,#0x4F8]; this                                 ; +0x24, 0x68f89c\nBL              _ZN16LevelEditorLayer15getSectionCountEv; LevelEditorLayer::getSectionCount(void) ; +0x28, 0x68f8a0\nMOV             W19, W0                                                ; +0x2c, 0x68f8a4\nLDR             X0, [X20,#0x4F8]                                       ; +0x30, 0x68f8a8\nLDR             X1, [X0,#0x1030]                                       ; +0x34, 0x68f8ac\nMOV             X0, X1                                                 ; +0x38, 0x68f8b0\nLDR             X1, [X1]                                               ; +0x3c, 0x68f8b4\nLDR             X1, [X1,#0xA8]                                         ; +0x40, 0x68f8b8\nBLR             X1                                                     ; +0x44, 0x68f8bc\nCMP             W19, #0x64 ; 'd'                                       ; +0x48, 0x68f8c0\nMOV             W0, #0x64 ; 'd'                                        ; +0x4c, 0x68f8c4\nCSEL            W19, W19, W0, GE                                       ; +0x50, 0x68f8c8\nLDR             S2, =0x42C80000                                        ; +0x54, 0x68f8cc\nSCVTF           S1, W19                                                ; +0x58, 0x68f8d0\nFSUB            S8, S8, S9                                             ; +0x5c, 0x68f8d4\nFMUL            S1, S1, S2                                             ; +0x60, 0x68f8d8\nFNEG            S8, S8                                                 ; +0x64, 0x68f8dc\nFMUL            S0, S1, S0                                             ; +0x68, 0x68f8e0\nFDIV            S0, S8, S0                                             ; +0x6c, 0x68f8e4\nFCMPE           S0, #0.0                                               ; +0x70, 0x68f8e8\nB.LE            loc_68F910                                             ; +0x74, 0x68f8ec\nFMOV            S1, #1.0                                               ; +0x78, 0x68f8f0\nFCMPE           S0, S1                                                 ; +0x7c, 0x68f8f4\nB.MI            loc_68F900                                             ; +0x80, 0x68f8f8\nFMOV            S0, S1                                                 ; +0x84, 0x68f8fc\nLDP             X19, X20, [SP,#var_s10]                                ; +0x88, 0x68f900\nLDP             D8, D9, [SP,#var_s20]                                  ; +0x8c, 0x68f904\nLDP             X29, X30, [SP+var_s0],#0x30                            ; +0x90, 0x68f908\nRET                                                                    ; +0x94, 0x68f90c\nFCMPE           S0, #0.0                                               ; +0x98, 0x68f910\nB.GT            loc_68F900                                             ; +0x9c, 0x68f914\nFMOV            S0, WZR                                                ; +0xa0, 0x68f918\nLDP             D8, D9, [SP,#var_s20]                                  ; +0xa4, 0x68f91c\nLDP             X19, X20, [SP,#var_s10]                                ; +0xa8, 0x68f920\nLDP             X29, X30, [SP+var_s0],#0x30                            ; +0xac, 0x68f924\nRET                                                                    ; +0xb0, 0x68f928", "xrefs": ["EditorUI::updateSlider @ 0x68f960", "<???> @ 0x2d1e0"], "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"}