I don't know what algorithm it's using, but with examples you shown it is doing exactly what it should :

o FIRST CASE : (operand '<) comparison between two same integers (fix a) and (fix b) are done the way '< operand tells - integers are sorted like they are integers, so the whole list is reversed (sign <, or sign >, or sign /=) with exception of two different integers 1 /= 2, in withch case sorting is in order by operand '<...

o SECOND CASE : (= sign in '<= operand) tells that while comparing two same integers (fix a) and (fix b) original order of sorting should be preserved, but if integers are different 1 /= 2, then < sign of '<= operand is doing it's function in sorting...

M.R.