In the context of star formation through fragmentation of an extremely metal deficient protogalactic cloud, the gravitational collapse of filamentary gas clouds is explored with one-dimensional numerical hydrodynamics coupled with nonequilibrium chemistry of H-2 and HD. It is found that the cloud evolution is governed mainly by the initial central density (n(c,0)) and H-2 abundance (x(H2,0)). In particular, the evolution of low-density laments (n(c,0) less than or similar to 10(5) cm(-3)) bifurcates at a threshold H-2 abundance of x(H2,cr) similar or equal to 3 x 10(-3), beyond which HD cooling overwhelms H-2 cooling. The contraction of a lament with n(c,0) less than or similar to 10(5) cm(-3) and x(H2,0) greater than or similar to x(H2,cr) is strongly decelerated when the central density ( nc) reaches a critical density of HD at which LTE level populations are achieved, and therefore the lament is expected to fragment at similar to10(7) cm(-3). The fragment mass is lowered to be approximate to10 M.. In contrast, the contraction of a lament with n(c,0) less than or similar to 10(5) cm(-3) and x(H2,0) less than or similar to x(H2,cr) is regulated by H-2 cooling. In this case, the lament tends to fragment at lower density as similar to10(4) cm(-3) owing to the low critical density of H-2, and the fragment mass is as high as approximate to10(2) M. For a high-density lament with n(c,0) greater than or similar to 10(5) cm(-3), the temperature stays at a relatively high value because both H-2 and HD cooling saturate, and the cloud evolution is governed by H-2 cooling. The contraction of a high-density lament is accelerated by effective three-body H-2 formation when the density reaches 10(8)-10(9) cm(-3). Fragmentation is not expected to take place until the cloud becomes opaque in H-2 lines at n(c,0) similar to 10(12)-10(13) cm(-3), so that the fragment mass is reduced to 1-2 M.. As a result, the stellar initial mass function could be bimodal and deficient in sub-solar mass stars, where the high-mass peak is around 10 or 10(2) M., dependent on n(c,0) and x(H2,0). If the protogalactic clouds are ionized by UV radiation or strong shocks, the H-2 abundance could exceed x(H2,cr) similar or equal to 3 x 10(-3) by reactions of H + e --> H- + hnu and H + H- --> H-2 + e. The high-mass peak would then be O(10) M..