  We perform a topological-holomorphic twist of $\mathcal{N}=4$ supersymmetric
gauge theory on a four-manifold of the form $M_4=\Sigma_1 \times \Sigma_2$ with
Riemann surfaces $\Sigma_{1,2}$, and unravel the mathematical implications of
its physics. In particular, we consider different linear combinations of the
resulting scalar supercharges under $S$-duality, where this will allow us to
derive novel topological and holomorphic invariants of $M_4$ and their
Langlands duals. As the twisted theory can be topological along $\Sigma_1$
whence we can dimensionally reduce it to 2d, via the effective sigma-model on
$\Sigma_2$, we can also relate these 4d invariants and their Langlands duals to
the mirror symmetry of Higgs bundles and that of quasi-topological strings
described by the sheaf of chiral differential operators. As an offshoot, we
would be able to obtain a fundamental understanding from 4d gauge theory, why
chiral differential operators are purely perturbative objects.
