//SH2i turns a string 0x00000 to its base 10 counterpart in int64
SH2i turns a string 0x00000 to its base 10 counterpart in int64
// SH2i turns a string 0x00000 to its base 10 counterpart in int64
func (s *Solver) SH2i(in string) int64 {
	tmp := strings.ReplaceAll(in, "0x", "")
	tmp = strings.TrimLeft(tmp, "0")
	tmp = strings.TrimRight(tmp, " ")
	if tmp == "" {
		log.Fatal("Unsat")
	}
	res, err := strconv.ParseUint(tmp, 16, int(s.width))
	if err != nil {
		log.Fatal(err)
	}
	if res&(1<<s.width-1) > 0 {
		return -((^(int64(res)) & int64(math.Pow(2, float64(s.width))-1)) + 1)
	}
	return int64(res)
}
func ( s * Solver ) SH2i ( in string ) int64 { tmp := strings . ReplaceAll ( in , " " , " " ) tmp = strings . TrimLeft ( tmp , " " ) tmp = strings . TrimRight ( tmp , " " ) if tmp == " " { log . Fatal ( " " ) } res , err := strconv . ParseUint ( tmp , 16 , int ( s . width ) ) if err != nil { log . Fatal ( err ) } if res & ( 1 << s . width - 1 ) > 0 { return - ( ( ^ ( int64 ( res ) ) & int64 ( math . Pow ( 2 , float64 ( s . width ) ) - 1 ) ) + 1 ) } return int64 ( res ) }
SH2i turns a string 0x00000 to its base 10 counterpart in int64
SH2i turns a string 0x00000 to its base 10 counterpart in int64