We present a precise approach to the generation of optimized collision-free and gouging-free tool paths for 5-axis CNC machining of freeform NURBS surfaces using flat-end and rounded-end (bull nose) tools having cylindrical shank. To achieve high approximation quality, we employ analysis of hyper-osculating circles (HOCs) (Wang et al., 1993a,b), that have third order contact with the target surface, and lead to a locally collision-free configuration between the tool and the target surface. At locations where an HOC is not possible, we aim at a double tangential contact among the tool and the target surface, and use it as a bridge between the feasible HOC tool paths. We formulate all such possible two-contact configurations as systems of algebraic constraints and solve them. For all feasible HOCs and two-contact configurations, we perform a global optimization to find the tool path that maximizes the approximation quality of the machining, while being gouge-free and possibly satisfying constraints on the tool tilt and the tool acceleration. We demonstrate the effectiveness of our approach via several experimental results.