We shed light on the optimization of lithographic metrics for the semi-isolated dark field two-bar logic building block. Under standard D90Y illumination, this building block suffers from large mask three-dimensional-induced relative focus-dependent critical dimension (CD) asymmetries. Such behavior limits its overlapping process window (oPW) and gives rise to untenable full wafer CD uniformity and intrafield pattern shifts. We found that besides a Ta absorber thickness reduction and illumination, pupil optimization is necessary to fully remove these CD asymmetries. The pupil optimization is achieved by relating the aerial image decomposition (here, symmetrization and balancing of intensities across the diffracted orders) with lithographic metrics for each pupil plane location. The resulting pupil allows us (i) to lift the focus-dependent CD asymmetries and (ii) to co-optimize a number of lithographic metrics, such as oPW, contrast, nontelecentricity, and pattern shift. The importance of subsidiary conditions (e.g., symmetry of the pupil, required depth-of-focus) will be discussed.