  Aims. We model the chemistry of the inner wind of the carbon star IRC+10216
and consider the effect of periodic shocks induced by the stellar pulsation on
the gas to follow the non-equilibrium chemistry in the shocked gas layers. We
consider a very complete set of chemical families, including hydrocarbons and
aromatics, hydrides, halogens and phosphorous-bearing species. Derived
abundances are compared to the latest observational data from large surveys and
Herschel. Results. The shocks induce a non-equilibrium chemistry in the dust
formation zone of IRC+10216 where the collision destruction of CO in the
post-shock gas triggers the formation of O-bearing species (H2O, SiO). Most of
the modelled abundances agree very well with the latest values derived from
Herschel data on IRC+10216. Hydrides form a family of abundant species that are
expelled into the intermediate envelope. In particular, HF traps all the atomic
fluorine in the dust formation zone. Halogens are also abundant and their
chemistry is independent of the C/O ratio of the star. Therefore, HCl and other
Cl-bearing species should also be present in the inner wind of O-rich AGB or
supergiant stars. We identify a specific region ranging from 2.5 R* to 4 R*,
where polycyclic aromatic hydrocarbons form and grow. The estimated carbon
dust-to-gas mass ratio derived from the mass of aromatics ranges from 1.2 x
10^(-3) to 5.8 x 10^{-3} and agrees well with existing observational values.
The aromatic formation region is located outside hot layers where SiC2 is
produced as a bi-product of silicon carbide dust synthesis. Finally, we predict
that some molecular lines will show flux variation with pulsation phase and
time (e.g., H2O) while other species will not (e.g., CO). These variations
merely reflect the non-equilibrium chemistry that destroys and reforms
molecules over a pulsation period in the shocked gas of the dust formation
zone.
