  A search for decay-time-dependent charge-parity ($CP$) asymmetry in $D^0 \to
K^+K^-$ and $D^0 \to \pi^+\pi^-$ decays is performed at the LHCb experiment
using proton-proton collision data recorded at a center-of-mass energy of
13TeV, and corresponding to an integrated luminosity of 5.4fb$^{-1}$. The $D^0$
mesons are required to originate from semileptonic decays of $b$ hadrons, such
that the charge of the muon identifies the flavor of the neutral $D$ meson at
production. The asymmetries in the effective decay widths of $D^0$ and
$\overline{D}^0$ mesons are determined to be $A_{\Gamma}(K^+K^-) = ( -4.3 \pm
3.6 \pm 0.5 )\times 10^{-4}$ and $A_{\Gamma}(\pi^+\pi^-) = ( 2.2 \pm 7.0 \pm
0.8)\times 10^{-4}$, where the uncertainties are statistical and systematic,
respectively. The results are consistent with $CP$ symmetry and, when combined
with previous LHCb results, yield $A_{\Gamma}(K^+K^-) = ( -4.4 \pm 2.3 \pm 0.6
)\times 10^{-4}$ and $A_{\Gamma}(\pi^+\pi^-) = ( 2.5 \pm 4.3 \pm 0.7)\times
10^{-4}$.
