//
// EditorUI::convertToBaseKey from 0x1000804b0 to 0x10008058c (220 bytes)
//
// 2 xrefs:
// > EditorUI::convertKeyBasedOnNeighbors @ 0x1000805b8
// > EditorUI::processSmartObjectsFromType @ 0x100479ef8
//
// This function is hookable on this platform (idp: arm, 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 10:58:17 +0000
//
__int64 __fastcall EditorUI::convertToBaseKey(__int64 a1, __int64 a2)
{
__int64 result; // x0
result = a2;
if ( (int)a2 <= 2822 )
{
if ( (unsigned int)(a2 - 2808) < 0xF )
return 2703;
if ( (unsigned int)(a2 - 867) < 6 || (unsigned int)(a2 - 1266) < 2 )
return 869;
return result;
}
if ( (int)a2 > 2841 )
{
if ( (int)a2 > 2845 )
{
if ( (int)a2 <= 2847 )
{
if ( (_DWORD)a2 != 2846 )
return 2839;
return 2838;
}
if ( (_DWORD)a2 != 2848 )
{
if ( (_DWORD)a2 != 2849 )
return result;
return 2841;
}
}
else
{
if ( (int)a2 <= 2843 )
{
if ( (_DWORD)a2 != 2842 )
return 2839;
return 2838;
}
if ( (_DWORD)a2 != 2844 )
return 2841;
}
return 2840;
}
if ( (unsigned int)(a2 - 2823) < 0xF )
return 2704;
return result;
}