+ int crit = critbit(n);
+ u8 direction;
+ intmap_index_t prefix, idx;
+
+ idx = (index >> crit);
+ direction = idx & 1;
+
+ /* Leave critbit in place: we can't shift by 64 anyway */
+ idx |= 1;
+ prefix = n->u.n->prefix_and_critbit >> crit;
+
+ /* If this entire tree is greater than index, take first */
+ if (idx < prefix)
+ return intmap_first_(n, indexp);
+ /* If this entire tree is less than index, we're past it. */
+ else if (idx > prefix)
+ goto try_greater_tree;
+
+ /* Remember greater tree for backtracking */