Reduces branching in a function by removing unused BranchTargets. This function will also rewrite target offsets.
Removes unused functions.