@Override
		public int compare(Symbol s1, Symbol s2) {
			Object obj1 = s1.getObject();
			Object obj2 = s2.getObject();
			if ((obj1 instanceof Variable) && (obj2 instanceof Variable)) {
				Variable v1 = (Variable) s1.getObject();
				Variable v2 = (Variable) s2.getObject();
				return v1.compareTo(v2);
			}
			if (obj1 instanceof Variable) {
				return -1;
			}
			if (obj2 instanceof Variable) {
				return 1;
			}

			return symbolComparator.compare(s1, s2);
		}
A comparator to sort Symbols the same way as the SymbolNode sorts
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/symboltree/SymbolTreeTestUtils.java