{"type": "func", "start": 4737520, "end": 4737654, "name": "EditorUI::valueFromXPos", "pseudocode": "// \n// EditorUI::valueFromXPos from 0x4849f0 to 0x484a76 (134 bytes)\n// \n// 1 xrefs:\n// > EditorUI::updateSlider @ 0x484a98\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:49:24 +0000\n// \n\nint __fastcall EditorUI::valueFromXPos(LevelEditorLayer **this, float a2)\n{\n  float XMin; // s17\n  int SectionCount; // r4\n  float v6; // r0\n  float v7; // s15\n\n  XMin = EditorUI::getXMin((EditorUI *)this, 0);\n  SectionCount = LevelEditorLayer::getSectionCount(*(this + 236));\n  v6 = COERCE_FLOAT((*(int (__fastcall **)(_DWORD))(**((_DWORD **)*(this + 236) + 609) + 84))(*((_DWORD *)*(this + 236)\n                                                                                              + 609)));\n  if ( SectionCount < 100 )\n    SectionCount = 100;\n  v7 = (float)-(float)(a2 - XMin) / (float)((float)((float)SectionCount * 100.0) * v6);\n  if ( v7 <= 0.0 )\n  {\n    v7 = 0.0;\n  }\n  else if ( v7 >= 1.0 )\n  {\n    v7 = 1.0;\n  }\n  return LODWORD(v7);\n}", "assembly": "; \n; EditorUI::valueFromXPos from 0x4849f0 to 0x484a76 (134 bytes)\n; \n; 1 xrefs:\n; > EditorUI::updateSlider @ 0x484a98\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:49:24 +0000\n; \nPUSH            {R3-R5,LR}                                             ; +0x0, 0x4849f0\nMOV             R5, R0                                                 ; +0x2, 0x4849f2\nVPUSH           {D8}                                                   ; +0x4, 0x4849f4\nVMOV            S16, R1                                                ; +0x8, 0x4849f8\nMOVS            R1, #0; int                                            ; +0xc, 0x4849fc\nBL              _ZN8EditorUI7getXMinEi; EditorUI::getXMin(int)         ; +0xe, 0x4849fe\nVMOV            S17, R0                                                ; +0x12, 0x484a02\nLDR.W           R0, [R5,#0x3B0]; this                                  ; +0x16, 0x484a06\nBL              _ZN16LevelEditorLayer15getSectionCountEv; LevelEditorLayer::getSectionCount(void) ; +0x1a, 0x484a0a\nLDR.W           R3, [R5,#0x3B0]                                        ; +0x1e, 0x484a0e\nMOV             R4, R0                                                 ; +0x22, 0x484a12\nLDR.W           R0, [R3,#0x984]                                        ; +0x24, 0x484a14\nLDR             R3, [R0]                                               ; +0x28, 0x484a18\nLDR             R3, [R3,#0x54]                                         ; +0x2a, 0x484a1a\nBLX             R3                                                     ; +0x2c, 0x484a1c\nCMP             R4, #0x64 ; 'd'                                        ; +0x2e, 0x484a1e\nVLDR            S14, =100.0                                            ; +0x30, 0x484a20\nIT LT                                                                  ; +0x34, 0x484a24\nMOVLT           R4, #0x64 ; 'd'                                        ; +0x36, 0x484a26\nVMOV            S15, R4                                                ; +0x38, 0x484a28\nVSUB.F32        S16, S16, S17                                          ; +0x3c, 0x484a2c\nVCVT.F32.S32    S15, S15                                               ; +0x40, 0x484a30\nVMUL.F32        S15, S15, S14                                          ; +0x44, 0x484a34\nVMOV            S14, R0                                                ; +0x48, 0x484a38\nVMUL.F32        S15, S15, S14                                          ; +0x4c, 0x484a3c\nVNEG.F32        S16, S16                                               ; +0x50, 0x484a40\nVDIV.F32        S15, S16, S15                                          ; +0x54, 0x484a44\nVCMPE.F32       S15, #0.0                                              ; +0x58, 0x484a48\nVMRS            APSR_nzcv, FPSCR                                       ; +0x5c, 0x484a4c\nBLE             loc_484A66                                             ; +0x60, 0x484a50\nVMOV.F32        S14, #1.0                                              ; +0x62, 0x484a52\nVCMPE.F32       S15, S14                                               ; +0x66, 0x484a56\nVMRS            APSR_nzcv, FPSCR                                       ; +0x6a, 0x484a5a\nIT PL                                                                  ; +0x6e, 0x484a5e\nVMOVPL.F32      S15, S14                                               ; +0x70, 0x484a60\nB               loc_484A6C                                             ; +0x74, 0x484a64\nIT LE                                                                  ; +0x76, 0x484a66\nVLDRLE          S15, =0.0                                              ; +0x78, 0x484a68\nVPOP            {D8}                                                   ; +0x7c, 0x484a6c\nVMOV            R0, S15                                                ; +0x80, 0x484a70\nPOP             {R3-R5,PC}                                             ; +0x84, 0x484a74", "xrefs": ["EditorUI::updateSlider @ 0x484a98"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}