static int compare_nof_true_bits(opcode_handler_struct aptr, opcode_handler_struct bptr) {
        opcode_handler_struct a = aptr, b = bptr;
        if (a.bits != b.bits) {
            return (int) (a.bits - b.bits);
        }
        if (a.mask != b.mask) {
            return (int) (a.mask - b.mask);
        }
        return (int) (a.match - b.match);
    }