+struct freq *
+freq_hmap_search (struct hmap *hmap,
+ const union value *value, int width, size_t hash)
+{
+ struct freq *f;
+
+ HMAP_FOR_EACH_WITH_HASH (f, struct freq, node, hash, hmap)
+ if (value_equal (value, &f->values[0], width))
+ return f;
+
+ return NULL;
+}
+
+struct freq *
+freq_hmap_insert (struct hmap *hmap,
+ const union value *value, int width, size_t hash)
+{
+ struct freq *f = xmalloc (sizeof *f);
+ value_clone (&f->values[0], value, width);
+ f->count = 0;
+ hmap_insert (hmap, &f->node, hash);
+ return f;
+}
+
+int
+compare_freq_ptr_3way (const void *a_, const void *b_, const void *width_)