code: func Loop(lmid *[curl.StateSize]uint64, hmid *[curl.StateSize]uint64, m int, cancelled *bool, checkFun CheckFunc, loopCnt int) (nonce Trits, rate int64, foundIndex int) {
  	var lcpy, hcpy [curl.StateSize]uint64
  	var i int64
  
  	for i = 0; !*cancelled; i++ {
  		copy(lcpy[:], lmid[:])
  		copy(hcpy[:], hmid[:])
  		transform64(&lcpy, &hcpy, loopCnt)
  
  		if n := checkFun(&lcpy, &hcpy, m); n >= 0 {
  			nonce := seri(lmid, hmid, uint(n))
  			return nonce, i * 64, n
  		}
  		incr(lmid, hmid)
  	}
  	return nil, i * 64, -1
  }
docs: // Loop increments and transforms until checkFun is true.