  The environmental effect is commonly used to explain the excess of gas-poor
galaxies in galaxy clusters. Meanwhile, the presence of gas-poor galaxies at
cluster outskirts, where galaxies have not spent enough time to feel the
cluster environmental effect, hints for the presence of pre-processing. Using
cosmological hydrodynamic simulations on 16 clusters, we investigate the
mechanisms of gas depletion of galaxies found inside clusters. The gas
depletion mechanisms can be categorized into three channels based on where and
when they took place. First, 34$\%$ of our galaxies are gas poor before
entering clusters (`pre-processing'). They are mainly satellites that have
undergone the environmental effect inside group halos. Second, 43$\%$ of the
sample became quickly gas deficient in clusters before the first pericentric
pass (`fast cluster processing'). Some of them were group satellites that are
low in gas at the time of cluster entry compared to the galaxies directly
coming from the field. Even the galaxies with large gas fractions take this
channel if they fall into massive clusters ($> 10^{14.5}\, \rm M_{\odot}$) or
approach cluster centers through radial orbits. Third, 24$\%$ of our sample
retain gas even after their first pericentric pass (`slow cluster processing')
as they fall into the less massive clusters and/or have circular orbits. The
relative importance of each channel varies with a cluster's mass, while the
exact degree of significance is subject to large uncertainties. Group
pre-processing accounts for a third of the total gas depletion; but it also
determines the gas fraction of galaxies at their cluster entry which in turn
determines whether a galaxy should take the fast or the slow cluster
processing.
