  Population-synthesis codes are an unique tool to explore the parameter space
of massive binary star evolution and binary compact object (BCO) formation.
Most population-synthesis codes are based on the same stellar evolution model,
limiting our ability to explore the main uncertainties. Here, we present the
new version of the code SEVN, which overcomes this issue by interpolating the
main stellar properties from a set of pre-computed evolutionary tracks. We
describe the new interpolation and adaptive time-step algorithms of SEVN, and
the main upgrades on single and binary evolution. With SEVN, we evolved
$1.2\times10^9$ binaries in the metallicity range $0.0001\leq Z \leq 0.03$,
exploring a number of models for electron-capture, core-collapse and
pair-instability supernovae, different assumptions for common envelope,
stability of mass transfer, quasi-homogeneous evolution and stellar tides. We
find that stellar evolution has a dramatic impact on the formation of single
and binary compact objects. Just by slightly changing the overshooting
parameter ($\lambda_{\rm ov}=0.4,0.5$) and the pair-instability model, the
maximum mass of a black hole can vary from $\approx{60}$ to $\approx{100}\
\mathrm{M}_\odot$. Furthermore, the formation channels of BCOs and the merger
efficiency we obtain with SEVN show significant differences with respect to the
results of other population-synthesis codes, even when the same
binary-evolution parameters are used. For example, the main traditional
formation channel of BCOs is strongly suppressed in our models: at high
metallicity ($Z\gtrsim{0.01}$) only $<20$% of the merging binary black holes
and binary neutron stars form via this channel, while other authors found
fractions $>70$%. The local BCO merger rate density of our fiducial models is
consistent with the most recent estimates by the LIGO--Virgo--KAGRA
collaboration.

High Energy Astrophysical Phenomena;Solar and Stellar Astrophysics