Revert "utils: use common code for apply_rules and apply_cipso"

This reverts commit 68e38ff3936597a3189d29f57a68dae5ac08db1e.