{"type": "func", "start": 4299640524, "end": 4299640668, "name": "EditorUI::valueFromXPos", "pseudocode": "// \n// EditorUI::valueFromXPos from 0x100474ecc to 0x100474f5c (144 bytes)\n// \n// 1 xrefs:\n// > EditorUI::updateSlider @ 0x100471ba8\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:05:40 +0000\n// \n\nfloat __fastcall EditorUI::valueFromXPos(__int64 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(*(_QWORD *)(a1 + 1440));\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 **)(_QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 1440) + 3920LL) + 168LL))(*(_QWORD *)(*(_QWORD *)(a1 + 1440) + 3920LL))),\n             0.0),\n           1.0);\n}", "assembly": "; \n; EditorUI::valueFromXPos from 0x100474ecc to 0x100474f5c (144 bytes)\n; \n; 1 xrefs:\n; > EditorUI::updateSlider @ 0x100471ba8\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:05:40 +0000\n; \nSTP             D11, D10, [SP,#-0x10+var_30]!                          ; +0x0, 0x100474ecc\nSTP             D9, D8, [SP,#0x30+var_20]                              ; +0x4, 0x100474ed0\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x100474ed4\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x100474ed8\nADD             X29, SP, #0x30                                         ; +0x10, 0x100474edc\nFMOV            S8, S0                                                 ; +0x14, 0x100474ee0\nMOV             X19, X0                                                ; +0x18, 0x100474ee4\nMOV             W1, #0                                                 ; +0x1c, 0x100474ee8\nBL              EditorUI__getXMin                                      ; +0x20, 0x100474eec\nFMOV            S9, S0                                                 ; +0x24, 0x100474ef0\nLDR             X0, [X19,#0x5A0]                                       ; +0x28, 0x100474ef4\nBL              LevelEditorLayer__getSectionCount                      ; +0x2c, 0x100474ef8\nCMP             W0, #0x64 ; 'd'                                        ; +0x30, 0x100474efc\nMOV             W8, #0x64 ; 'd'                                        ; +0x34, 0x100474f00\nCSEL            W8, W0, W8, GT                                         ; +0x38, 0x100474f04\nUCVTF           S0, W8                                                 ; +0x3c, 0x100474f08\nMOV             W8, #0xC2C80000                                        ; +0x40, 0x100474f0c\nFMOV            S1, W8                                                 ; +0x44, 0x100474f10\nFMUL            S10, S0, S1                                            ; +0x48, 0x100474f14\nLDR             X8, [X19,#0x5A0]                                       ; +0x4c, 0x100474f18\nLDR             X0, [X8,#0xF50]                                        ; +0x50, 0x100474f1c\nLDR             X8, [X0]                                               ; +0x54, 0x100474f20\nLDR             X8, [X8,#0xA8]                                         ; +0x58, 0x100474f24\nBLR             X8                                                     ; +0x5c, 0x100474f28\nFMUL            S0, S10, S0                                            ; +0x60, 0x100474f2c\nFSUB            S1, S8, S9                                             ; +0x64, 0x100474f30\nFDIV            S0, S1, S0                                             ; +0x68, 0x100474f34\nFMOV            S1, WZR                                                ; +0x6c, 0x100474f38\nFMAXNM          S0, S0, S1                                             ; +0x70, 0x100474f3c\nFMOV            S1, #1.0                                               ; +0x74, 0x100474f40\nFMINNM          S0, S0, S1                                             ; +0x78, 0x100474f44\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x7c, 0x100474f48\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x80, 0x100474f4c\nLDP             D9, D8, [SP,#0x30+var_20]                              ; +0x84, 0x100474f50\nLDP             D11, D10, [SP+0x30+var_30],#0x40                       ; +0x88, 0x100474f54\nRET                                                                    ; +0x8c, 0x100474f58", "xrefs": ["EditorUI::updateSlider @ 0x100471ba8"], "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"}