  We investigate the evolution of subsurface flows during the emergence and the
active phase of sunspot regions using the time-distance helioseismology
analysis of the full-disk Dopplergrams from the Helioseismic and Magnetic
Imager (HMI) onboard the Solar Dynamics Observatory (SDO). We present an
analysis of emerging active regions of various types, including delta-type
active regions and regions with the reverse polarity order (`anti-Hale active
regions'). The results reveal strong vortical and shearing flows during the
emergence of magnetic flux, as well as the process of formation of large-scale
converging flow patterns around developing active regions, predominantly in the
top 6 Mm deep layers of the convection zone. Our analysis revealed a
significant correlation between the flow divergence and helicity in the active
regions with their flaring activity, indicating that measuring characteristics
of subsurface flows can contribute to flare forecasting.
