gost28147: inline gost_val function to speed up code