in JetBrains.HabitatDetector/src/Impl/Helper.cs [157:165]
internal static unsafe JetArchitecture GetProcessArchitecture(Process process) => Platform switch
{
JetPlatform.FreeBSD or JetPlatform.Linux => OSArchitecture,
JetPlatform.MacOsX => MacOsHelper.GetRunningUnderRosetta2(process.Id)
? JetArchitecture.X64
: OSArchitecture,
JetPlatform.Windows => WindowsHelper.GetProcessArchitecture(process.Handle.ToPointer()),
_ => throw new PlatformNotSupportedException()
};