/*
 * Decompiled with CFR 0_110.
 * 
 * Could not load the following classes:
 *  java.lang.Comparable
 *  java.lang.Object
 *  java.util.Comparator
 *  java.util.Map
 */
package org.dom4j.xpath;

import java.util.Comparator;
import java.util.Map;
import org.dom4j.xpath.DefaultXPath;

class DefaultXPath$1
implements Comparator {
    private final DefaultXPath this$0;
    private final Map val$sortValues;

    DefaultXPath$1(DefaultXPath defaultXPath, Map map) {
        this.this$0 = defaultXPath;
        this.val$sortValues = map;
    }

    /*
     * Enabled aggressive block sorting
     * Lifted jumps to return sites
     */
    public int compare(Object object, Object object2) {
        Object object3;
        Object object4 = this.val$sortValues.get(object);
        if (object4 == (object3 = this.val$sortValues.get(object2))) {
            return 0;
        }
        if (object4 instanceof Comparable) {
            return ((Comparable)object4).compareTo(object3);
        }
        if (object4 == null) {
            return 1;
        }
        if (object3 == null) {
            return -1;
        }
        if (object4.equals(object3)) return 0;
        return -1;
    }
}

