{"type": "func", "start": 8154268, "end": 8154448, "name": "EditorUI::valueFromXPos", "pseudocode": "// \n// EditorUI::valueFromXPos from 0x7c6c9c to 0x7c6d50 (180 bytes)\n// \n// 2 xrefs:\n// > EditorUI::updateSlider @ 0x7c6d84\n// > <???> @ 0x440c8\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:54:09 +0000\n// \n\nfloat __fastcall EditorUI::valueFromXPos(LevelEditorLayer **this, float a2)\n{\n  float XMin; // s9\n  int SectionCount; // w19\n  float v6; // s0\n  float result; // s0\n\n  XMin = EditorUI::getXMin((EditorUI *)this, 0);\n  SectionCount = LevelEditorLayer::getSectionCount(*(this + 180));\n  (*(void (__fastcall **)(_QWORD))(**((_QWORD **)*(this + 180) + 490) + 168LL))(*((_QWORD *)*(this + 180) + 490));\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 0x7c6c9c to 0x7c6d50 (180 bytes)\n; \n; 2 xrefs:\n; > EditorUI::updateSlider @ 0x7c6d84\n; > <???> @ 0x440c8\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:54:09 +0000\n; \nSTP             X29, X30, [SP,#-0x30+var_s0]!                          ; +0x0, 0x7c6c9c\nMOV             W1, #0; int                                            ; +0x4, 0x7c6ca0\nMOV             X29, SP                                                ; +0x8, 0x7c6ca4\nSTP             D8, D9, [SP,#var_s20]                                  ; +0xc, 0x7c6ca8\nFMOV            S8, S0                                                 ; +0x10, 0x7c6cac\nSTP             X19, X20, [SP,#var_s10]                                ; +0x14, 0x7c6cb0\nMOV             X20, X0                                                ; +0x18, 0x7c6cb4\nBL              _ZN8EditorUI7getXMinEi; EditorUI::getXMin(int)         ; +0x1c, 0x7c6cb8\nFMOV            S9, S0                                                 ; +0x20, 0x7c6cbc\nLDR             X0, [X20,#0x5A0]; this                                 ; +0x24, 0x7c6cc0\nBL              _ZN16LevelEditorLayer15getSectionCountEv; LevelEditorLayer::getSectionCount(void) ; +0x28, 0x7c6cc4\nMOV             W19, W0                                                ; +0x2c, 0x7c6cc8\nLDR             X0, [X20,#0x5A0]                                       ; +0x30, 0x7c6ccc\nLDR             X1, [X0,#0xF50]                                        ; +0x34, 0x7c6cd0\nMOV             X0, X1                                                 ; +0x38, 0x7c6cd4\nLDR             X1, [X1]                                               ; +0x3c, 0x7c6cd8\nLDR             X1, [X1,#0xA8]                                         ; +0x40, 0x7c6cdc\nBLR             X1                                                     ; +0x44, 0x7c6ce0\nCMP             W19, #0x64 ; 'd'                                       ; +0x48, 0x7c6ce4\nMOV             W0, #0x64 ; 'd'                                        ; +0x4c, 0x7c6ce8\nCSEL            W19, W19, W0, GE                                       ; +0x50, 0x7c6cec\nLDR             S2, =0x42C80000                                        ; +0x54, 0x7c6cf0\nSCVTF           S1, W19                                                ; +0x58, 0x7c6cf4\nFSUB            S8, S8, S9                                             ; +0x5c, 0x7c6cf8\nFMUL            S1, S1, S2                                             ; +0x60, 0x7c6cfc\nFNEG            S8, S8                                                 ; +0x64, 0x7c6d00\nFMUL            S0, S1, S0                                             ; +0x68, 0x7c6d04\nFDIV            S0, S8, S0                                             ; +0x6c, 0x7c6d08\nFCMPE           S0, #0.0                                               ; +0x70, 0x7c6d0c\nB.LE            loc_7C6D34                                             ; +0x74, 0x7c6d10\nFMOV            S1, #1.0                                               ; +0x78, 0x7c6d14\nFCMPE           S0, S1                                                 ; +0x7c, 0x7c6d18\nB.MI            loc_7C6D24                                             ; +0x80, 0x7c6d1c\nFMOV            S0, S1                                                 ; +0x84, 0x7c6d20\nLDP             X19, X20, [SP,#var_s10]                                ; +0x88, 0x7c6d24\nLDP             D8, D9, [SP,#var_s20]                                  ; +0x8c, 0x7c6d28\nLDP             X29, X30, [SP+var_s0],#0x30                            ; +0x90, 0x7c6d2c\nRET                                                                    ; +0x94, 0x7c6d30\nFCMPE           S0, #0.0                                               ; +0x98, 0x7c6d34\nB.GT            loc_7C6D24                                             ; +0x9c, 0x7c6d38\nFMOV            S0, WZR                                                ; +0xa0, 0x7c6d3c\nLDP             D8, D9, [SP,#var_s20]                                  ; +0xa4, 0x7c6d40\nLDP             X19, X20, [SP,#var_s10]                                ; +0xa8, 0x7c6d44\nLDP             X29, X30, [SP+var_s0],#0x30                            ; +0xac, 0x7c6d48\nRET                                                                    ; +0xb0, 0x7c6d4c", "xrefs": ["EditorUI::updateSlider @ 0x7c6d84", "<???> @ 0x440c8"], "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"}