func NewGtComparator(compiler *Compiler, x, y, r []*Wire) error {
	return comparator(compiler, compiler.ZeroWire(), x, y, r)
}
NewGtComparator tests if x>y.
package circuits
import (
	"fmt"
	"github.com/markkurossi/mpc/circuit"
	"github.com/markkurossi/mpc/types"
)
func comparator(compiler *Compiler, cin *Wire, x, y, r []*Wire) error {
	x, y = compiler.ZeroPad(x, y)
	if len(r) != 1 {
		return fmt.Errorf("invalid lt comparator arguments: r=%d", len(r))
	}
	for i := 0; i < len(x); i++ {
		w1 := NewWire()
		compiler.AddGate(NewBinary(circuit.XNOR, cin, y[i], w1))
		w2 := NewWire()
		compiler.AddGate(NewBinary(circuit.XOR, cin, x[i], w2))
		w3 := NewWire()
		compiler.AddGate(NewBinary(circuit.AND, w1, w2, w3))
		var cout *Wire
		if i+1 < len(x) {
			cout = NewWire()
		} else {
			cout = r[0]
		}
		compiler.AddGate(NewBinary(circuit.XOR, cin, w3, cout))
		cin = cout
	}
	return nil
}