  The direct $C\!P$ asymmetries of the decays $B^0 \rightarrow K^{*0} \mu^+
\mu^-$ and $B^+ \rightarrow K^{+} \mu^+ \mu^-$ are measured using $pp$
collision data corresponding to an integrated luminosity of 3.0$\mbox{fb}^{-1}$
collected with the LHCb detector. The respective control modes $B^0 \rightarrow
J/\psi K^{*0}$ and $B^+ \rightarrow J/\psi K^{+}$ are used to account for
detection and production asymmetries. The measurements are made in several
intervals of $\mu^+ \mu^-$ invariant mass squared, with the $\phi(1020)$ and
charmonium resonance regions excluded. Under the hypothesis of zero $C\!P$
asymmetry in the control modes, the average values of the asymmetries are
\begin{align}
  {\cal A}_{C\!P}(B^0 \rightarrow K^{*0} \mu^+ \mu^-) &= -0.035 \pm 0.024 \pm
0.003, \cr
  {\cal A}_{C\!P}(B^+ \rightarrow K^{+} \mu^+ \mu^-) &= \phantom{-}0.012 \pm
0.017 \pm 0.001, \end{align} where the first uncertainties are statistical and
the second are due to systematic effects. Both measurements are consistent with
the Standard Model prediction of small $C\!P$ asymmetry in these decays.
