  We have analysed two cosmological zoom simulations with $M_{\rm vir}\sim
10^{12}{\rm\,M}_\odot$ from the NIHAO series, both with and without feedback.
We show that an entropy criterion based on the equation of state of the
intergalactic medium can successfully separate cold- and hot-mode accretion.
The shock-heated gas has non-negligible turbulent support and cools
inefficiently. In the simulations without feedback, only a small fraction
($\sim 20$ per cent) of the stellar mass comes from baryons that have been in
the hot circumgalactic medium, although quantitative conclusions should be
taken with caution due to our small-number statistics. With feedback, the
fraction is larger because of the reaccretion of gas heated by supernovae,
which has lower entropies and shorter cooling times than the gas heated by
accretion shocks. We have compared the results of NIHAO to predictions of the
GalICS 2.1 semianalytic model of galaxy formation. The shock-stability
criterion implemented in GalICS 2.1 successfully reproduces the transition from
cold- to hot-mode accretion.
