123456789101112131415161718192021222324(* Bit-twiddling primitives, implemented in C (see bit_stubs.c). *)externalpop_count:(int[@untagged])->(int[@untagged])="maxtrie_pop_count_tagged""maxtrie_pop_count"[@@noalloc]externalmsb_index:(int[@untagged])->(int[@untagged])="maxtrie_msb_index_tagged""maxtrie_msb_index"[@@noalloc]externallsb_index:(int[@untagged])->(int[@untagged])="maxtrie_lsb_index_tagged""maxtrie_lsb_index"[@@noalloc]externalextract_msb:(int[@untagged])->(int[@untagged])="maxtrie_extract_msb_tagged""maxtrie_extract_msb"[@@noalloc]let[@inline]extract_lsbx=xland(-x)(* [lt_msb x y] holds iff the most significant bit of [x] is strictly lower
than the most significant bit of [y]. Both must be non-negative. *)let[@inline]lt_msbxy=x<y&&x<xlxory(* [share_choose a b] chooses which of two equal values to keep when unifying
them: a value outside the minor heap if there is one, otherwise the one at
the higher address. *)externalshare_choose:'a->'a->'a="maxtrie_share_choose"[@@noalloc]