Some cppcheck reports fixed:

(warning) Logical disjunction always evaluates to true: regnum < 32 || regnum > 31
(style) Same expression on both sides of '||'
(style) Same expression on both sides of '&&'
(style) Expression is always false because 'else if' condition matches previous condition at line 180