Add factorized isect3 case
Reorder intersection test and local decls