remove_sm
remove_sm(*avl, &(*avl)->root, sm, &node);
if (!remove_sm(avl, &node->lr[side(cmp)], sm, ret))
static bool remove_sm(struct stree *avl, AvlNode **p, const struct sm_state *sm, AvlNode **ret);