Producing a total or partial order from an inconsistent relation
It's hard to say without more context and more modelling.  It will require some assumptions on how the results of the comparison function relate to the (hidden) desired total order.
It's possible you might want the Bradley-Terry-Luce model.  If so, there are many standard algorithms.  See also https://cs.stackexchange.com/a/85204/755.
It's possible you might want some ranking system, like Elo, etc.
It's possible you might want a ranked voting system, such as IRV, Condorcet method, Borda count, or any of many others.  They all have various flaws and tradeoffs.  There is a proof that no system will have all the properties we might want -- see, e.g., Arrow's theorem and the problem of non-transitivity (that even if each of your friend's individual preferences is transitive, i.e., a total order, then there is no guarantee that there exists a global total order that is consistent with all of them).