SequenceIterator iter0 = null;
if (maybeBoolean0) {
iter0 = operand0.iterate(context);
Item i01 = iter0.next();
Item i02 = (i01 == null ? null : iter0.next());
if (i01 instanceof BooleanValue && i02 == null) {
boolean b = operand1.effectiveBooleanValue(context);
return compare((BooleanValue)i01, singletonOperator, BooleanValue.get(b), comparer, context);
}
if (i01 == null && !maybeBoolean1) {
return false;
}
}
// If the second operand is a singleton boolean,
// compare it with the effective boolean value of the other operand
SequenceIterator iter1 = null;
if (maybeBoolean1) {
iter1 = operand1.iterate(context);
Item i11 = iter1.next();
Item i12 = (i11 == null ? null : iter1.next());
if (i11 instanceof BooleanValue && i12 == null) {
boolean b = operand0.effectiveBooleanValue(context);
return compare(BooleanValue.get(b), singletonOperator, (BooleanValue)i11, comparer, context);
}
if (i11 == null && !maybeBoolean0) {