// b16
//
//  ---------
//  |   #   |
//  | ##### |
//  |#######|
//  |   #   |
//  | ##### |
//  |#######|
//  ---------
199444
func b16(img *image.Paletted, x, y, size float64, angle int) {
	points := pool.Get().([]float64)[:0]
	m := size / 2
	drawBlock(img, x, y, size, angle, append(points,
		x+m, y,
		x+size, y+m,
		x, y+m,
		x+m, y,
	))

	drawBlock(img, x, y, size, angle, append(points[:0],
		x+m, y+m,
		x+size, y+size,
		x, y+size,
		x+m, y+m,
	))

	pool.Put(points)
}
750738
func (t *Tag) Proto() *api.Tag {
	kv := strings.SplitN(t.Tag, ":", 2)
	if len(kv) != 2 {
		panic(fmt.Sprintf("bad tag %q", t.Tag))
	}
	return &api.Tag{
		Key:        kv[0],
		Value:      kv[1],
		AttachedBy: t.RegisteredBy,
		AttachedTs: google.NewTimestamp(t.RegisteredTs),
	}
}
343624
func Int16s(b0, b1 []int16) int {
	d := 0
	for i, x := range b0 {
		d += Int16(x, b1[i])
	}
	return d
}
1232255
func BgBrightGreen(arg interface{}) Value {
	if val, ok := arg.(Value); ok {
		return val.BgBrightGreen()
	}
	return value{value: arg, color: BrightBg | GreenBg}
}
41575
func Decrypt1024(block *[16]uint64, keys *[17]uint64, tweak *[3]uint64) {
	b0, b1, b2, b3 := block[0], block[1], block[2], block[3]
	b4, b5, b6, b7 := block[4], block[5], block[6], block[7]
	b8, b9, b10, b11 := block[8], block[9], block[10], block[11]
	b12, b13, b14, b15 := block[12], block[13], block[14], block[15]

	var tmp uint64
	for r := 20; r > 1; r-- {
		b0 -= keys[r%17]
		b1 -= keys[(r+1)%17]
		b2 -= keys[(r+2)%17]
		b3 -= keys[(r+3)%17]
		b4 -= keys[(r+4)%17]
		b5 -= keys[(r+5)%17]
		b6 -= keys[(r+6)%17]
		b7 -= keys[(r+7)%17]
		b8 -= keys[(r+8)%17]
		b9 -= keys[(r+9)%17]
		b10 -= keys[(r+10)%17]
		b11 -= keys[(r+11)%17]
		b12 -= keys[(r+12)%17]
		b13 -= keys[(r+13)%17] + tweak[r%3]
		b14 -= keys[(r+14)%17] + tweak[(r+1)%3]
		b15 -= keys[(r+15)%17] + uint64(r)

		tmp = b7 ^ b12
		b7 = (tmp >> 20) | (tmp << (64 - 20))
		b12 -= b7
		tmp = b3 ^ b10
		b3 = (tmp >> 37) | (tmp << (64 - 37))
		b10 -= b3
		tmp = b5 ^ b8
		b5 = (tmp >> 31) | (tmp << (64 - 31))
		b8 -= b5
		tmp = b1 ^ b14
		b1 = (tmp >> 23) | (tmp << (64 - 23))
		b14 -= b1
		tmp = b9 ^ b4
		b9 = (tmp >> 52) | (tmp << (64 - 52))
		b4 -= b9
		tmp = b13 ^ b6
		b13 = (tmp >> 35) | (tmp << (64 - 35))
		b6 -= b13
		tmp = b11 ^ b2
		b11 = (tmp >> 48) | (tmp << (64 - 48))
		b2 -= b11
		tmp = b15 ^ b0
		b15 = (tmp >> 9) | (tmp << (64 - 9))
		b0 -= b15

		tmp = b9 ^ b10
		b9 = (tmp >> 25) | (tmp << (64 - 25))
		b10 -= b9
		tmp = b11 ^ b8
		b11 = (tmp >> 44) | (tmp << (64 - 44))
		b8 -= b11
		tmp = b13 ^ b14
		b13 = (tmp >> 42) | (tmp << (64 - 42))
		b14 -= b13
		tmp = b15 ^ b12
		b15 = (tmp >> 19) | (tmp << (64 - 19))
		b12 -= b15
		tmp = b1 ^ b6
		b1 = (tmp >> 46) | (tmp << (64 - 46))
		b6 -= b1
		tmp = b3 ^ b4
		b3 = (tmp >> 47) | (tmp << (64 - 47))
		b4 -= b3
		tmp = b5 ^ b2
		b5 = (tmp >> 44) | (tmp << (64 - 44))
		b2 -= b5
		tmp = b7 ^ b0
		b7 = (tmp >> 31) | (tmp << (64 - 31))
		b0 -= b7

		tmp = b1 ^ b8
		b1 = (tmp >> 41) | (tmp << (64 - 41))
		b8 -= b1
		tmp = b5 ^ b14
		b5 = (tmp >> 42) | (tmp << (64 - 42))
		b14 -= b5
		tmp = b3 ^ b12
		b3 = (tmp >> 53) | (tmp << (64 - 53))
		b12 -= b3
		tmp = b7 ^ b10
		b7 = (tmp >> 4) | (tmp << (64 - 4))
		b10 -= b7
		tmp = b15 ^ b4
		b15 = (tmp >> 51) | (tmp << (64 - 51))
		b4 -= b15
		tmp = b11 ^ b6
		b11 = (tmp >> 56) | (tmp << (64 - 56))
		b6 -= b11
		tmp = b13 ^ b2
		b13 = (tmp >> 34) | (tmp << (64 - 34))
		b2 -= b13
		tmp = b9 ^ b0
		b9 = (tmp >> 16) | (tmp << (64 - 16))
		b0 -= b9

		tmp = b15 ^ b14
		b15 = (tmp >> 30) | (tmp << (64 - 30))
		b14 -= b15
		tmp = b13 ^ b12
		b13 = (tmp >> 44) | (tmp << (64 - 44))
		b12 -= b13
		tmp = b11 ^ b10
		b11 = (tmp >> 47) | (tmp << (64 - 47))
		b10 -= b11
		tmp = b9 ^ b8
		b9 = (tmp >> 12) | (tmp << (64 - 12))
		b8 -= b9
		tmp = b7 ^ b6
		b7 = (tmp >> 31) | (tmp << (64 - 31))
		b6 -= b7
		tmp = b5 ^ b4
		b5 = (tmp >> 37) | (tmp << (64 - 37))
		b4 -= b5
		tmp = b3 ^ b2
		b3 = (tmp >> 9) | (tmp << (64 - 9))
		b2 -= b3
		tmp = b1 ^ b0
		b1 = (tmp >> 41) | (tmp << (64 - 41))
		b0 -= b1

		r--

		b0 -= keys[r%17]
		b1 -= keys[(r+1)%17]
		b2 -= keys[(r+2)%17]
		b3 -= keys[(r+3)%17]
		b4 -= keys[(r+4)%17]
		b5 -= keys[(r+5)%17]
		b6 -= keys[(r+6)%17]
		b7 -= keys[(r+7)%17]
		b8 -= keys[(r+8)%17]
		b9 -= keys[(r+9)%17]
		b10 -= keys[(r+10)%17]
		b11 -= keys[(r+11)%17]
		b12 -= keys[(r+12)%17]
		b13 -= keys[(r+13)%17] + tweak[r%3]
		b14 -= keys[(r+14)%17] + tweak[(r+1)%3]
		b15 -= keys[(r+15)%17] + uint64(r)

		tmp = b7 ^ b12
		b7 = (tmp >> 25) | (tmp << (64 - 25))
		b12 -= b7
		tmp = b3 ^ b10
		b3 = (tmp >> 16) | (tmp << (64 - 16))
		b10 -= b3
		tmp = b5 ^ b8
		b5 = (tmp >> 28) | (tmp << (64 - 28))
		b8 -= b5
		tmp = b1 ^ b14
		b1 = (tmp >> 47) | (tmp << (64 - 47))
		b14 -= b1
		tmp = b9 ^ b4
		b9 = (tmp >> 41) | (tmp << (64 - 41))
		b4 -= b9
		tmp = b13 ^ b6
		b13 = (tmp >> 48) | (tmp << (64 - 48))
		b6 -= b13
		tmp = b11 ^ b2
		b11 = (tmp >> 20) | (tmp << (64 - 20))
		b2 -= b11
		tmp = b15 ^ b0
		b15 = (tmp >> 5) | (tmp << (64 - 5))
		b0 -= b15

		tmp = b9 ^ b10
		b9 = (tmp >> 17) | (tmp << (64 - 17))
		b10 -= b9
		tmp = b11 ^ b8
		b11 = (tmp >> 59) | (tmp << (64 - 59))
		b8 -= b11
		tmp = b13 ^ b14
		b13 = (tmp >> 41) | (tmp << (64 - 41))
		b14 -= b13
		tmp = b15 ^ b12
		b15 = (tmp >> 34) | (tmp << (64 - 34))
		b12 -= b15
		tmp = b1 ^ b6
		b1 = (tmp >> 13) | (tmp << (64 - 13))
		b6 -= b1
		tmp = b3 ^ b4
		b3 = (tmp >> 51) | (tmp << (64 - 51))
		b4 -= b3
		tmp = b5 ^ b2
		b5 = (tmp >> 4) | (tmp << (64 - 4))
		b2 -= b5
		tmp = b7 ^ b0
		b7 = (tmp >> 33) | (tmp << (64 - 33))
		b0 -= b7

		tmp = b1 ^ b8
		b1 = (tmp >> 52) | (tmp << (64 - 52))
		b8 -= b1
		tmp = b5 ^ b14
		b5 = (tmp >> 23) | (tmp << (64 - 23))
		b14 -= b5
		tmp = b3 ^ b12
		b3 = (tmp >> 18) | (tmp << (64 - 18))
		b12 -= b3
		tmp = b7 ^ b10
		b7 = (tmp >> 49) | (tmp << (64 - 49))
		b10 -= b7
		tmp = b15 ^ b4
		b15 = (tmp >> 55) | (tmp << (64 - 55))
		b4 -= b15
		tmp = b11 ^ b6
		b11 = (tmp >> 10) | (tmp << (64 - 10))
		b6 -= b11
		tmp = b13 ^ b2
		b13 = (tmp >> 19) | (tmp << (64 - 19))
		b2 -= b13
		tmp = b9 ^ b0
		b9 = (tmp >> 38) | (tmp << (64 - 38))
		b0 -= b9

		tmp = b15 ^ b14
		b15 = (tmp >> 37) | (tmp << (64 - 37))
		b14 -= b15
		tmp = b13 ^ b12
		b13 = (tmp >> 22) | (tmp << (64 - 22))
		b12 -= b13
		tmp = b11 ^ b10
		b11 = (tmp >> 17) | (tmp << (64 - 17))
		b10 -= b11
		tmp = b9 ^ b8
		b9 = (tmp >> 8) | (tmp << (64 - 8))
		b8 -= b9
		tmp = b7 ^ b6
		b7 = (tmp >> 47) | (tmp << (64 - 47))
		b6 -= b7
		tmp = b5 ^ b4
		b5 = (tmp >> 8) | (tmp << (64 - 8))
		b4 -= b5
		tmp = b3 ^ b2
		b3 = (tmp >> 13) | (tmp << (64 - 13))
		b2 -= b3
		tmp = b1 ^ b0
		b1 = (tmp >> 24) | (tmp << (64 - 24))
		b0 -= b1
	}

	b0 -= keys[0]
	b1 -= keys[1]
	b2 -= keys[2]
	b3 -= keys[3]
	b4 -= keys[4]
	b5 -= keys[5]
	b6 -= keys[6]
	b7 -= keys[7]
	b8 -= keys[8]
	b9 -= keys[9]
	b10 -= keys[10]
	b11 -= keys[11]
	b12 -= keys[12]
	b13 -= keys[13] + tweak[0]
	b14 -= keys[14] + tweak[1]
	b15 -= keys[15]

	block[0], block[1], block[2], block[3] = b0, b1, b2, b3
	block[4], block[5], block[6], block[7] = b4, b5, b6, b7
	block[8], block[9], block[10], block[11] = b8, b9, b10, b11
	block[12], block[13], block[14], block[15] = b12, b13, b14, b15
}
1286521
func main() {
	flag.Parse()

	key := os.Getenv("BFX_API_KEY")
	secret := os.Getenv("BFX_API_SECRET")
	c := rest.NewClientWithURL(*api).Credentials(key, secret)

	available, err := c.Platform.Status()
	if err != nil {
		log.Fatalf("getting status: %s", err)
	}

	if !available {
		log.Fatalf("API not available")
	}

	if *orderid != "" {
		ordid, err := strconv.ParseInt(*orderid, 10, 64)
		if err != nil {
			log.Fatal(err)
		}
		os, err := c.Orders.OrderTrades(bitfinex.TradingPrefix+bitfinex.BTCUSD, ordid)
		if err != nil {
			log.Fatalf("getting order trades: %s", err)
		}

		log.Printf("order trades: %#v\n", os)
	} else {
		os, err := c.Orders.History(bitfinex.TradingPrefix + bitfinex.BTCUSD)
		if err != nil {
			log.Fatalf("getting orders: %s", err)
		}

		log.Printf("orders: %#v\n", os)
	}
}
658443
func init() {
	var err error
	validTagRe, err = regexp.Compile(`^([a-z][a-z0-9]*(\-[a-z0-9]+)*)(:([a-z0-9]+(\-[a-z0-9]+)*))*$`)
	if err != nil {
		panic(err)
	}
}
145649
func (q *BooleanQuery) Boost(boost float32) *BooleanQuery {
	q.data.Boost = boost
	return q
}
198601
func (v Values) Compile(d Dialect, params *Parameters) (string, error) {
	clauses := make([]Clause, len(v))
	for i, key := range v.Keys() {
		clauses[i] = BinaryClause{
			Pre:  ColumnClause{name: key},
			Post: &Parameter{v[key]},
			Sep:  " = ",
		}
	}
	return ArrayClause{Clauses: clauses, Sep: ", "}.Compile(d, params)
}
272347
func (builder *FetchValueCommandBuilder) WithBasicQuorum(basicQuorum bool) *FetchValueCommandBuilder {
	builder.protobuf.BasicQuorum = &basicQuorum
	return builder
}
837099
func BgBrightYellow(arg interface{}) Value {
	if val, ok := arg.(Value); ok {
		return val.BgBrightYellow()
	}
	return value{value: arg, color: BrightBg | YellowBg}
}
55026
func Decrypt256(block *[4]uint64, keys *[5]uint64, tweak *[3]uint64) {
	b0, b1, b2, b3 := block[0], block[1], block[2], block[3]

	var tmp uint64
	for r := 18; r > 1; r-- {
		b0 -= keys[r%5]
		b1 -= keys[(r+1)%5] + tweak[r%3]
		b2 -= keys[(r+2)%5] + tweak[(r+1)%3]
		b3 -= keys[(r+3)%5] + uint64(r)

		tmp = b1 ^ b2
		b1 = (tmp >> 32) | (tmp << (64 - 32))
		b2 -= b1
		tmp = b3 ^ b0
		b3 = (tmp >> 32) | (tmp << (64 - 32))
		b0 -= b3

		tmp = b3 ^ b2
		b3 = (tmp >> 22) | (tmp << (64 - 22))
		b2 -= b3
		tmp = b1 ^ b0
		b1 = (tmp >> 58) | (tmp << (64 - 58))
		b0 -= b1

		tmp = b1 ^ b2
		b1 = (tmp >> 12) | (tmp << (64 - 12))
		b2 -= b1
		tmp = b3 ^ b0
		b3 = (tmp >> 46) | (tmp << (64 - 46))
		b0 -= b3

		tmp = b3 ^ b2
		b3 = (tmp >> 33) | (tmp << (64 - 33))
		b2 -= b3
		tmp = b1 ^ b0
		b1 = (tmp >> 25) | (tmp << (64 - 25))
		b0 -= b1

		r--

		b0 -= keys[r%5]
		b1 -= keys[(r+1)%5] + tweak[r%3]
		b2 -= keys[(r+2)%5] + tweak[(r+1)%3]
		b3 -= keys[(r+3)%5] + uint64(r)

		tmp = b1 ^ b2
		b1 = (tmp >> 37) | (tmp << (64 - 37))
		b2 -= b1
		tmp = b3 ^ b0
		b3 = (tmp >> 5) | (tmp << (64 - 5))
		b0 -= b3

		tmp = b3 ^ b2
		b3 = (tmp >> 40) | (tmp << (64 - 40))
		b2 -= b3
		tmp = b1 ^ b0
		b1 = (tmp >> 23) | (tmp << (64 - 23))
		b0 -= b1

		tmp = b1 ^ b2
		b1 = (tmp >> 57) | (tmp << (64 - 57))
		b2 -= b1
		tmp = b3 ^ b0
		b3 = (tmp >> 52) | (tmp << (64 - 52))
		b0 -= b3

		tmp = b3 ^ b2
		b3 = (tmp >> 16) | (tmp << (64 - 16))
		b2 -= b3
		tmp = b1 ^ b0
		b1 = (tmp >> 14) | (tmp << (64 - 14))
		b0 -= b1
	}

	b0 -= keys[0]
	b1 -= keys[1] + tweak[0]
	b2 -= keys[2] + tweak[1]
	b3 -= keys[3]

	block[0], block[1], block[2], block[3] = b0, b1, b2, b3
}
830766
func newSymtab() *symtab {
	return &symtab{
		tables:        make(map[sqlparser.TableName]*table),
		uniqueColumns: make(map[string]*column),
	}
}
972256
func compileBytes(b []byte) (<-chan []byte, <-chan error) {
	lines := strings.Split(formatLF(string(b)), lf)

	bc := make(chan []byte, len(lines))
	errc := make(chan error)

	go func() {
		ctx := newContext()

		elemc, pErrc := parse(lines)

		for {
			select {
			case elem, ok := <-elemc:
				if !ok {
					close(bc)
					return
				}

				elem.SetContext(ctx)

				switch v := elem.(type) {
				case *mixinDeclaration:
					ctx.mixins[v.name] = v
				case *variable:
					ctx.vars[v.name] = v
				case *atRule, *declaration, *selector:
					bf := new(bytes.Buffer)
					elem.WriteTo(bf)
					bc <- bf.Bytes()
				}
			case err := <-pErrc:
				errc <- err
				return
			}
		}
	}()

	return bc, errc
}
457921
func Modsub(a, b, m *FP256BN.BIG) *FP256BN.BIG {
	return Modadd(a, FP256BN.Modneg(b, m), m)
}
696263
func (term *Terminal) Basic(prefix string, required bool) (string, error) {
	return term.Custom(prefix, func(input string) (string, bool) {
		if required && input == "" {
			return "", false
		}

		return input, true
	})
}
252680
func (sp *stringPairs) Bs() []string {
	items := make([]string, len(*sp))
	for i, el := range *sp {
		items[i] = el.B
	}
	return items
}