Extract the MSB (left) index from a resolved vl-maybe-range;
treats the empty range as
(vl-maybe-range-msbidx x) → rsh
Function:
(defun vl-maybe-range-msbidx (x) (declare (xargs :guard (and (vl-maybe-range-p x) (vl-maybe-range-resolved-p x)))) (let ((__function__ 'vl-maybe-range-msbidx)) (declare (ignorable __function__)) (b* (((unless x) 0)) (vl-range-msbidx x))))
Theorem:
(defthm integerp-of-vl-maybe-range-msbidx (b* ((rsh (vl-maybe-range-msbidx x))) (integerp rsh)) :rule-classes :type-prescription)