"""
findfirstsortedequal(vars::DenseVector{Int64}, var::Int64)::Union{Int64,Nothing}
Note that this differs from searchsortedfirst by returning nothing when absent.
"""
function findfirstsortedequal(
var::Int64,
vars::DenseVector{Int64},
::Val{basecase} = Base.libllvm_version >= v"17" ? Val(8) : Val(128),
) where {basecase}
...