code: public static void SetCon(CompactSpan s, int dir, int i) {
          int shift = dir * 6;
          int con = s.con;
          s.con = (con & ~(0x3f << shift)) | ((i & 0x3f) << shift);
      }
docs: / @param[in] i The index of the neighbor span.