Shrink read_plain_int code from 1135 to 481 bytes