  Beginning with cosmological initial conditions at z=100, we simulate the
effects of magnetic fields on the formation of Population III stars and compare
our results with the predictions of Paper I. We use Gadget-2 to follow the
evolution of the system while the field is weak. We introduce a new method for
treating kinematic fields by tracking the evolution of the deformation tensor.
The growth rate in this stage of the simulation is lower than expected for
diffuse astrophysical plasmas, which have a very low resistivity (high magnetic
Prandtl number); we attribute this to the large numerical resistivity in
simulations, corresponding to a magnetic Prandtl number of order unity. When
the magnetic field begins to be dynamically significant in the core of the
minihalo at z=27, we map it onto a uniform grid and follow the evolution in an
adaptive mesh refinement, MHD simulation in Orion2. The nonlinear evolution of
the field in the Orion2 simulation violates flux-freezing and is consistent
with the theory proposed by Xu & Lazarian. The fields approach equipartition
with kinetic energy at densities ~ 10^10 - 10^12 cm^-3. When the same
calculation is carried out in Orion2 with no magnetic fields, several
protostars form, ranging in mass from ~ 1 to 30 M_sol with magnetic fields,
only a single ~ 30 M_sol protostar forms by the end of the simulation. Magnetic
fields thus suppress the formation of low-mass Pop III stars, yielding a
top-heavy Pop III IMF and contributing to the absence of observed Pop III
stars.
