//
// EditorUI::valueFromXPos from 0x10000dd00 to 0x10000dd8b (139 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:18:50 +0000
//
__int128 __usercall EditorUI::valueFromXPos@(__int64 a1@, float a2@)
{
int SectionCount; // eax
int v3; // ecx
__int128 v4; // xmm1
float XMin; // [rsp+10h] [rbp-10h]
XMin = EditorUI::getXMin(a1, 0);
SectionCount = LevelEditorLayer::getSectionCount(*(_QWORD *)(a1 + 1440));
v3 = 100;
if ( SectionCount >= 101 )
v3 = SectionCount;
v4 = LODWORD(a2);
*(float *)&v4 = fminf(
fmaxf(
(float)(a2 - XMin)
/ (float)((*(float (__fastcall **)(_QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 1440) + 3920LL) + 168LL))(*(_QWORD *)(*(_QWORD *)(a1 + 1440) + 3920LL))
* (float)((float)v3 * -100.0)),
0.0),
1.0);
return v4;
}