  From the observation of both heavy neutron stars and light ones with small
radii, one anticipates a steep rise in the speed of sound of nuclear matter as
a function of baryon density up to values close to the causal limit. A question
follows whether such behavior of the speed of sound in neutron-rich matter is
compatible with the equation of state extracted from low-energy heavy-ion
collisions. In this work, we consider a family of neutron star equations of
state characterized by a steep rise in the speed of sound, and use the symmetry
energy expansion to obtain equations of state applicable to the
almost-symmetric nuclear matter created in heavy-ion collisions. We then
compare collective flow data from low-energy heavy-ion experiments with results
of simulations obtained using the hadronic transport code SMASH with the
mean-field potential reproducing the density-dependence of the speed of sound.
We show that equations of state featuring a peak in the speed of sound squared
occurring at densities between 2-3 times the saturation density of normal
nuclear matter, producing neutron stars of nearly M_max~2.5 M_Sun, are
consistent with heavy-ion collision data.
