You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: bond.go
    path of file: ./repos/baseline/examples/financialcircuit
    
    the code of the file until where you have to start completion: package financial

import (
	"github.com/consensys/gnark-crypto/ecc"
	edwardsbn254 "github.com/consensys/gnar
    
func (circuit *bondCircuit) Define(api frontend.API) error {

	// check if all entries are greater than zero
	api.AssertIsLessOrEqual(0, circuit.QuoteFromCpts[0])
	api.AssertIsLessOrEqual(0, circuit.QuoteFromCpts[1])
	api.AssertIsLessOrEqual(0, circuit.QuoteFromCpts[2])

	// All quotes should not be equal to zero
	checkZeroCpt1 := api.IsZero(circuit.QuoteFromCpts[0])
	checkZeroCpt2 := api.IsZero(circuit.QuoteFromCpts[1])
	checkZeroCpt3 := api.IsZero(circuit.QuoteFromCpts[2])

	checkZeroTemp := api.Or(checkZeroCpt1, checkZeroCpt2)
	checkZeroResult := api.Or(checkZeroTemp, checkZeroCpt3)

	api.AssertIsEqual(checkZeroResult, 0)

	// Make sure Winner Quote is the smallest one or matching the bid
	api.AssertIsLessOrEqual(circuit.AcceptedQuote, circuit.RejectedQuotes[0])
	api.AssertIsLessOrEqual(circuit.AcceptedQuote, circuit.RejectedQuotes[1])
	api.AssertIsEqual(circuit.AcceptedQuote, circuit.AcceptedQuoteQuery)

	// If winner quote is from Cpt1, Cpt2 or Cpt3, one of the subtraction is going to return zero
	// The circuit is build with all quotes received from responders
	subCpt1 := api.Sub(circuit.QuoteFromCpts[0], circuit.AcceptedQuote)
	subCpt2 := api.Sub(circuit.QuoteFromCpts[1], circuit.AcceptedQuote)
	subCpt3 := api.Sub(circuit.QuoteFromCpts[2], circuit.AcceptedQuote)

	// 1 - it is zero, so it is true. If 0, it isn't zero and is false
	outputCpt1 := api.IsZero(subCpt1)
	outputCpt2 := api.IsZero(subCpt2)
	outputCpt3 := api.IsZero(subCpt3)

	// outputCpt1 || outputCpt2 || outputCpt3 == 1
	resultTemp := api.Or(outputCpt1, outputCpt2)
	result := api.Or(resultTemp, outputCpt3)

	api.AssertIsEqual(result, 1)

	params, err := twistededwards.NewEdCurve(api.Curve())
	if err != nil {
		return err
	}

	circuit.AcceptedQuotePubKey.Curve = params
	eddsa.Verify(api, circuit.AcceptedQuoteSigned, circuit.AcceptedQuote, circuit.AcceptedQuotePubKey)

	// verify the signature in the cs for Cpt1, Cpt2, Cpt3
	// verify that the quote quote1 came from the associated cpt1
	circuit.PublicKeyCpts[0].Curve = params
	eddsa.Verify(api, circuit.SignatureCpts[0], circuit.QuoteFromCpts[0], circuit.PublicKeyCpts[0])

	circuit.PublicKeyCpts[1].Curve = params
	eddsa.Verify(api, circuit.SignatureCpts[1], circuit.QuoteFromCpts[1], circuit.PublicKeyCpts[1])

	circuit.PublicKeyCpts[2].Curve = params
	eddsa.Verify(api, circuit.SignatureCpts[2], circuit.QuoteFromCpts[2], circuit.PublicKeyCpts[2])

	//check Isin + quote
	mimc, _ := mimc.NewMiMC("seed", api)
	mimc.Write(circuit.Bond, circuit.QuoteFromCpts[0])
	IsinQuoteFromCpt1Hash := mimc.Sum()
	mimc.Reset()
	mimc.Write(circuit.Bond, circuit.QuoteFromCpts[1])
	IsinQuoteFromCpt2Hash := mimc.Sum()
	mimc.Reset()
	mimc.Write(circuit.Bond, circuit.QuoteFromCpts[2])
	IsinQuoteFromCpt3Hash := mimc.Sum()
	mimc.Reset()

	// the quote is valid only for that bond and the cpt1
	circuit.PublicKeyCpts[0].Curve = params
	eddsa.Verify(api, circuit.BondQuoteSignedCpts[0], IsinQuoteFromCpt1Hash, circuit.PublicKeyCpts[0])

	circuit.PublicKeyCpts[1].Curve = params
	eddsa.Verify(api, circuit.BondQuoteSignedCpts[1], IsinQuoteFromCpt2Hash, circuit.PublicKeyCpts[1])

	circuit.PublicKeyCpts[2].Curve = params
	eddsa.Verify(api, circuit.BondQuoteSignedCpts[2], IsinQuoteFromCpt3Hash, circuit.PublicKeyCpts[2])

	return nil
}