private Integer getStackOffset(Object obj, String name) {
		if (obj instanceof Variable) {
			Variable var = (Variable) obj;
			if (var.hasStackStorage()) {
				return (int) var.getLastStorageVarnode().getAddress().getOffset();
			}
			return null;
		}
		else if (obj instanceof Integer) {
			return (Integer) obj;
		}
		else {
			throw new IllegalArgumentException(name + " is unsupported type: " +
				obj.getClass().getSimpleName());
		}
	}
Compares a stack variable offsets. One or both objects must be
a StackVariable.
@param obj1 a StackVariable or Integer
@param obj2 a StackVariable or Integer

@return a negative integer, zero, or a positive integer
 if the first argument is less than, equal to, or greater than the second.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/listing/StackVariableComparator.java